|
|
|
@ -21,6 +21,7 @@
|
|
|
|
|
|
|
|
|
|
#include "lib/framework/frame.h"
|
|
|
|
|
#include "lib/framework/strres.h"
|
|
|
|
|
#include "lib/framework/stdio_ext.h"
|
|
|
|
|
#include "objects.h"
|
|
|
|
|
#include "basedef.h"
|
|
|
|
|
#include "map.h"
|
|
|
|
@ -101,6 +102,7 @@
|
|
|
|
|
|
|
|
|
|
extern char ScreenDumpPath[];
|
|
|
|
|
|
|
|
|
|
BOOL bMovePause = false;
|
|
|
|
|
BOOL bAllowOtherKeyPresses = true;
|
|
|
|
|
char sTextToSend[MAX_CONSOLE_STRING_LENGTH];
|
|
|
|
|
char beaconMsg[MAX_PLAYERS][MAX_CONSOLE_STRING_LENGTH]; //beacon msg for each player
|
|
|
|
@ -134,6 +136,7 @@ static void noMPCheatMsg(void)
|
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
|
void kf_ToggleMissionTimer( void )
|
|
|
|
|
{
|
|
|
|
|
addConsoleMessage(_("Warning! This cheat is buggy. We recommend to NOT use it."), DEFAULT_JUSTIFY, SYSTEM_MESSAGE);
|
|
|
|
|
setMissionCheatTime(!mission.cheatTime);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -284,6 +287,8 @@ void kf_ToggleConsoleDrop( void )
|
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
|
void kf_SetKillerLevel( void )
|
|
|
|
|
{
|
|
|
|
|
const char* cmsg;
|
|
|
|
|
|
|
|
|
|
// Bail out if we're running a _true_ multiplayer game (to prevent MP cheating)
|
|
|
|
|
if (runningMultiplayer())
|
|
|
|
|
{
|
|
|
|
@ -292,7 +297,9 @@ void kf_SetKillerLevel( void )
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setDifficultyLevel(DL_KILLER);
|
|
|
|
|
addConsoleMessage(_("Hard as nails!!!"), LEFT_JUSTIFY, SYSTEM_MESSAGE);
|
|
|
|
|
sasprintf((char**)&cmsg, _("(Player %u) is using cheat :%s"),
|
|
|
|
|
selectedPlayer, _("Hard as nails!!!"));
|
|
|
|
|
sendTextMessage(cmsg, true);
|
|
|
|
|
}
|
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
|
void kf_SetEasyLevel( void )
|
|
|
|
@ -311,29 +318,35 @@ void kf_SetEasyLevel( void )
|
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
|
void kf_UpThePower( void )
|
|
|
|
|
{
|
|
|
|
|
const char* cmsg;
|
|
|
|
|
|
|
|
|
|
// Bail out if we're running a _true_ multiplayer game (to prevent MP cheating)
|
|
|
|
|
if (runningMultiplayer())
|
|
|
|
|
{
|
|
|
|
|
noMPCheatMsg();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
asPower[selectedPlayer].currentPower+=1000;
|
|
|
|
|
addConsoleMessage(_("1000 big ones!!!"), LEFT_JUSTIFY, SYSTEM_MESSAGE);
|
|
|
|
|
sasprintf((char**)&cmsg, _("(Player %u) is using cheat :%s"),
|
|
|
|
|
selectedPlayer, _("1000 big ones!!!"));
|
|
|
|
|
sendTextMessage(cmsg, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
|
void kf_MaxPower( void )
|
|
|
|
|
{
|
|
|
|
|
const char* cmsg;
|
|
|
|
|
|
|
|
|
|
// Bail out if we're running a _true_ multiplayer game (to prevent MP cheating)
|
|
|
|
|
if (runningMultiplayer())
|
|
|
|
|
{
|
|
|
|
|
noMPCheatMsg();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
asPower[selectedPlayer].currentPower = SDWORD_MAX / 2;
|
|
|
|
|
addConsoleMessage(_("Power overwhelming"), LEFT_JUSTIFY, SYSTEM_MESSAGE);
|
|
|
|
|
sasprintf((char**)&cmsg, _("(Player %u) is using cheat :%s"),
|
|
|
|
|
selectedPlayer, _("Power overwhelming"));
|
|
|
|
|
sendTextMessage(cmsg, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
@ -365,6 +378,8 @@ void kf_SetHardLevel( void )
|
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
|
void kf_SetToughUnitsLevel( void )
|
|
|
|
|
{
|
|
|
|
|
const char* cmsg;
|
|
|
|
|
|
|
|
|
|
// Bail out if we're running a _true_ multiplayer game (to prevent MP cheating)
|
|
|
|
|
if (runningMultiplayer())
|
|
|
|
|
{
|
|
|
|
@ -373,7 +388,9 @@ void kf_SetToughUnitsLevel( void )
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setDifficultyLevel(DL_TOUGH);
|
|
|
|
|
addConsoleMessage(_("Twice as nice!"), LEFT_JUSTIFY, SYSTEM_MESSAGE);
|
|
|
|
|
sasprintf((char**)&cmsg, _("(Player %u) is using cheat :%s"),
|
|
|
|
|
selectedPlayer, _("Twice as nice!"));
|
|
|
|
|
sendTextMessage(cmsg, true);
|
|
|
|
|
}
|
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
|
void kf_ToggleFPS(void) //This shows *just FPS* and is always visable (when active) -Q.
|
|
|
|
@ -422,11 +439,19 @@ void kf_FrameRate( void )
|
|
|
|
|
void kf_ShowNumObjects( void )
|
|
|
|
|
{
|
|
|
|
|
int droids, structures, features;
|
|
|
|
|
const char* cmsg;
|
|
|
|
|
|
|
|
|
|
// Bail out if we're running a _true_ multiplayer game (to prevent MP cheating)
|
|
|
|
|
if (runningMultiplayer())
|
|
|
|
|
{
|
|
|
|
|
noMPCheatMsg();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
objCount(&droids, &structures, &features);
|
|
|
|
|
|
|
|
|
|
CONPRINTF(ConsoleString,(ConsoleString, "Num Droids: %d Num Structures: %d Num Features: %d",
|
|
|
|
|
droids, structures, features));
|
|
|
|
|
sasprintf((char**)&cmsg, _("(Player %u) is using a cheat :Num Droids: %d Num Structures: %d Num Features: %d"),
|
|
|
|
|
selectedPlayer, droids, structures, features);
|
|
|
|
|
sendTextMessage(cmsg, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
@ -443,6 +468,8 @@ void kf_ToggleRadar( void )
|
|
|
|
|
/* Toggles infinite power on/off */
|
|
|
|
|
void kf_TogglePower( void )
|
|
|
|
|
{
|
|
|
|
|
const char* cmsg;
|
|
|
|
|
|
|
|
|
|
#ifndef DEBUG
|
|
|
|
|
// Bail out if we're running a _true_ multiplayer game (to prevent MP cheating)
|
|
|
|
|
if (runningMultiplayer())
|
|
|
|
@ -455,13 +482,12 @@ void kf_TogglePower( void )
|
|
|
|
|
powerCalculated = !powerCalculated;
|
|
|
|
|
if (powerCalculated)
|
|
|
|
|
{
|
|
|
|
|
addConsoleMessage(_("Infinite power disabled"), DEFAULT_JUSTIFY, SYSTEM_MESSAGE);
|
|
|
|
|
powerCalc(true);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
addConsoleMessage(_("Infinite power enabled"), DEFAULT_JUSTIFY, SYSTEM_MESSAGE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sasprintf((char**)&cmsg, _("(Player %u) is using cheat :%s"),
|
|
|
|
|
selectedPlayer, powerCalculated ? _("Infinite power disabled"): _("Infinite power enabled") );
|
|
|
|
|
sendTextMessage(cmsg, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
@ -475,7 +501,7 @@ void kf_RecalcLighting( void )
|
|
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
/* Sends the 3dfx screen buffer to disk */
|
|
|
|
|
/* Sends the screen buffer to disk */
|
|
|
|
|
void kf_ScreenDump( void )
|
|
|
|
|
{
|
|
|
|
|
//CONPRINTF(ConsoleString,(ConsoleString,"Screen dump written to working directory : %s", screenDumpToDisk()));
|
|
|
|
@ -487,6 +513,8 @@ void kf_ScreenDump( void )
|
|
|
|
|
/* Make all functions available */
|
|
|
|
|
void kf_AllAvailable( void )
|
|
|
|
|
{
|
|
|
|
|
const char* cmsg;
|
|
|
|
|
|
|
|
|
|
#ifndef DEBUG
|
|
|
|
|
// Bail out if we're running a _true_ multiplayer game (to prevent MP cheating)
|
|
|
|
|
if (runningMultiplayer())
|
|
|
|
@ -495,8 +523,11 @@ void kf_AllAvailable( void )
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
addConsoleMessage(_("All items made available"), DEFAULT_JUSTIFY, SYSTEM_MESSAGE);
|
|
|
|
|
|
|
|
|
|
makeAllAvailable();
|
|
|
|
|
sasprintf((char**)&cmsg, _("(Player %u) is using cheat :%s"),
|
|
|
|
|
selectedPlayer, _("All items made available"));
|
|
|
|
|
sendTextMessage(cmsg, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
@ -526,7 +557,6 @@ void kf_TileInfo(void)
|
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
|
void kf_ToggleBackgroundFog( void )
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
static BOOL bEnabled = true;//start in nicks mode
|
|
|
|
|
|
|
|
|
|
if (bEnabled)//true, so go to false
|
|
|
|
@ -548,12 +578,10 @@ void kf_ToggleBackgroundFog( void )
|
|
|
|
|
}
|
|
|
|
|
fogStatus |= FOG_BACKGROUND;//set lowest bit of 3
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
extern void kf_ToggleDistanceFog( void )
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
static BOOL bEnabled = true;//start in nicks mode
|
|
|
|
|
|
|
|
|
|
if (bEnabled)//true, so go to false
|
|
|
|
@ -575,31 +603,41 @@ extern void kf_ToggleDistanceFog( void )
|
|
|
|
|
}
|
|
|
|
|
fogStatus |= FOG_DISTANCE;//set lowest bit of 3
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Toggles fog on/off */
|
|
|
|
|
void kf_ToggleFog( void )
|
|
|
|
|
{
|
|
|
|
|
static BOOL fogEnabled = false;
|
|
|
|
|
const char* cmsg;
|
|
|
|
|
|
|
|
|
|
#ifndef DEBUG
|
|
|
|
|
// Bail out if we're running a _true_ multiplayer game (to prevent MP cheating)
|
|
|
|
|
if (runningMultiplayer())
|
|
|
|
|
{
|
|
|
|
|
noMPCheatMsg();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
if (fogEnabled)
|
|
|
|
|
{
|
|
|
|
|
fogEnabled = false;
|
|
|
|
|
pie_SetFogStatus(false);
|
|
|
|
|
pie_EnableFog(fogEnabled);
|
|
|
|
|
addConsoleMessage(_("Fog off"), DEFAULT_JUSTIFY, SYSTEM_MESSAGE);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
fogEnabled = true;
|
|
|
|
|
pie_EnableFog(fogEnabled);
|
|
|
|
|
addConsoleMessage(_("Fog on"), DEFAULT_JUSTIFY, SYSTEM_MESSAGE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sasprintf((char**)&cmsg, _("(Player %u) is using cheat :%s"),
|
|
|
|
|
selectedPlayer, fogEnabled ? _("Fog on") : _("Fog off") );
|
|
|
|
|
sendTextMessage(cmsg, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
/* Toggles fog on/off */
|
|
|
|
|
void kf_ToggleWidgets( void )
|
|
|
|
|
{
|
|
|
|
|
if(getWidgetsStatus())
|
|
|
|
@ -618,7 +656,8 @@ void kf_ToggleWidgets( void )
|
|
|
|
|
/* Toggle camera on/off */
|
|
|
|
|
void kf_ToggleCamera( void )
|
|
|
|
|
{
|
|
|
|
|
if(getWarCamStatus() == false) {
|
|
|
|
|
if(getWarCamStatus() == false)
|
|
|
|
|
{
|
|
|
|
|
shakeStop(); // Ensure screen shake stopped before starting camera mode.
|
|
|
|
|
setDrivingStatus(false);
|
|
|
|
|
}
|
|
|
|
@ -707,7 +746,6 @@ void kf_RadarZoomIn( void )
|
|
|
|
|
{
|
|
|
|
|
audio_PlayTrack( ID_SOUND_BUILD_FAIL );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
|
void kf_RadarZoomOut( void )
|
|
|
|
@ -1019,6 +1057,8 @@ void kf_AddMissionOffWorld( void )
|
|
|
|
|
/* Tell the scripts to end a mission*/
|
|
|
|
|
void kf_EndMissionOffWorld( void )
|
|
|
|
|
{
|
|
|
|
|
const char* cmsg;
|
|
|
|
|
|
|
|
|
|
#ifndef DEBUG
|
|
|
|
|
// Bail out if we're running a _true_ multiplayer game
|
|
|
|
|
if (runningMultiplayer())
|
|
|
|
@ -1028,6 +1068,9 @@ void kf_EndMissionOffWorld( void )
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
sasprintf((char**)&cmsg, _("Warning! This cheat can cause dire problems later on! [%s]"), _("Ending Mission."));
|
|
|
|
|
sendTextMessage(cmsg, true);
|
|
|
|
|
|
|
|
|
|
eventFireCallbackTrigger((TRIGGER_TYPE)CALL_MISSION_END);
|
|
|
|
|
}
|
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
@ -1086,10 +1129,8 @@ KEY_CODE entry;
|
|
|
|
|
camToggleStatus();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
|
/* Raises the G Offset */
|
|
|
|
|
void kf_UpGeoOffset( void )
|
|
|
|
@ -1117,6 +1158,8 @@ void kf_TogglePowerBar( void )
|
|
|
|
|
/* Toggles whether we process debug key mappings */
|
|
|
|
|
void kf_ToggleDebugMappings( void )
|
|
|
|
|
{
|
|
|
|
|
const char* cmsg;
|
|
|
|
|
|
|
|
|
|
#ifndef DEBUG
|
|
|
|
|
// Prevent cheating in multiplayer when not compiled in debug mode by
|
|
|
|
|
// bailing out if we're running a _true_ multiplayer game
|
|
|
|
@ -1132,19 +1175,15 @@ void kf_ToggleDebugMappings( void )
|
|
|
|
|
if(getDebugMappingStatus())
|
|
|
|
|
{
|
|
|
|
|
processDebugMappings(false);
|
|
|
|
|
CONPRINTF(ConsoleString, (ConsoleString, "CHEATS DISABLED!"));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
game_SetValidityKey(VALIDITYKEY_CHEAT_MODE);
|
|
|
|
|
processDebugMappings(true);
|
|
|
|
|
CONPRINTF(ConsoleString, (ConsoleString, "CHEATS ENABLED!"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(bMultiPlayer)
|
|
|
|
|
{
|
|
|
|
|
sendTextMessage("Presses Debug. CHEAT",true);
|
|
|
|
|
}
|
|
|
|
|
sasprintf((char**)&cmsg, _("(Player %u) is using cheat :%s"), selectedPlayer,
|
|
|
|
|
getDebugMappingStatus() ? _("CHEATS ARE NOW ENABLED!") : _("CHEATS ARE NOW DISABLED!"));
|
|
|
|
|
sendTextMessage(cmsg, true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
@ -1152,6 +1191,8 @@ void kf_ToggleDebugMappings( void )
|
|
|
|
|
|
|
|
|
|
void kf_ToggleGodMode( void )
|
|
|
|
|
{
|
|
|
|
|
const char* cmsg;
|
|
|
|
|
|
|
|
|
|
#ifndef DEBUG
|
|
|
|
|
// Bail out if we're running a _true_ multiplayer game (to prevent MP cheating)
|
|
|
|
|
if (runningMultiplayer())
|
|
|
|
@ -1191,14 +1232,16 @@ void kf_ToggleGodMode( void )
|
|
|
|
|
}
|
|
|
|
|
// remove all proximity messages
|
|
|
|
|
releaseAllProxDisp();
|
|
|
|
|
CONPRINTF(ConsoleString,(ConsoleString,"God Mode OFF"));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
godMode = true; // view all structures and droids
|
|
|
|
|
setRevealStatus(false); // view the entire map
|
|
|
|
|
CONPRINTF(ConsoleString,(ConsoleString,"God Mode ON"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sasprintf((char**)&cmsg, _("(Player %u) is using cheat :%s"),
|
|
|
|
|
selectedPlayer, godMode ? _("God Mode ON") : _("God Mode OFF"));
|
|
|
|
|
sendTextMessage(cmsg, true);
|
|
|
|
|
}
|
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
|
/* Aligns the view to north - some people can't handle the world spinning */
|
|
|
|
@ -1265,6 +1308,16 @@ void kf_TogglePauseMode( void )
|
|
|
|
|
void kf_FinishAllResearch(void)
|
|
|
|
|
{
|
|
|
|
|
UDWORD j;
|
|
|
|
|
const char* cmsg;
|
|
|
|
|
|
|
|
|
|
#ifndef DEBUG
|
|
|
|
|
// Bail out if we're running a _true_ multiplayer game (to prevent MP cheating)
|
|
|
|
|
if (runningMultiplayer())
|
|
|
|
|
{
|
|
|
|
|
noMPCheatMsg();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
for (j = 0; j < numResearch; j++)
|
|
|
|
|
{
|
|
|
|
@ -1277,7 +1330,9 @@ void kf_FinishAllResearch(void)
|
|
|
|
|
researchResult(j, selectedPlayer, false, NULL);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
CONPRINTF(ConsoleString, (ConsoleString, _("Researched EVERYTHING for you!")));
|
|
|
|
|
sasprintf((char**)&cmsg, _("(Player %u) is using cheat :%s"),
|
|
|
|
|
selectedPlayer, _("Researched EVERYTHING for you!"));
|
|
|
|
|
sendTextMessage(cmsg, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
@ -1285,14 +1340,34 @@ void kf_FinishAllResearch(void)
|
|
|
|
|
void kf_FinishResearch( void )
|
|
|
|
|
{
|
|
|
|
|
STRUCTURE *psCurr;
|
|
|
|
|
const char* cmsg;
|
|
|
|
|
|
|
|
|
|
#ifndef DEBUG
|
|
|
|
|
// Bail out if we're running a _true_ multiplayer game (to prevent MP cheating)
|
|
|
|
|
if (runningMultiplayer())
|
|
|
|
|
{
|
|
|
|
|
noMPCheatMsg();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
for (psCurr=interfaceStructList(); psCurr; psCurr = psCurr->psNext)
|
|
|
|
|
{
|
|
|
|
|
if (psCurr->pStructureType->type == REF_RESEARCH)
|
|
|
|
|
{
|
|
|
|
|
BASE_STATS *pSubject = NULL;
|
|
|
|
|
|
|
|
|
|
((RESEARCH_FACILITY *)psCurr->pFunctionality)->timeStarted = gameTime + 100000;
|
|
|
|
|
//set power accrued to high value so that will trigger straight away
|
|
|
|
|
((RESEARCH_FACILITY *)psCurr->pFunctionality)->powerAccrued = 10000;
|
|
|
|
|
// find out what the heck we are researching
|
|
|
|
|
pSubject = ((RESEARCH_FACILITY *)psCurr->pFunctionality)->psSubject;
|
|
|
|
|
if (pSubject)
|
|
|
|
|
{
|
|
|
|
|
sasprintf((char**)&cmsg, _("(Player %u) is using cheat :%s %s"),
|
|
|
|
|
selectedPlayer, _("Researched"), getName(pSubject->pName) );
|
|
|
|
|
sendTextMessage(cmsg, true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1532,8 +1607,6 @@ void kf_ToggleDrivingMode( void )
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BOOL bMovePause = false;
|
|
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
|
void kf_MovePause( void )
|
|
|
|
|
{
|
|
|
|
@ -1634,9 +1707,23 @@ void kf_KillEnemy( void )
|
|
|
|
|
UDWORD player;
|
|
|
|
|
DROID *psCDroid,*psNDroid;
|
|
|
|
|
STRUCTURE *psCStruct, *psNStruct;
|
|
|
|
|
const char* cmsg;
|
|
|
|
|
|
|
|
|
|
CONPRINTF(ConsoleString, (ConsoleString, _("Enemy destroyed by cheating!")));
|
|
|
|
|
debug(LOG_DEATH, "kf_KillEnemy: Destroying enemy droids and structures");
|
|
|
|
|
#ifndef DEBUG
|
|
|
|
|
// Bail out if we're running a _true_ multiplayer game (to prevent MP cheating)
|
|
|
|
|
if (runningMultiplayer())
|
|
|
|
|
{
|
|
|
|
|
noMPCheatMsg();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
debug(LOG_DEATH, "Destroying enemy droids and structures");
|
|
|
|
|
CONPRINTF(ConsoleString, (ConsoleString,
|
|
|
|
|
_("Warning! This can have drastic consequences if used incorrectly in missions.")));
|
|
|
|
|
sasprintf((char**)&cmsg, _("(Player %u) is using cheat :%s"),
|
|
|
|
|
selectedPlayer, _("All enemies destroyed by cheating!"));
|
|
|
|
|
sendTextMessage(cmsg, true);
|
|
|
|
|
|
|
|
|
|
for (player = 0; player < MAX_PLAYERS; player++)
|
|
|
|
|
{
|
|
|
|
@ -1663,8 +1750,22 @@ void kf_KillSelected(void)
|
|
|
|
|
{
|
|
|
|
|
DROID *psCDroid, *psNDroid;
|
|
|
|
|
STRUCTURE *psCStruct, *psNStruct;
|
|
|
|
|
const char* cmsg;
|
|
|
|
|
|
|
|
|
|
debug(LOG_DEATH, "kf_KillSelected: Destroying selected droids and structures");
|
|
|
|
|
#ifndef DEBUG
|
|
|
|
|
// Bail out if we're running a _true_ multiplayer game (to prevent MP cheating)
|
|
|
|
|
if (runningMultiplayer())
|
|
|
|
|
{
|
|
|
|
|
noMPCheatMsg();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
sasprintf((char**)&cmsg, _("(Player %u) is using cheat :%s"),
|
|
|
|
|
selectedPlayer, _("Destroying selected droids and structures!"));
|
|
|
|
|
sendTextMessage(cmsg, true);
|
|
|
|
|
|
|
|
|
|
debug(LOG_DEATH, "Destroying selected droids and structures");
|
|
|
|
|
for(psCDroid=apsDroidLists[selectedPlayer]; psCDroid; psCDroid=psNDroid)
|
|
|
|
|
{
|
|
|
|
|
psNDroid = psCDroid->psNext;
|
|
|
|
@ -1766,7 +1867,6 @@ void kf_SendTextMessage(void)
|
|
|
|
|
sstrcpy(ConsoleMsg, sTextToSend);
|
|
|
|
|
eventFireCallbackTrigger((TRIGGER_TYPE)CALL_CONSOLE);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (runningMultiplayer())
|
|
|
|
|
{
|
|
|
|
|
sendTextMessage(sTextToSend,false);
|
|
|
|
@ -1822,7 +1922,6 @@ void kf_SendTextMessage(void)
|
|
|
|
|
const char input_char[2] = { inputGetCharKey(), '\0' };
|
|
|
|
|
|
|
|
|
|
sstrcat(sTextToSend, input_char);
|
|
|
|
|
|
|
|
|
|
sstrcpy(sCurrentConsoleText, sTextToSend);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2088,7 +2187,6 @@ void kf_ToggleVisibility( void )
|
|
|
|
|
{
|
|
|
|
|
setRevealStatus(true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
@ -2096,6 +2194,15 @@ static void kfsf_SetSelectedDroidsState( SECONDARY_ORDER sec, SECONDARY_STATE st
|
|
|
|
|
{
|
|
|
|
|
DROID *psDroid;
|
|
|
|
|
|
|
|
|
|
#ifndef DEBUG
|
|
|
|
|
// Bail out if we're running a _true_ multiplayer game (to prevent MP cheating)
|
|
|
|
|
if (runningMultiplayer())
|
|
|
|
|
{
|
|
|
|
|
noMPCheatMsg();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
for(psDroid = apsDroidLists[selectedPlayer]; psDroid; psDroid = psDroid->psNext)
|
|
|
|
|
{
|
|
|
|
|
if(psDroid->selected)
|
|
|
|
@ -2213,7 +2320,6 @@ BOOL bFound;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(psDroid = apsDroidLists[selectedPlayer],bFound = false;
|
|
|
|
|
psDroid && !bFound; psDroid = psDroid->psNext)
|
|
|
|
|
{
|
|
|
|
@ -2264,7 +2370,6 @@ void kf_ToggleShakeStatus( void )
|
|
|
|
|
{
|
|
|
|
|
setShakeStatus(true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
|
void kf_ToggleShadows( void )
|
|
|
|
@ -2277,7 +2382,6 @@ void kf_ToggleShadows( void )
|
|
|
|
|
{
|
|
|
|
|
setDrawShadows(true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|