mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
- Made the "Zombie MOD" optional, so we can decide if we like to build an executable with/without the appearance of zombies
o See: builddefines.h: #define ENABLE_ZOMBIES (then you can turn on/off Zombies in the ingame option screen) o Poison system is still in the code and not combined with the option "Zombie MOD" o Gamers reported on the Bears Pit, that an executable compiled WITH the Zombies mod enabled makes the game unplayable slow in tactical screen after a few minutes in turn based/realtime git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5356 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+9
-1
@@ -254,7 +254,9 @@ BOOLEAN LoadGameSettings()
|
|||||||
gGameSettings.fOptions[TOPTION_AUTO_FAST_FORWARD_MODE] = FALSE;
|
gGameSettings.fOptions[TOPTION_AUTO_FAST_FORWARD_MODE] = FALSE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
gGameSettings.fOptions[TOPTION_ZOMBIES] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_ZOMBIES" , FALSE );
|
gGameSettings.fOptions[TOPTION_ZOMBIES] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_ZOMBIES" , FALSE );
|
||||||
|
#endif
|
||||||
|
|
||||||
gGameSettings.fOptions[NUM_ALL_GAME_OPTIONS] = iniReader.ReadBoolean("JA2 Game Settings","NUM_ALL_GAME_OPTIONS" , FALSE );
|
gGameSettings.fOptions[NUM_ALL_GAME_OPTIONS] = iniReader.ReadBoolean("JA2 Game Settings","NUM_ALL_GAME_OPTIONS" , FALSE );
|
||||||
|
|
||||||
@@ -417,7 +419,10 @@ BOOLEAN SaveGameSettings()
|
|||||||
settings << "TOPTION_AUTO_FAST_FORWARD_MODE = " << (gGameSettings.fOptions[TOPTION_AUTO_FAST_FORWARD_MODE] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_AUTO_FAST_FORWARD_MODE = " << (gGameSettings.fOptions[TOPTION_AUTO_FAST_FORWARD_MODE] ? "TRUE" : "FALSE" ) << endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
settings << "TOPTION_ZOMBIES = " << (gGameSettings.fOptions[TOPTION_ZOMBIES] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_ZOMBIES = " << (gGameSettings.fOptions[TOPTION_ZOMBIES] ? "TRUE" : "FALSE" ) << endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
settings << "TOPTION_CHEAT_MODE_OPTIONS_HEADER = " << (gGameSettings.fOptions[TOPTION_CHEAT_MODE_OPTIONS_HEADER] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_CHEAT_MODE_OPTIONS_HEADER = " << (gGameSettings.fOptions[TOPTION_CHEAT_MODE_OPTIONS_HEADER] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_FORCE_BOBBY_RAY_SHIPMENTS = " << (gGameSettings.fOptions[TOPTION_FORCE_BOBBY_RAY_SHIPMENTS] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_FORCE_BOBBY_RAY_SHIPMENTS = " << (gGameSettings.fOptions[TOPTION_FORCE_BOBBY_RAY_SHIPMENTS] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_CHEAT_MODE_OPTIONS_END = " << (gGameSettings.fOptions[TOPTION_CHEAT_MODE_OPTIONS_END] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_CHEAT_MODE_OPTIONS_END = " << (gGameSettings.fOptions[TOPTION_CHEAT_MODE_OPTIONS_END] ? "TRUE" : "FALSE" ) << endl;
|
||||||
@@ -549,8 +554,9 @@ void InitGameSettings()
|
|||||||
gGameSettings.fOptions[ TOPTION_AUTO_FAST_FORWARD_MODE ] = FALSE;
|
gGameSettings.fOptions[ TOPTION_AUTO_FAST_FORWARD_MODE ] = FALSE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
gGameSettings.fOptions[ TOPTION_ZOMBIES ] = FALSE; // Flugente Zombies 1.0
|
gGameSettings.fOptions[ TOPTION_ZOMBIES ] = FALSE; // Flugente Zombies 1.0
|
||||||
|
#endif
|
||||||
|
|
||||||
// arynn: Cheat/Debug Menu
|
// arynn: Cheat/Debug Menu
|
||||||
gGameSettings.fOptions[ TOPTION_CHEAT_MODE_OPTIONS_HEADER ] = FALSE;
|
gGameSettings.fOptions[ TOPTION_CHEAT_MODE_OPTIONS_HEADER ] = FALSE;
|
||||||
@@ -1357,6 +1363,7 @@ void LoadGameExternalOptions()
|
|||||||
gGameExternalOptions.iCooldownModificatorLonelyBarrel = iniReader.ReadFloat ("Tactical Weapon Overheating Settings","OVERHEATING_COOLDOWN_MODIFICATOR_LONELYBARREL", 1.15f, 1.0f, 10.0f);
|
gGameExternalOptions.iCooldownModificatorLonelyBarrel = iniReader.ReadFloat ("Tactical Weapon Overheating Settings","OVERHEATING_COOLDOWN_MODIFICATOR_LONELYBARREL", 1.15f, 1.0f, 10.0f);
|
||||||
gGameExternalOptions.fSetZeroUponNewSector = iniReader.ReadBoolean("Tactical Weapon Overheating Settings","OVERHEATING_SET_ZERO_UPON_NEW_SECTOR",TRUE);
|
gGameExternalOptions.fSetZeroUponNewSector = iniReader.ReadBoolean("Tactical Weapon Overheating Settings","OVERHEATING_SET_ZERO_UPON_NEW_SECTOR",TRUE);
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
//################# Tactical Zombie Settings ##################
|
//################# Tactical Zombie Settings ##################
|
||||||
gGameExternalOptions.sZombieRiseBehaviour = iniReader.ReadInteger("Tactical Zombie Settings", "ZOMBIE_RISE_BEHAVIOUR", 0, 0, 3);
|
gGameExternalOptions.sZombieRiseBehaviour = iniReader.ReadInteger("Tactical Zombie Settings", "ZOMBIE_RISE_BEHAVIOUR", 0, 0, 3);
|
||||||
gGameExternalOptions.fZombieSpawnWaves = iniReader.ReadInteger("Tactical Zombie Settings", "ZOMBIE_SPAWN_WAVES", FALSE);
|
gGameExternalOptions.fZombieSpawnWaves = iniReader.ReadInteger("Tactical Zombie Settings", "ZOMBIE_SPAWN_WAVES", FALSE);
|
||||||
@@ -1368,6 +1375,7 @@ void LoadGameExternalOptions()
|
|||||||
gGameExternalOptions.fZombieOnlyHeadshotsWork = iniReader.ReadBoolean("Tactical Zombie Settings", "ZOMBIE_ONLY_HEADSHOTS_WORK", FALSE);
|
gGameExternalOptions.fZombieOnlyHeadshotsWork = iniReader.ReadBoolean("Tactical Zombie Settings", "ZOMBIE_ONLY_HEADSHOTS_WORK", FALSE);
|
||||||
gGameExternalOptions.sZombieDifficultyLevel = iniReader.ReadInteger("Tactical Zombie Settings", "ZOMBIE_DIFFICULTY_LEVEL", 2, 1, 4);
|
gGameExternalOptions.sZombieDifficultyLevel = iniReader.ReadInteger("Tactical Zombie Settings", "ZOMBIE_DIFFICULTY_LEVEL", 2, 1, 4);
|
||||||
gGameExternalOptions.fZombieRiseWithArmour = iniReader.ReadBoolean("Tactical Zombie Settings", "ZOMBIE_RISE_WITH_ARMOUR", TRUE);
|
gGameExternalOptions.fZombieRiseWithArmour = iniReader.ReadBoolean("Tactical Zombie Settings", "ZOMBIE_RISE_WITH_ARMOUR", TRUE);
|
||||||
|
#endif
|
||||||
|
|
||||||
//################# Tactical Poison Settings ##################
|
//################# Tactical Poison Settings ##################
|
||||||
gGameExternalOptions.ubPoisonBaseMedicalSkillToCure = iniReader.ReadInteger("Tactical Poison Settings", "POISON_BASE_MEDICAL_SKILL_TO_CURE", 50, 1, 100);
|
gGameExternalOptions.ubPoisonBaseMedicalSkillToCure = iniReader.ReadInteger("Tactical Poison Settings", "POISON_BASE_MEDICAL_SKILL_TO_CURE", 50, 1, 100);
|
||||||
|
|||||||
@@ -95,7 +95,9 @@ enum
|
|||||||
TOPTION_AUTO_FAST_FORWARD_MODE, // automatically fast forward through AI turns
|
TOPTION_AUTO_FAST_FORWARD_MODE, // automatically fast forward through AI turns
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
TOPTION_ZOMBIES, // Flugente Zombies 1.0: allow zombies
|
TOPTION_ZOMBIES, // Flugente Zombies 1.0: allow zombies
|
||||||
|
#endif
|
||||||
|
|
||||||
// arynn: Debug/Cheat
|
// arynn: Debug/Cheat
|
||||||
TOPTION_CHEAT_MODE_OPTIONS_HEADER,
|
TOPTION_CHEAT_MODE_OPTIONS_HEADER,
|
||||||
@@ -369,6 +371,7 @@ typedef struct
|
|||||||
//Video settings
|
//Video settings
|
||||||
BOOLEAN gfVSync;
|
BOOLEAN gfVSync;
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
// Flugente: zombie settings
|
// Flugente: zombie settings
|
||||||
INT8 sZombieRiseBehaviour;
|
INT8 sZombieRiseBehaviour;
|
||||||
BOOLEAN fZombieSpawnWaves;
|
BOOLEAN fZombieSpawnWaves;
|
||||||
@@ -380,6 +383,7 @@ typedef struct
|
|||||||
BOOLEAN fZombieOnlyHeadshotsWork;
|
BOOLEAN fZombieOnlyHeadshotsWork;
|
||||||
INT8 sZombieDifficultyLevel;
|
INT8 sZombieDifficultyLevel;
|
||||||
BOOLEAN fZombieRiseWithArmour;
|
BOOLEAN fZombieRiseWithArmour;
|
||||||
|
#endif
|
||||||
|
|
||||||
// Flugente: poison settings
|
// Flugente: poison settings
|
||||||
INT32 ubPoisonBaseMedicalSkillToCure;
|
INT32 ubPoisonBaseMedicalSkillToCure;
|
||||||
|
|||||||
@@ -4959,7 +4959,12 @@ void DisplayDepartedCharStats(INT32 iId, INT32 iSlot, INT32 iState)
|
|||||||
case 14:
|
case 14:
|
||||||
// kills
|
// kills
|
||||||
mprintf((INT16)(pPersonnelScreenPoints[20].x+(iSlot*TEXT_BOX_WIDTH)),(pPersonnelScreenPoints[20].y - 12),pPersonnelScreenStrings[PRSNL_TXT_KILLS]);
|
mprintf((INT16)(pPersonnelScreenPoints[20].x+(iSlot*TEXT_BOX_WIDTH)),(pPersonnelScreenPoints[20].y - 12),pPersonnelScreenStrings[PRSNL_TXT_KILLS]);
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
swprintf(sString, L"%d",(gMercProfiles[iId].records.usKillsElites + gMercProfiles[iId].records.usKillsRegulars + gMercProfiles[iId].records.usKillsAdmins + gMercProfiles[iId].records.usKillsHostiles + gMercProfiles[iId].records.usKillsCreatures + gMercProfiles[iId].records.usKillsZombies + gMercProfiles[iId].records.usKillsTanks + gMercProfiles[iId].records.usKillsOthers));
|
swprintf(sString, L"%d",(gMercProfiles[iId].records.usKillsElites + gMercProfiles[iId].records.usKillsRegulars + gMercProfiles[iId].records.usKillsAdmins + gMercProfiles[iId].records.usKillsHostiles + gMercProfiles[iId].records.usKillsCreatures + gMercProfiles[iId].records.usKillsZombies + gMercProfiles[iId].records.usKillsTanks + gMercProfiles[iId].records.usKillsOthers));
|
||||||
|
#else
|
||||||
|
swprintf(sString, L"%d",(gMercProfiles[iId].records.usKillsElites + gMercProfiles[iId].records.usKillsRegulars + gMercProfiles[iId].records.usKillsAdmins + gMercProfiles[iId].records.usKillsHostiles + gMercProfiles[iId].records.usKillsCreatures + gMercProfiles[iId].records.usKillsTanks + gMercProfiles[iId].records.usKillsOthers));
|
||||||
|
#endif
|
||||||
FindFontRightCoordinates((INT16)(pPersonnelScreenPoints[20].x+(iSlot*TEXT_BOX_WIDTH)),0,TEXT_BOX_WIDTH-20,0,sString, PERS_FONT, &sX, &sY);
|
FindFontRightCoordinates((INT16)(pPersonnelScreenPoints[20].x+(iSlot*TEXT_BOX_WIDTH)),0,TEXT_BOX_WIDTH-20,0,sString, PERS_FONT, &sX, &sY);
|
||||||
mprintf(sX,(pPersonnelScreenPoints[20].y - 12),sString);
|
mprintf(sX,(pPersonnelScreenPoints[20].y - 12),sString);
|
||||||
|
|
||||||
@@ -6828,7 +6833,12 @@ DEF:3/19/99:
|
|||||||
case 14:
|
case 14:
|
||||||
// kills
|
// kills
|
||||||
mprintf((INT16)(pPersonnelScreenPoints[20].x+(iSlot*TEXT_BOX_WIDTH)),(pPersonnelScreenPoints[20].y - 12),pPersonnelScreenStrings[PRSNL_TXT_KILLS]);
|
mprintf((INT16)(pPersonnelScreenPoints[20].x+(iSlot*TEXT_BOX_WIDTH)),(pPersonnelScreenPoints[20].y - 12),pPersonnelScreenStrings[PRSNL_TXT_KILLS]);
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
swprintf(sString, L"%d",(gMercProfiles[Menptr[iId].ubProfile].records.usKillsElites + gMercProfiles[Menptr[iId].ubProfile].records.usKillsRegulars + gMercProfiles[Menptr[iId].ubProfile].records.usKillsAdmins + gMercProfiles[Menptr[iId].ubProfile].records.usKillsHostiles + gMercProfiles[Menptr[iId].ubProfile].records.usKillsCreatures + gMercProfiles[Menptr[iId].ubProfile].records.usKillsZombies + gMercProfiles[Menptr[iId].ubProfile].records.usKillsTanks + gMercProfiles[Menptr[iId].ubProfile].records.usKillsOthers));
|
swprintf(sString, L"%d",(gMercProfiles[Menptr[iId].ubProfile].records.usKillsElites + gMercProfiles[Menptr[iId].ubProfile].records.usKillsRegulars + gMercProfiles[Menptr[iId].ubProfile].records.usKillsAdmins + gMercProfiles[Menptr[iId].ubProfile].records.usKillsHostiles + gMercProfiles[Menptr[iId].ubProfile].records.usKillsCreatures + gMercProfiles[Menptr[iId].ubProfile].records.usKillsZombies + gMercProfiles[Menptr[iId].ubProfile].records.usKillsTanks + gMercProfiles[Menptr[iId].ubProfile].records.usKillsOthers));
|
||||||
|
#else
|
||||||
|
swprintf(sString, L"%d",(gMercProfiles[Menptr[iId].ubProfile].records.usKillsElites + gMercProfiles[Menptr[iId].ubProfile].records.usKillsRegulars + gMercProfiles[Menptr[iId].ubProfile].records.usKillsAdmins + gMercProfiles[Menptr[iId].ubProfile].records.usKillsHostiles + gMercProfiles[Menptr[iId].ubProfile].records.usKillsCreatures + gMercProfiles[Menptr[iId].ubProfile].records.usKillsTanks + gMercProfiles[Menptr[iId].ubProfile].records.usKillsOthers));
|
||||||
|
#endif
|
||||||
FindFontRightCoordinates((INT16)(pPersonnelScreenPoints[20].x+(iSlot*TEXT_BOX_WIDTH)),0,TEXT_BOX_WIDTH-20,0,sString, PERS_FONT, &sX, &sY);
|
FindFontRightCoordinates((INT16)(pPersonnelScreenPoints[20].x+(iSlot*TEXT_BOX_WIDTH)),0,TEXT_BOX_WIDTH-20,0,sString, PERS_FONT, &sX, &sY);
|
||||||
mprintf(sX,(pPersonnelScreenPoints[20].y - 12),sString);
|
mprintf(sX,(pPersonnelScreenPoints[20].y - 12),sString);
|
||||||
|
|
||||||
@@ -8239,6 +8249,8 @@ void AssignPersonnelKillsHelpText( INT32 IMercId )
|
|||||||
swprintf(atStr, pPersonnelRecordsHelpTexts[ 6 ], gMercProfiles[Menptr[IMercId].ubProfile].records.usKillsOthers );
|
swprintf(atStr, pPersonnelRecordsHelpTexts[ 6 ], gMercProfiles[Menptr[IMercId].ubProfile].records.usKillsOthers );
|
||||||
wcscat( apStr, atStr );
|
wcscat( apStr, atStr );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
if (gGameSettings.fOptions[TOPTION_ZOMBIES] )
|
if (gGameSettings.fOptions[TOPTION_ZOMBIES] )
|
||||||
{
|
{
|
||||||
if (gMercProfiles[Menptr[IMercId].ubProfile].records.usKillsZombies > 0 || fShowRecordsIfZero)
|
if (gMercProfiles[Menptr[IMercId].ubProfile].records.usKillsZombies > 0 || fShowRecordsIfZero)
|
||||||
@@ -8247,6 +8259,7 @@ void AssignPersonnelKillsHelpText( INT32 IMercId )
|
|||||||
wcscat( apStr, atStr );
|
wcscat( apStr, atStr );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Set region help text
|
// Set region help text
|
||||||
SetRegionFastHelpText( &(gSkillTraitHelpTextRegion[7]), apStr );
|
SetRegionFastHelpText( &(gSkillTraitHelpTextRegion[7]), apStr );
|
||||||
|
|||||||
Binary file not shown.
@@ -4598,9 +4598,11 @@ void AttackTarget( SOLDIERCELL *pAttacker, SOLDIERCELL *pTarget )
|
|||||||
case SOLDIER_CLASS_CREATURE :
|
case SOLDIER_CLASS_CREATURE :
|
||||||
gMercProfiles[ pAttacker->pSoldier->ubProfile ].records.usKillsCreatures++;
|
gMercProfiles[ pAttacker->pSoldier->ubProfile ].records.usKillsCreatures++;
|
||||||
break;
|
break;
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
case SOLDIER_CLASS_ZOMBIE :
|
case SOLDIER_CLASS_ZOMBIE :
|
||||||
gMercProfiles[ pAttacker->pSoldier->ubProfile ].records.usKillsZombies++;
|
gMercProfiles[ pAttacker->pSoldier->ubProfile ].records.usKillsZombies++;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
default :
|
default :
|
||||||
if ( CREATURE_OR_BLOODCAT( pTarget->pSoldier ) )
|
if ( CREATURE_OR_BLOODCAT( pTarget->pSoldier ) )
|
||||||
gMercProfiles[ pAttacker->pSoldier->ubProfile ].records.usKillsCreatures++;
|
gMercProfiles[ pAttacker->pSoldier->ubProfile ].records.usKillsCreatures++;
|
||||||
@@ -4789,9 +4791,11 @@ void TargetHitCallback( SOLDIERCELL *pTarget, INT32 index )
|
|||||||
case SOLDIER_CLASS_CREATURE :
|
case SOLDIER_CLASS_CREATURE :
|
||||||
gMercProfiles[ pKiller->pSoldier->ubProfile ].records.usKillsCreatures++;
|
gMercProfiles[ pKiller->pSoldier->ubProfile ].records.usKillsCreatures++;
|
||||||
break;
|
break;
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
case SOLDIER_CLASS_ZOMBIE :
|
case SOLDIER_CLASS_ZOMBIE :
|
||||||
gMercProfiles[ pKiller->pSoldier->ubProfile ].records.usKillsZombies++;
|
gMercProfiles[ pKiller->pSoldier->ubProfile ].records.usKillsZombies++;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
default :
|
default :
|
||||||
if ( CREATURE_OR_BLOODCAT( pTarget->pSoldier ) )
|
if ( CREATURE_OR_BLOODCAT( pTarget->pSoldier ) )
|
||||||
gMercProfiles[ pKiller->pSoldier->ubProfile ].records.usKillsCreatures++;
|
gMercProfiles[ pKiller->pSoldier->ubProfile ].records.usKillsCreatures++;
|
||||||
|
|||||||
@@ -820,7 +820,10 @@ void EndMeanwhile( )
|
|||||||
{
|
{
|
||||||
// We leave this sector open for our POWs to escape!
|
// We leave this sector open for our POWs to escape!
|
||||||
// Set music mode to enemy present!
|
// Set music mode to enemy present!
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
UseCreatureMusic(HostileZombiesPresent());
|
UseCreatureMusic(HostileZombiesPresent());
|
||||||
|
#endif
|
||||||
|
|
||||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||||
|
|
||||||
// ATE: Restore people to saved positions...
|
// ATE: Restore people to saved positions...
|
||||||
|
|||||||
@@ -867,7 +867,10 @@ void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI )
|
|||||||
//Disable the options button when the auto resolve screen comes up
|
//Disable the options button when the auto resolve screen comes up
|
||||||
EnableDisAbleMapScreenOptionsButton( FALSE );
|
EnableDisAbleMapScreenOptionsButton( FALSE );
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
UseCreatureMusic(HostileZombiesPresent());
|
UseCreatureMusic(HostileZombiesPresent());
|
||||||
|
#endif
|
||||||
|
|
||||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
|
|||||||
@@ -959,7 +959,10 @@ void PrepareForPreBattleInterface( GROUP *pPlayerDialogGroup, GROUP *pInitiating
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Set music
|
//Set music
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
UseCreatureMusic(HostileZombiesPresent());
|
UseCreatureMusic(HostileZombiesPresent());
|
||||||
|
#endif
|
||||||
|
|
||||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||||
|
|
||||||
if( gfTacticalTraversal && pInitiatingBattleGroup == gpTacticalTraversalGroup ||
|
if( gfTacticalTraversal && pInitiatingBattleGroup == gpTacticalTraversalGroup ||
|
||||||
|
|||||||
@@ -1035,9 +1035,11 @@ void StartEnemyTaunt( SOLDIERTYPE *pCiv, INT8 iTauntType )
|
|||||||
VIDEO_OVERLAY_DESC VideoOverlayDesc;
|
VIDEO_OVERLAY_DESC VideoOverlayDesc;
|
||||||
CHAR16 gzTauntQuote[ 320 ];
|
CHAR16 gzTauntQuote[ 320 ];
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
// Flugente: zombies don't talk
|
// Flugente: zombies don't talk
|
||||||
if ( pCiv->IsZombie() )
|
if ( pCiv->IsZombie() )
|
||||||
return;
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
// if we have a different quote on, return, this one is not important
|
// if we have a different quote on, return, this one is not important
|
||||||
if ( gCivQuoteData.bActive )
|
if ( gCivQuoteData.bActive )
|
||||||
|
|||||||
@@ -1926,13 +1926,8 @@ void InternalInitEDBTooltipRegion( OBJECTTYPE * gpItemDescObject, UINT32 guiCurr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( gGameSettings.fOptions[TOPTION_ZOMBIES] ) // Flugente Zombies
|
//////////////////// POISON PERCENTAGE
|
||||||
{
|
MSYS_EnableRegion( &gUDBFasthelpRegions[ iFirstDataRegion + 4 ] );
|
||||||
//////////////////// POISON PERCENTAGE
|
|
||||||
{
|
|
||||||
MSYS_EnableRegion( &gUDBFasthelpRegions[ iFirstDataRegion + 4 ] );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3865,9 +3860,10 @@ void InternalInitEDBTooltipRegion( OBJECTTYPE * gpItemDescObject, UINT32 guiCurr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//#ifdef ENABLE_ZOMBIES
|
||||||
// Flugente Zombies
|
// Flugente Zombies
|
||||||
if ( gGameSettings.fOptions[TOPTION_ZOMBIES] )
|
//if ( gGameSettings.fOptions[TOPTION_ZOMBIES] )
|
||||||
{
|
//{
|
||||||
if(!cnt) cnt += 2;
|
if(!cnt) cnt += 2;
|
||||||
|
|
||||||
if (cnt >= sFirstLine && cnt < sLastLine)
|
if (cnt >= sFirstLine && cnt < sLastLine)
|
||||||
@@ -3908,7 +3904,8 @@ void InternalInitEDBTooltipRegion( OBJECTTYPE * gpItemDescObject, UINT32 guiCurr
|
|||||||
}
|
}
|
||||||
cnt++;
|
cnt++;
|
||||||
}
|
}
|
||||||
}
|
//}
|
||||||
|
//#endif
|
||||||
|
|
||||||
gubDescBoxTotalAdvLines = (UINT8)cnt;
|
gubDescBoxTotalAdvLines = (UINT8)cnt;
|
||||||
}
|
}
|
||||||
@@ -4304,13 +4301,15 @@ void DrawAmmoStats( OBJECTTYPE * gpItemDescObject )
|
|||||||
BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoAmmoIcon, 16, gItemDescGenRegions[3][0].sLeft+sOffsetX, gItemDescGenRegions[3][0].sTop+sOffsetY, VO_BLT_SRCTRANSPARENCY, NULL );
|
BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoAmmoIcon, 16, gItemDescGenRegions[3][0].sLeft+sOffsetX, gItemDescGenRegions[3][0].sTop+sOffsetY, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( gGameSettings.fOptions[TOPTION_ZOMBIES] ) // Flugente Zombies
|
//#ifdef ENABLE_ZOMBIES
|
||||||
{
|
//if ( gGameSettings.fOptions[TOPTION_ZOMBIES] ) // Flugente Zombies
|
||||||
|
//{
|
||||||
//////////////// POISON PERCENTAGE
|
//////////////// POISON PERCENTAGE
|
||||||
{
|
//{
|
||||||
BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoWH40KIcon, 6, gItemDescGenRegions[4][0].sLeft+sOffsetX, gItemDescGenRegions[4][0].sTop+sOffsetY, VO_BLT_SRCTRANSPARENCY, NULL );
|
BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoWH40KIcon, 6, gItemDescGenRegions[4][0].sLeft+sOffsetX, gItemDescGenRegions[4][0].sTop+sOffsetY, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||||
}
|
//}
|
||||||
}
|
//}
|
||||||
|
//#endif
|
||||||
|
|
||||||
DrawSecondaryStats( gpItemDescObject );
|
DrawSecondaryStats( gpItemDescObject );
|
||||||
}
|
}
|
||||||
@@ -5198,9 +5197,10 @@ void DrawAdvancedStats( OBJECTTYPE * gpItemDescObject )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//#ifdef ENABLE_ZOMBIES
|
||||||
// Flugente Zombies
|
// Flugente Zombies
|
||||||
if ( gGameSettings.fOptions[TOPTION_ZOMBIES] )
|
// if ( gGameSettings.fOptions[TOPTION_ZOMBIES] )
|
||||||
{
|
// {
|
||||||
if(!cnt) cnt += 2;
|
if(!cnt) cnt += 2;
|
||||||
|
|
||||||
++cnt; // for the new index-line
|
++cnt; // for the new index-line
|
||||||
@@ -5215,7 +5215,8 @@ void DrawAdvancedStats( OBJECTTYPE * gpItemDescObject )
|
|||||||
}
|
}
|
||||||
cnt++;
|
cnt++;
|
||||||
}
|
}
|
||||||
}
|
//}
|
||||||
|
//#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void DrawMiscStats( OBJECTTYPE * gpItemDescObject )
|
void DrawMiscStats( OBJECTTYPE * gpItemDescObject )
|
||||||
@@ -7597,8 +7598,9 @@ void DrawAmmoValues( OBJECTTYPE * gpItemDescObject, int shotsLeft )
|
|||||||
mprintf( usX, usY, pStr );
|
mprintf( usX, usY, pStr );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( gGameSettings.fOptions[TOPTION_ZOMBIES] ) // Flugente Zombies
|
//#ifdef ENABLE_ZOMBIES
|
||||||
{
|
// if ( gGameSettings.fOptions[TOPTION_ZOMBIES] ) // Flugente Zombies
|
||||||
|
// {
|
||||||
///////////////////// POISON PERCENTAGE
|
///////////////////// POISON PERCENTAGE
|
||||||
// Set line to draw into
|
// Set line to draw into
|
||||||
ubNumLine = 4;
|
ubNumLine = 4;
|
||||||
@@ -7648,7 +7650,8 @@ void DrawAmmoValues( OBJECTTYPE * gpItemDescObject, int shotsLeft )
|
|||||||
swprintf( pStr, L"%d", finalvalue );
|
swprintf( pStr, L"%d", finalvalue );
|
||||||
FindFontCenterCoordinates( sLeft, sTop, sWidth, sHeight, pStr, BLOCKFONT2, &usX, &usY);
|
FindFontCenterCoordinates( sLeft, sTop, sWidth, sHeight, pStr, BLOCKFONT2, &usX, &usY);
|
||||||
mprintf( usX, usY, pStr );
|
mprintf( usX, usY, pStr );
|
||||||
}
|
// }
|
||||||
|
//#endif
|
||||||
}
|
}
|
||||||
else if (gubDescBoxPage == 2)
|
else if (gubDescBoxPage == 2)
|
||||||
{
|
{
|
||||||
@@ -11170,8 +11173,9 @@ void DrawAdvancedValues( OBJECTTYPE *gpItemDescObject )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Flugente Zombies
|
// Flugente Zombies
|
||||||
if ( gGameSettings.fOptions[TOPTION_ZOMBIES] )
|
//#ifdef USE_ZOMBIES
|
||||||
{
|
// if ( gGameSettings.fOptions[TOPTION_ZOMBIES] )
|
||||||
|
//{
|
||||||
///////////////////////////////////////////////////// INDEXES
|
///////////////////////////////////////////////////// INDEXES
|
||||||
if(!cnt) cnt += 2;
|
if(!cnt) cnt += 2;
|
||||||
|
|
||||||
@@ -11252,7 +11256,8 @@ void DrawAdvancedValues( OBJECTTYPE *gpItemDescObject )
|
|||||||
}
|
}
|
||||||
cnt++;
|
cnt++;
|
||||||
}
|
}
|
||||||
}
|
//}
|
||||||
|
//#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void DrawMiscValues( OBJECTTYPE * gpItemDescObject )
|
void DrawMiscValues( OBJECTTYPE * gpItemDescObject )
|
||||||
|
|||||||
@@ -2211,6 +2211,7 @@ void DrawSelectedUIAboveGuy( UINT16 usSoldierID )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
if ( pSoldier->IsZombie() )
|
if ( pSoldier->IsZombie() )
|
||||||
{
|
{
|
||||||
swprintf(NameStr, pSoldier->name);
|
swprintf(NameStr, pSoldier->name);
|
||||||
@@ -2225,6 +2226,7 @@ void DrawSelectedUIAboveGuy( UINT16 usSoldierID )
|
|||||||
gprintfdirty( sX, sY, NameStr );
|
gprintfdirty( sX, sY, NameStr );
|
||||||
mprintf( sX, sY, NameStr );
|
mprintf( sX, sY, NameStr );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
//------------
|
//------------
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -847,9 +847,11 @@ void GenerateRandomEquipment( SOLDIERCREATE_STRUCT *pp, INT8 bSoldierClass, INT8
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
case SOLDIER_CLASS_ZOMBIE:
|
case SOLDIER_CLASS_ZOMBIE:
|
||||||
// zombies get no items at all...
|
// zombies get no items at all...
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( i = 0; i < pp->Inv.size(); i++ )
|
for ( i = 0; i < pp->Inv.size(); i++ )
|
||||||
@@ -1056,8 +1058,11 @@ void ChooseWeaponForSoldierCreateStruct( SOLDIERCREATE_STRUCT *pp, INT8 bWeaponC
|
|||||||
bStatus += (INT8)(HighestPlayerProgressPercentage() / 10);
|
bStatus += (INT8)(HighestPlayerProgressPercentage() / 10);
|
||||||
bStatus = (INT8)min( 100, bStatus );
|
bStatus = (INT8)min( 100, bStatus );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
case SOLDIER_CLASS_ZOMBIE:
|
case SOLDIER_CLASS_ZOMBIE:
|
||||||
bStatus = (INT8)(1); // if a zombie gets anything, it'll be broken
|
bStatus = (INT8)(1); // if a zombie gets anything, it'll be broken
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
bStatus = (INT8)(50 + Random( 51 ) );
|
bStatus = (INT8)(50 + Random( 51 ) );
|
||||||
break;
|
break;
|
||||||
@@ -2111,8 +2116,11 @@ void ChooseFaceGearForSoldierCreateStruct( SOLDIERCREATE_STRUCT *pp )
|
|||||||
break;
|
break;
|
||||||
case SOLDIER_CLASS_ADMINISTRATOR:
|
case SOLDIER_CLASS_ADMINISTRATOR:
|
||||||
case SOLDIER_CLASS_GREEN_MILITIA:
|
case SOLDIER_CLASS_GREEN_MILITIA:
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
case SOLDIER_CLASS_ZOMBIE:
|
case SOLDIER_CLASS_ZOMBIE:
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -907,8 +907,12 @@ void HandleFirstHeliDropOfGame( )
|
|||||||
{
|
{
|
||||||
// Say quote.....
|
// Say quote.....
|
||||||
SayQuoteFromAnyBodyInSector( QUOTE_ENEMY_PRESENCE );
|
SayQuoteFromAnyBodyInSector( QUOTE_ENEMY_PRESENCE );
|
||||||
|
|
||||||
// Start music
|
// Start music
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
UseCreatureMusic(HostileZombiesPresent());
|
UseCreatureMusic(HostileZombiesPresent());
|
||||||
|
#endif
|
||||||
|
|
||||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
+50
-32
@@ -6186,7 +6186,10 @@ void ExitCombatMode( )
|
|||||||
// unused
|
// unused
|
||||||
//gfForceMusicToTense = TRUE;
|
//gfForceMusicToTense = TRUE;
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
UseCreatureMusic(HostileZombiesPresent());
|
UseCreatureMusic(HostileZombiesPresent());
|
||||||
|
#endif
|
||||||
|
|
||||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||||
|
|
||||||
BetweenTurnsVisibilityAdjustments();
|
BetweenTurnsVisibilityAdjustments();
|
||||||
@@ -6245,7 +6248,11 @@ void SetEnemyPresence( )
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
UseCreatureMusic(HostileZombiesPresent());
|
UseCreatureMusic(HostileZombiesPresent());
|
||||||
|
#endif
|
||||||
|
|
||||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||||
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("SetEnemyPresence: warnings = false"));
|
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("SetEnemyPresence: warnings = false"));
|
||||||
sniperwarning = FALSE;
|
sniperwarning = FALSE;
|
||||||
@@ -6583,7 +6590,10 @@ BOOLEAN CheckForEndOfCombatMode( BOOLEAN fIncrementTurnsNotSeen )
|
|||||||
// Begin tense music....
|
// Begin tense music....
|
||||||
// unused
|
// unused
|
||||||
//gfForceMusicToTense = TRUE;
|
//gfForceMusicToTense = TRUE;
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
UseCreatureMusic(HostileZombiesPresent());
|
UseCreatureMusic(HostileZombiesPresent());
|
||||||
|
#endif
|
||||||
|
|
||||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||||
|
|
||||||
return( TRUE );
|
return( TRUE );
|
||||||
@@ -6682,8 +6692,10 @@ BOOLEAN CheckForEndOfBattle( BOOLEAN fAnEnemyRetreated )
|
|||||||
return( FALSE );
|
return( FALSE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
if ( HostileZombiesPresent() ) //Madd: got tired of the victory music playing right after the zombies arose
|
if ( HostileZombiesPresent() ) //Madd: got tired of the victory music playing right after the zombies arose
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
#endif
|
||||||
|
|
||||||
// OK, this is to releave infinate looping...becasue we can kill guys in this function
|
// OK, this is to releave infinate looping...becasue we can kill guys in this function
|
||||||
if ( gfKillingGuysForLosingBattle )
|
if ( gfKillingGuysForLosingBattle )
|
||||||
@@ -7267,25 +7279,27 @@ UINT8 NumEnemyInSector( )
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT8 NumZombiesInSector( )
|
#ifdef ENABLE_ZOMBIES
|
||||||
{
|
UINT8 NumZombiesInSector( )
|
||||||
SOLDIERTYPE *pTeamSoldier;
|
|
||||||
INT32 cnt = 0;
|
|
||||||
UINT8 ubNumZombies = 0;
|
|
||||||
|
|
||||||
for ( pTeamSoldier = Menptr, cnt = 0; cnt < TOTAL_SOLDIERS; ++pTeamSoldier, ++cnt )
|
|
||||||
{
|
{
|
||||||
if ( pTeamSoldier->bActive && pTeamSoldier->bInSector && pTeamSoldier->stats.bLife > 0 )
|
SOLDIERTYPE *pTeamSoldier;
|
||||||
|
INT32 cnt = 0;
|
||||||
|
UINT8 ubNumZombies = 0;
|
||||||
|
|
||||||
|
for ( pTeamSoldier = Menptr, cnt = 0; cnt < TOTAL_SOLDIERS; ++pTeamSoldier, ++cnt )
|
||||||
{
|
{
|
||||||
if ( pTeamSoldier->IsZombie() )
|
if ( pTeamSoldier->bActive && pTeamSoldier->bInSector && pTeamSoldier->stats.bLife > 0 )
|
||||||
{
|
{
|
||||||
++ubNumZombies;
|
if ( pTeamSoldier->IsZombie() )
|
||||||
|
{
|
||||||
|
++ubNumZombies;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return( ubNumZombies );
|
return( ubNumZombies );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
UINT8 NumEnemyInSectorExceptCreatures()
|
UINT8 NumEnemyInSectorExceptCreatures()
|
||||||
{
|
{
|
||||||
@@ -7799,9 +7813,11 @@ void HandleSuppressionFire( UINT8 ubTargetedMerc, UINT8 ubCausedAttacker )
|
|||||||
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("HandleSuppressionFire: loop = %d, numslots = %d ",uiLoop, guiNumMercSlots));
|
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("HandleSuppressionFire: loop = %d, numslots = %d ",uiLoop, guiNumMercSlots));
|
||||||
pSoldier = MercSlots[uiLoop];
|
pSoldier = MercSlots[uiLoop];
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
// Flugente: zombies do not receive any suppression at all!
|
// Flugente: zombies do not receive any suppression at all!
|
||||||
if ( pSoldier != NULL && pSoldier->IsZombie() )
|
if ( pSoldier != NULL && pSoldier->IsZombie() )
|
||||||
continue;
|
continue;
|
||||||
|
#endif
|
||||||
|
|
||||||
// Has this character received any Suppression Points since the last attack?
|
// Has this character received any Suppression Points since the last attack?
|
||||||
// HEADROCK: Suppression Points accumulate by bullets flying near the character. It includes
|
// HEADROCK: Suppression Points accumulate by bullets flying near the character. It includes
|
||||||
@@ -9286,28 +9302,30 @@ BOOLEAN HostileBloodcatsPresent( void )
|
|||||||
return( FALSE );
|
return( FALSE );
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOLEAN HostileZombiesPresent( void )
|
#ifdef ENABLE_ZOMBIES
|
||||||
{
|
BOOLEAN HostileZombiesPresent( void )
|
||||||
INT32 iLoop;
|
|
||||||
SOLDIERTYPE * pSoldier;
|
|
||||||
|
|
||||||
if ( gTacticalStatus.Team[ CREATURE_TEAM ].bTeamActive == FALSE )
|
|
||||||
{
|
{
|
||||||
|
INT32 iLoop;
|
||||||
|
SOLDIERTYPE * pSoldier;
|
||||||
|
|
||||||
|
if ( gTacticalStatus.Team[ CREATURE_TEAM ].bTeamActive == FALSE )
|
||||||
|
{
|
||||||
|
return( FALSE );
|
||||||
|
}
|
||||||
|
|
||||||
|
for ( iLoop = gTacticalStatus.Team[ CREATURE_TEAM ].bFirstID; iLoop <= gTacticalStatus.Team[ CREATURE_TEAM ].bLastID; iLoop++ )
|
||||||
|
{
|
||||||
|
pSoldier = MercPtrs[ iLoop ];
|
||||||
|
|
||||||
|
if ( pSoldier->bActive && pSoldier->bInSector && pSoldier->stats.bLife > 0 && pSoldier->IsZombie() )
|
||||||
|
{
|
||||||
|
return( TRUE );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return( FALSE );
|
return( FALSE );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
for ( iLoop = gTacticalStatus.Team[ CREATURE_TEAM ].bFirstID; iLoop <= gTacticalStatus.Team[ CREATURE_TEAM ].bLastID; iLoop++ )
|
|
||||||
{
|
|
||||||
pSoldier = MercPtrs[ iLoop ];
|
|
||||||
|
|
||||||
if ( pSoldier->bActive && pSoldier->bInSector && pSoldier->stats.bLife > 0 && pSoldier->IsZombie() )
|
|
||||||
{
|
|
||||||
return( TRUE );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return( FALSE );
|
|
||||||
}
|
|
||||||
|
|
||||||
void HandleCreatureTenseQuote( )
|
void HandleCreatureTenseQuote( )
|
||||||
{
|
{
|
||||||
|
|||||||
+9
-3
@@ -362,7 +362,10 @@ void DoPOWPathChecks( void );
|
|||||||
BOOLEAN HostileCiviliansWithGunsPresent( void );
|
BOOLEAN HostileCiviliansWithGunsPresent( void );
|
||||||
BOOLEAN HostileCiviliansPresent( void );
|
BOOLEAN HostileCiviliansPresent( void );
|
||||||
BOOLEAN HostileBloodcatsPresent( void );
|
BOOLEAN HostileBloodcatsPresent( void );
|
||||||
BOOLEAN HostileZombiesPresent( void );
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
|
BOOLEAN HostileZombiesPresent( void );
|
||||||
|
#endif
|
||||||
|
|
||||||
UINT8 NumPCsInSector( void );
|
UINT8 NumPCsInSector( void );
|
||||||
|
|
||||||
@@ -396,6 +399,9 @@ BOOLEAN WillAirRaidBeStopped( INT16 sSectorX, INT16 sSectorY );
|
|||||||
// HEADROCK HAM 3.5: Externalized for First Arrival enemy check
|
// HEADROCK HAM 3.5: Externalized for First Arrival enemy check
|
||||||
extern UINT8 NumEnemyInSector();
|
extern UINT8 NumEnemyInSector();
|
||||||
|
|
||||||
// Flugente
|
#ifdef ENABLE_ZOMBIES
|
||||||
extern UINT8 NumZombiesInSector();
|
// Flugente
|
||||||
|
extern UINT8 NumZombiesInSector();
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
+389
-377
@@ -45,7 +45,6 @@
|
|||||||
#include "Interface.h"
|
#include "Interface.h"
|
||||||
#include "Music Control.h"
|
#include "Music Control.h"
|
||||||
#include "Campaign Types.h"
|
#include "Campaign Types.h"
|
||||||
//#include "Queen Command.h"
|
|
||||||
#include "text.h" // added by Flugente
|
#include "text.h" // added by Flugente
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -584,9 +583,11 @@ INT32 AddRottingCorpse( ROTTING_CORPSE_DEFINITION *pCorpseDef )
|
|||||||
pCorpse->pAniTile->uiUserData = iIndex;
|
pCorpse->pAniTile->uiUserData = iIndex;
|
||||||
pCorpse->iID = iIndex;
|
pCorpse->iID = iIndex;
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
// copy name of corpse definition...
|
// copy name of corpse definition...
|
||||||
memcpy( &(pCorpse->name), &(pCorpseDef->name), sizeof(CHAR16) * 10 );
|
memcpy( &(pCorpse->name), &(pCorpseDef->name), sizeof(CHAR16) * 10 );
|
||||||
pCorpse->name[9] = '\0';
|
pCorpse->name[9] = '\0';
|
||||||
|
#endif
|
||||||
|
|
||||||
pCorpse->fActivated = TRUE;
|
pCorpse->fActivated = TRUE;
|
||||||
|
|
||||||
@@ -861,6 +862,7 @@ BOOLEAN TurnSoldierIntoCorpse( SOLDIERTYPE *pSoldier, BOOLEAN fRemoveMerc, BOOLE
|
|||||||
Corpse.usFlags |= ROTTING_CORPSE_USE_SNOW_CAMO_PALETTE;
|
Corpse.usFlags |= ROTTING_CORPSE_USE_SNOW_CAMO_PALETTE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
// Flugente Zombies: Determine if a zombie can rise from this corpse
|
// Flugente Zombies: Determine if a zombie can rise from this corpse
|
||||||
switch ( gGameExternalOptions.sZombieRiseBehaviour )
|
switch ( gGameExternalOptions.sZombieRiseBehaviour )
|
||||||
{
|
{
|
||||||
@@ -891,6 +893,7 @@ BOOLEAN TurnSoldierIntoCorpse( SOLDIERTYPE *pSoldier, BOOLEAN fRemoveMerc, BOOLE
|
|||||||
// Flugente: copy name of soldier...
|
// Flugente: copy name of soldier...
|
||||||
memcpy( &(Corpse.name), &(pSoldier->name), sizeof(CHAR16) * 10 );
|
memcpy( &(Corpse.name), &(pSoldier->name), sizeof(CHAR16) * 10 );
|
||||||
Corpse.name[9] = '\0';
|
Corpse.name[9] = '\0';
|
||||||
|
#endif
|
||||||
|
|
||||||
// Determine corpse type!
|
// Determine corpse type!
|
||||||
ubType = (UINT8)gubAnimSurfaceCorpseID[ pSoldier->ubBodyType][ pSoldier->usAnimState ];
|
ubType = (UINT8)gubAnimSurfaceCorpseID[ pSoldier->ubBodyType][ pSoldier->usAnimState ];
|
||||||
@@ -2085,436 +2088,445 @@ UINT8 GetNearestRottingCorpseAIWarning( INT32 sGridNo )
|
|||||||
return( ubHighestWarning );
|
return( ubHighestWarning );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Flugente Zombies: resurrect zombies
|
#ifdef ENABLE_ZOMBIES
|
||||||
void RaiseZombies( void )
|
// Flugente Zombies: resurrect zombies
|
||||||
{
|
void RaiseZombies( void )
|
||||||
if ( gGameSettings.fOptions[TOPTION_ZOMBIES] )
|
|
||||||
{
|
{
|
||||||
// if gGameExternalOptions.fZombieSpawnWaves is true, zombies will spawn from all corpses (while there is still room for more), creating a wave of zombies. with lots of bodies lying around, this can be a lot.
|
if ( gGameSettings.fOptions[TOPTION_ZOMBIES] )
|
||||||
// if GameExternalOptions.fZombieSpawnWaves is false, each zombie can spawn randomly, you will get zombies on msot turns, but they won't spawn a whole horde at once
|
|
||||||
if ( ( gGameExternalOptions.fZombieSpawnWaves && (INT8) ( Random( 100 ) ) > 100 - gGameExternalOptions.sZombieRiseWaveFrequency ) || !gGameExternalOptions.fZombieSpawnWaves )
|
|
||||||
{
|
{
|
||||||
ROTTING_CORPSE * pCorpse;
|
// if gGameExternalOptions.fZombieSpawnWaves is true, zombies will spawn from all corpses (while there is still room for more), creating a wave of zombies. with lots of bodies lying around, this can be a lot.
|
||||||
BOOLEAN zombieshaverisen = FALSE;
|
// if GameExternalOptions.fZombieSpawnWaves is false, each zombie can spawn randomly, you will get zombies on msot turns, but they won't spawn a whole horde at once
|
||||||
|
if ( ( gGameExternalOptions.fZombieSpawnWaves && (INT8) ( Random( 100 ) ) > 100 - gGameExternalOptions.sZombieRiseWaveFrequency ) || !gGameExternalOptions.fZombieSpawnWaves )
|
||||||
SECTORINFO *pSector = &SectorInfo[ SECTOR( gWorldSectorX, gWorldSectorY ) ];
|
|
||||||
|
|
||||||
for ( INT32 cnt = giNumRottingCorpse - 1; cnt >= 0; --cnt )
|
|
||||||
{
|
{
|
||||||
if ( pSector->ubNumCreatures < gGameExternalOptions.ubGameMaximumNumberOfCreatures ) // ... if there is still room for more zombies (zombies count as creatures until a separate ZOMBIE_TEAM is implemented)...
|
ROTTING_CORPSE * pCorpse;
|
||||||
|
BOOLEAN zombieshaverisen = FALSE;
|
||||||
|
|
||||||
|
SECTORINFO *pSector = &SectorInfo[ SECTOR( gWorldSectorX, gWorldSectorY ) ];
|
||||||
|
|
||||||
|
for ( INT32 cnt = giNumRottingCorpse - 1; cnt >= 0; --cnt )
|
||||||
{
|
{
|
||||||
pCorpse = &(gRottingCorpse[ cnt ] );
|
if ( pSector->ubNumCreatures < gGameExternalOptions.ubGameMaximumNumberOfCreatures ) // ... if there is still room for more zombies (zombies count as creatures until a separate ZOMBIE_TEAM is implemented)...
|
||||||
|
|
||||||
// if zombies should spawn individually, roll for every corpse individually
|
|
||||||
if ( gGameExternalOptions.fZombieSpawnWaves || ( !gGameExternalOptions.fZombieSpawnWaves && (INT8) ( Random( 100 ) ) > 100 - gGameExternalOptions.sZombieRiseWaveFrequency ) )
|
|
||||||
{
|
{
|
||||||
if ( pCorpse->fActivated && pCorpse->def.fHeadTaken == FALSE ) // ... if corpse is active, and still has a head ...
|
pCorpse = &(gRottingCorpse[ cnt ] );
|
||||||
|
|
||||||
|
// if zombies should spawn individually, roll for every corpse individually
|
||||||
|
if ( gGameExternalOptions.fZombieSpawnWaves || ( !gGameExternalOptions.fZombieSpawnWaves && (INT8) ( Random( 100 ) ) > 100 - gGameExternalOptions.sZombieRiseWaveFrequency ) )
|
||||||
{
|
{
|
||||||
if ( !(pCorpse->def.usFlags & ROTTING_CORPSE_NEVER_RISE_AGAIN) ) // ... if corpse is already that of a zombie, don't create zombie again ...
|
if ( pCorpse->fActivated && pCorpse->def.fHeadTaken == FALSE ) // ... if corpse is active, and still has a head ...
|
||||||
{
|
{
|
||||||
if ( !TileIsOutOfBounds(pCorpse->def.sGridNo) ) // ... if corpse is on existing coordinates ...
|
if ( !(pCorpse->def.usFlags & ROTTING_CORPSE_NEVER_RISE_AGAIN) ) // ... if corpse is already that of a zombie, don't create zombie again ...
|
||||||
{
|
{
|
||||||
if ( WhoIsThere2( pCorpse->def.sGridNo, pCorpse->def.bLevel ) == NOBODY ) // ... if nobody else is on that position ...
|
if ( !TileIsOutOfBounds(pCorpse->def.sGridNo) ) // ... if corpse is on existing coordinates ...
|
||||||
{
|
{
|
||||||
UINT16 recanimstate = STANDING;
|
if ( WhoIsThere2( pCorpse->def.sGridNo, pCorpse->def.bLevel ) == NOBODY ) // ... if nobody else is on that position ...
|
||||||
|
|
||||||
if ( CorpseOkToSpawnZombie( pCorpse, &recanimstate ) ) // ... a zombie can be created from this corpse, in the corresponding animstate ...
|
|
||||||
{
|
{
|
||||||
zombieshaverisen = TRUE;
|
UINT16 recanimstate = STANDING;
|
||||||
CreateZombiefromCorpse( pCorpse, recanimstate );
|
|
||||||
|
|
||||||
//++pSector->ubNumZombies;
|
if ( CorpseOkToSpawnZombie( pCorpse, &recanimstate ) ) // ... a zombie can be created from this corpse, in the corresponding animstate ...
|
||||||
//++pSector->ubZombiesInBattle;
|
{
|
||||||
|
zombieshaverisen = TRUE;
|
||||||
|
CreateZombiefromCorpse( pCorpse, recanimstate );
|
||||||
|
|
||||||
RemoveCorpse( cnt );
|
//++pSector->ubNumZombies;
|
||||||
|
//++pSector->ubZombiesInBattle;
|
||||||
|
|
||||||
|
RemoveCorpse( cnt );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// if there is no more room, we can skip this
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
if ( zombieshaverisen )
|
||||||
{
|
{
|
||||||
// if there is no more room, we can skip this
|
SetRenderFlags( RENDER_FLAG_FULL );
|
||||||
break;
|
|
||||||
|
#ifdef JA2TESTVERSION
|
||||||
|
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_BETAVERSION, L"A wave of zombies is created");
|
||||||
|
#endif
|
||||||
|
// Play sound
|
||||||
|
PlayJA2SampleFromFile( "Sounds\\zombie1.wav", RATE_11025, HIGHVOLUME, 1, MIDDLEPAN );
|
||||||
|
|
||||||
|
UseCreatureMusic(TRUE); // Madd: music when zombies rise
|
||||||
|
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( zombieshaverisen )
|
|
||||||
{
|
|
||||||
SetRenderFlags( RENDER_FLAG_FULL );
|
|
||||||
|
|
||||||
#ifdef JA2TESTVERSION
|
|
||||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_BETAVERSION, L"A wave of zombies is created");
|
|
||||||
#endif
|
|
||||||
// Play sound
|
|
||||||
PlayJA2SampleFromFile( "Sounds\\zombie1.wav", RATE_11025, HIGHVOLUME, 1, MIDDLEPAN );
|
|
||||||
|
|
||||||
UseCreatureMusic(TRUE); // Madd: music when zombies rise
|
|
||||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Flugente Zombies 1.0: create a zombie from a corpse
|
// Flugente Zombies 1.0: create a zombie from a corpse
|
||||||
void CreateZombiefromCorpse( ROTTING_CORPSE * pCorpse, UINT16 usAnimState )
|
void CreateZombiefromCorpse( ROTTING_CORPSE * pCorpse, UINT16 usAnimState )
|
||||||
{
|
|
||||||
SOLDIERCREATE_STRUCT MercCreateStruct;
|
|
||||||
|
|
||||||
MercCreateStruct.ubProfile = NO_PROFILE;
|
|
||||||
MercCreateStruct.bTeam = CREATURE_TEAM; // should be ZOMBIE_TEAM, once that is properly implemented
|
|
||||||
MercCreateStruct.sInsertionGridNo = pCorpse->def.sGridNo;
|
|
||||||
MercCreateStruct.sSectorX = gWorldSectorX;
|
|
||||||
MercCreateStruct.sSectorY = gWorldSectorY;
|
|
||||||
MercCreateStruct.bSectorZ = gbWorldSectorZ;
|
|
||||||
MercCreateStruct.bBodyType = pCorpse->def.ubBodyType;
|
|
||||||
MercCreateStruct.ubDirection = pCorpse->def.ubDirection;
|
|
||||||
MercCreateStruct.fOnRoof = pCorpse->def.bLevel > 0 ? TRUE : FALSE;
|
|
||||||
|
|
||||||
// add important stats according to difficulty level
|
|
||||||
// bLife is actually lower than bLifeMax. Because zombies have poison absorption, they can and will heal themselves over time, thereby gaining more life if they are not put down fast
|
|
||||||
switch( gGameExternalOptions.sZombieDifficultyLevel )
|
|
||||||
{
|
{
|
||||||
case 4:
|
SOLDIERCREATE_STRUCT MercCreateStruct;
|
||||||
MercCreateStruct.bLifeMax = (INT8)( 70 + Random( 30 ) );
|
|
||||||
MercCreateStruct.bLife = MercCreateStruct.bLifeMax - (INT8)(10 + Random(15));
|
|
||||||
MercCreateStruct.bAgility = (INT8)( 50 + Random( 10 ) );
|
|
||||||
MercCreateStruct.bDexterity = (INT8)( 60 + Random( 15 ) );
|
|
||||||
MercCreateStruct.bStrength = (INT8)( 80 + Random( 20 ) );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 3:
|
MercCreateStruct.ubProfile = NO_PROFILE;
|
||||||
MercCreateStruct.bLifeMax = (INT8)( 60 + Random( 20 ) );
|
MercCreateStruct.bTeam = CREATURE_TEAM; // should be ZOMBIE_TEAM, once that is properly implemented
|
||||||
MercCreateStruct.bLife = MercCreateStruct.bLifeMax - (INT8)(10 + Random(10));
|
MercCreateStruct.sInsertionGridNo = pCorpse->def.sGridNo;
|
||||||
MercCreateStruct.bAgility = (INT8)( 40 + Random( 10 ) );
|
MercCreateStruct.sSectorX = gWorldSectorX;
|
||||||
MercCreateStruct.bDexterity = (INT8)( 45 + Random( 10 ) );
|
MercCreateStruct.sSectorY = gWorldSectorY;
|
||||||
MercCreateStruct.bStrength = (INT8)( 60 + Random( 20 ) );
|
MercCreateStruct.bSectorZ = gbWorldSectorZ;
|
||||||
break;
|
MercCreateStruct.bBodyType = pCorpse->def.ubBodyType;
|
||||||
|
MercCreateStruct.ubDirection = pCorpse->def.ubDirection;
|
||||||
|
MercCreateStruct.fOnRoof = pCorpse->def.bLevel > 0 ? TRUE : FALSE;
|
||||||
|
|
||||||
case 2:
|
// add important stats according to difficulty level
|
||||||
MercCreateStruct.bLifeMax = (INT8)( 45 + Random( 15 ) );
|
// bLife is actually lower than bLifeMax. Because zombies have poison absorption, they can and will heal themselves over time, thereby gaining more life if they are not put down fast
|
||||||
MercCreateStruct.bLife = MercCreateStruct.bLifeMax - (INT8)(5 + Random(10));
|
|
||||||
MercCreateStruct.bAgility = (INT8)( 30 + Random( 5 ) );
|
|
||||||
MercCreateStruct.bDexterity = (INT8)( 30 + Random( 10 ) );
|
|
||||||
MercCreateStruct.bStrength = (INT8)( 45 + Random( 20 ) );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
default:
|
|
||||||
MercCreateStruct.bLifeMax = (INT8)( 35 + Random( 10 ) );
|
|
||||||
MercCreateStruct.bLife = MercCreateStruct.bLifeMax - (INT8)(5 + Random(5));
|
|
||||||
MercCreateStruct.bAgility = (INT8)( 15 + Random( 5 ) );
|
|
||||||
MercCreateStruct.bDexterity = (INT8)( 15 + Random( 5 ) );
|
|
||||||
MercCreateStruct.bStrength = (INT8)( 30 + Random( 20 ) );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// FIX: something's wrong with the FATCIV-bodytype when dying... this is to ensure they die absolutely fast
|
|
||||||
//if ( MercCreateStruct.bBodyType == FATCIV )
|
|
||||||
//MercCreateStruct.bLifeMax = OKLIFE;
|
|
||||||
|
|
||||||
MercCreateStruct.bExpLevel = 1;
|
|
||||||
MercCreateStruct.bMarksmanship = 1;
|
|
||||||
MercCreateStruct.bMedical = 1;
|
|
||||||
MercCreateStruct.bMechanical = 1;
|
|
||||||
MercCreateStruct.bExplosive = 1;
|
|
||||||
MercCreateStruct.bLeadership = 1;
|
|
||||||
MercCreateStruct.bWisdom = 1;
|
|
||||||
MercCreateStruct.bMorale = 90;
|
|
||||||
MercCreateStruct.bAIMorale = MORALE_FEARLESS;
|
|
||||||
|
|
||||||
SET_PALETTEREP_ID ( MercCreateStruct.HeadPal, pCorpse->def.HeadPal );
|
|
||||||
SET_PALETTEREP_ID ( MercCreateStruct.PantsPal, pCorpse->def.PantsPal );
|
|
||||||
SET_PALETTEREP_ID ( MercCreateStruct.VestPal, pCorpse->def.VestPal );
|
|
||||||
SET_PALETTEREP_ID ( MercCreateStruct.SkinPal, pCorpse->def.SkinPal );
|
|
||||||
|
|
||||||
MercCreateStruct.fVisible = TRUE;
|
|
||||||
|
|
||||||
INT8 iNewIndex;
|
|
||||||
if ( TacticalCreateSoldier( &MercCreateStruct, (UINT8 *)&iNewIndex ) )
|
|
||||||
{
|
|
||||||
/* certain values have to be set afterwards - the alternative would be to edit each and every function that gets called from TacticalCreateSoldier() subsequently and
|
|
||||||
* make an exception for zombies every time...
|
|
||||||
*/
|
|
||||||
SOLDIERTYPE* pNewSoldier = MercPtrs[ (UINT8)iNewIndex ];
|
|
||||||
|
|
||||||
pNewSoldier->bActionPoints = 60;
|
|
||||||
pNewSoldier->bInitialActionPoints = 60;
|
|
||||||
pNewSoldier->sBreathRed = 0;
|
|
||||||
|
|
||||||
pNewSoldier->ubInsertionDirection = pCorpse->def.ubDirection;
|
|
||||||
|
|
||||||
//pNewSoldier->sHeightAdjustment = pCorpse->def.sHeightAdjustment;
|
|
||||||
pNewSoldier->sDesiredHeight = 3;
|
|
||||||
|
|
||||||
pNewSoldier->ubDesiredHeight = 3; // this forces pNewSoldier to rise up to crouching position
|
|
||||||
|
|
||||||
pNewSoldier->ubSoldierClass = SOLDIER_CLASS_ZOMBIE;
|
|
||||||
pNewSoldier->aiData.bOrders = SEEKENEMY;
|
|
||||||
pNewSoldier->aiData.bAttitude = AGGRESSIVE;
|
|
||||||
|
|
||||||
////////////// stuff for poisoning ///////////////////////////////////
|
|
||||||
// this is important - by declaring the gap between bLife and bLifeMax as bBleeding, the zombies will bleed (even more if they are damaged)
|
|
||||||
// all their lifepoints are also poisoned. Thereby all bleeding damage will be poisoned bleeding damage
|
|
||||||
// as they have bPoisonAbsorption of at least 200%, they will absorp this poison damage
|
|
||||||
// This leads to them GAINING life through bleeding
|
|
||||||
// They can thereby regain their health in battle (although not very fast)
|
|
||||||
pNewSoldier->bBleeding = pNewSoldier->stats.bLifeMax - pNewSoldier->stats.bLife;
|
|
||||||
|
|
||||||
pNewSoldier->bPoisonSum = pNewSoldier->stats.bLifeMax;
|
|
||||||
pNewSoldier->bPoisonLife = pNewSoldier->stats.bLife;
|
|
||||||
pNewSoldier->bPoisonBleeding = pNewSoldier->bPoisonSum - pNewSoldier->bPoisonLife;
|
|
||||||
// zombies get 200% poison absorption, but no resistance to it, as it would reduce their healing
|
|
||||||
pNewSoldier->bPoisonResistance = 0;
|
|
||||||
pNewSoldier->bPoisonAbsorption = 200 + Random(100);
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
if ( !memcmp( pCorpse->name, TacticalStr[ CIV_TEAM_MINER_NAME ], sizeof(pCorpse->name) )
|
|
||||||
|| !memcmp( pCorpse->name, TacticalStr[ MILITIA_TEAM_MERC_NAME ], sizeof(pCorpse->name) )
|
|
||||||
|| !memcmp( pCorpse->name, TacticalStr[ CREATURE_TEAM_MERC_NAME ], sizeof(pCorpse->name) )
|
|
||||||
|| !memcmp( pCorpse->name, TacticalStr[ CIV_TEAM_MERC_NAME ], sizeof(pCorpse->name) )
|
|
||||||
|| !memcmp( pCorpse->name, TacticalStr[ ZOMBIE_TEAM_MERC_NAME ], sizeof(pCorpse->name) )
|
|
||||||
|| !memcmp( pCorpse->name, TacticalStr[ ENEMY_TEAM_MERC_NAME ], sizeof(pCorpse->name) ) )
|
|
||||||
{
|
|
||||||
swprintf( pNewSoldier->name, TacticalStr[ ZOMBIE_TEAM_MERC_NAME ] );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
memcpy( &(pNewSoldier->name), &(pCorpse->name), sizeof(CHAR16) * 10 );
|
|
||||||
pNewSoldier->name[9] = '\0';
|
|
||||||
}
|
|
||||||
|
|
||||||
// add skills according to difficulty level
|
|
||||||
switch( gGameExternalOptions.sZombieDifficultyLevel )
|
switch( gGameExternalOptions.sZombieDifficultyLevel )
|
||||||
{
|
{
|
||||||
case 4:
|
case 4:
|
||||||
if ( gGameOptions.fNewTraitSystem )
|
MercCreateStruct.bLifeMax = (INT8)( 70 + Random( 30 ) );
|
||||||
{
|
MercCreateStruct.bLife = MercCreateStruct.bLifeMax - (INT8)(10 + Random(15));
|
||||||
pNewSoldier->stats.ubSkillTraits[0] = MARTIAL_ARTS_NT;
|
MercCreateStruct.bAgility = (INT8)( 50 + Random( 10 ) );
|
||||||
pNewSoldier->stats.ubSkillTraits[1] = MARTIAL_ARTS_NT;
|
MercCreateStruct.bDexterity = (INT8)( 60 + Random( 15 ) );
|
||||||
pNewSoldier->stats.ubSkillTraits[2] = ATHLETICS_NT;
|
MercCreateStruct.bStrength = (INT8)( 80 + Random( 20 ) );
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pNewSoldier->stats.ubSkillTraits[0] = HANDTOHAND_OT;
|
|
||||||
pNewSoldier->stats.ubSkillTraits[1] = MARTIALARTS_OT;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
if ( gGameOptions.fNewTraitSystem )
|
MercCreateStruct.bLifeMax = (INT8)( 60 + Random( 20 ) );
|
||||||
{
|
MercCreateStruct.bLife = MercCreateStruct.bLifeMax - (INT8)(10 + Random(10));
|
||||||
pNewSoldier->stats.ubSkillTraits[0] = MARTIAL_ARTS_NT;
|
MercCreateStruct.bAgility = (INT8)( 40 + Random( 10 ) );
|
||||||
pNewSoldier->stats.ubSkillTraits[1] = ATHLETICS_NT;
|
MercCreateStruct.bDexterity = (INT8)( 45 + Random( 10 ) );
|
||||||
pNewSoldier->stats.ubSkillTraits[2] = NO_SKILLTRAIT_NT;
|
MercCreateStruct.bStrength = (INT8)( 60 + Random( 20 ) );
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pNewSoldier->stats.ubSkillTraits[0] = HANDTOHAND_OT;
|
|
||||||
pNewSoldier->stats.ubSkillTraits[1] = NO_SKILLTRAIT_OT;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
if ( gGameOptions.fNewTraitSystem )
|
MercCreateStruct.bLifeMax = (INT8)( 45 + Random( 15 ) );
|
||||||
{
|
MercCreateStruct.bLife = MercCreateStruct.bLifeMax - (INT8)(5 + Random(10));
|
||||||
pNewSoldier->stats.ubSkillTraits[0] = MARTIAL_ARTS_NT;
|
MercCreateStruct.bAgility = (INT8)( 30 + Random( 5 ) );
|
||||||
pNewSoldier->stats.ubSkillTraits[1] = NO_SKILLTRAIT_NT;
|
MercCreateStruct.bDexterity = (INT8)( 30 + Random( 10 ) );
|
||||||
pNewSoldier->stats.ubSkillTraits[2] = NO_SKILLTRAIT_NT;
|
MercCreateStruct.bStrength = (INT8)( 45 + Random( 20 ) );
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pNewSoldier->stats.ubSkillTraits[0] = NO_SKILLTRAIT_OT;
|
|
||||||
pNewSoldier->stats.ubSkillTraits[1] = NO_SKILLTRAIT_OT;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
default:
|
default:
|
||||||
if ( gGameOptions.fNewTraitSystem )
|
MercCreateStruct.bLifeMax = (INT8)( 35 + Random( 10 ) );
|
||||||
{
|
MercCreateStruct.bLife = MercCreateStruct.bLifeMax - (INT8)(5 + Random(5));
|
||||||
pNewSoldier->stats.ubSkillTraits[0] = NO_SKILLTRAIT_NT;
|
MercCreateStruct.bAgility = (INT8)( 15 + Random( 5 ) );
|
||||||
pNewSoldier->stats.ubSkillTraits[1] = NO_SKILLTRAIT_NT;
|
MercCreateStruct.bDexterity = (INT8)( 15 + Random( 5 ) );
|
||||||
pNewSoldier->stats.ubSkillTraits[2] = NO_SKILLTRAIT_NT;
|
MercCreateStruct.bStrength = (INT8)( 30 + Random( 20 ) );
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pNewSoldier->stats.ubSkillTraits[0] = NO_SKILLTRAIT_OT;
|
|
||||||
pNewSoldier->stats.ubSkillTraits[1] = NO_SKILLTRAIT_OT;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
AddSoldierToSectorNoCalculateDirectionUseAnimation( iNewIndex, usAnimState, 0 );
|
// FIX: something's wrong with the FATCIV-bodytype when dying... this is to ensure they die absolutely fast
|
||||||
|
//if ( MercCreateStruct.bBodyType == FATCIV )
|
||||||
|
//MercCreateStruct.bLifeMax = OKLIFE;
|
||||||
|
|
||||||
// If this corpse has camo, use palette from hvobject
|
MercCreateStruct.bExpLevel = 1;
|
||||||
if ( pCorpse->def.ubType == ROTTING_STAGE2 )
|
MercCreateStruct.bMarksmanship = 1;
|
||||||
{
|
MercCreateStruct.bMedical = 1;
|
||||||
memcpy( pNewSoldier->p8BPPPalette, gpTileCache[ pCorpse->iCachedTileID ].pImagery->vo->pPaletteEntry, sizeof( pCorpse->p8BPPPalette ) * 256 );
|
MercCreateStruct.bMechanical = 1;
|
||||||
}
|
MercCreateStruct.bExplosive = 1;
|
||||||
else if ( pCorpse->def.usFlags & ROTTING_CORPSE_USE_CAMO_PALETTE )
|
MercCreateStruct.bLeadership = 1;
|
||||||
{
|
MercCreateStruct.bWisdom = 1;
|
||||||
pNewSoldier->bCamo = 60;
|
MercCreateStruct.bMorale = 90;
|
||||||
pNewSoldier->wornCamo = 60;
|
MercCreateStruct.bAIMorale = MORALE_FEARLESS;
|
||||||
}
|
|
||||||
else if ( pCorpse->def.usFlags & ROTTING_CORPSE_USE_URBAN_CAMO_PALETTE )
|
|
||||||
{
|
|
||||||
pNewSoldier->urbanCamo = 60;
|
|
||||||
pNewSoldier->wornUrbanCamo = 60;
|
|
||||||
}
|
|
||||||
else if ( pCorpse->def.usFlags & ROTTING_CORPSE_USE_DESERT_CAMO_PALETTE )
|
|
||||||
{
|
|
||||||
pNewSoldier->desertCamo = 60;
|
|
||||||
pNewSoldier->wornDesertCamo = 60;
|
|
||||||
}
|
|
||||||
else if ( pCorpse->def.usFlags & ROTTING_CORPSE_USE_SNOW_CAMO_PALETTE )
|
|
||||||
{
|
|
||||||
pNewSoldier->snowCamo = 60;
|
|
||||||
pNewSoldier->wornSnowCamo = 60;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Reload palettes....
|
SET_PALETTEREP_ID ( MercCreateStruct.HeadPal, pCorpse->def.HeadPal );
|
||||||
if ( pNewSoldier->bInSector )
|
SET_PALETTEREP_ID ( MercCreateStruct.PantsPal, pCorpse->def.PantsPal );
|
||||||
|
SET_PALETTEREP_ID ( MercCreateStruct.VestPal, pCorpse->def.VestPal );
|
||||||
|
SET_PALETTEREP_ID ( MercCreateStruct.SkinPal, pCorpse->def.SkinPal );
|
||||||
|
|
||||||
|
MercCreateStruct.fVisible = TRUE;
|
||||||
|
|
||||||
|
INT8 iNewIndex;
|
||||||
|
if ( TacticalCreateSoldier( &MercCreateStruct, (UINT8 *)&iNewIndex ) )
|
||||||
{
|
{
|
||||||
pNewSoldier->CreateSoldierPalettes( );
|
/* certain values have to be set afterwards - the alternative would be to edit each and every function that gets called from TacticalCreateSoldier() subsequently and
|
||||||
}
|
* make an exception for zombies every time...
|
||||||
|
*/
|
||||||
|
SOLDIERTYPE* pNewSoldier = MercPtrs[ (UINT8)iNewIndex ];
|
||||||
|
|
||||||
// Set a pending animation to change stance first...
|
pNewSoldier->bActionPoints = 60;
|
||||||
//SendChangeSoldierStanceEvent( pNewSoldier, ANIM_CROUCH );
|
pNewSoldier->bInitialActionPoints = 60;
|
||||||
|
pNewSoldier->sBreathRed = 0;
|
||||||
|
|
||||||
// search for armour and equip if found
|
pNewSoldier->ubInsertionDirection = pCorpse->def.ubDirection;
|
||||||
if ( gGameExternalOptions.fZombieRiseWithArmour )
|
|
||||||
{
|
|
||||||
BOOLEAN fHelmetFound = FALSE;
|
|
||||||
BOOLEAN fVestFound = FALSE;
|
|
||||||
BOOLEAN fPantsFound = FALSE;
|
|
||||||
|
|
||||||
ITEM_POOL * pItemPool, * pItemPoolNext;
|
//pNewSoldier->sHeightAdjustment = pCorpse->def.sHeightAdjustment;
|
||||||
|
pNewSoldier->sDesiredHeight = 3;
|
||||||
|
|
||||||
GetItemPool( pCorpse->def.sGridNo, &pItemPool, pCorpse->def.bLevel );
|
pNewSoldier->ubDesiredHeight = 3; // this forces pNewSoldier to rise up to crouching position
|
||||||
|
|
||||||
while( pItemPool && ( !fHelmetFound || !fVestFound ||!fPantsFound ) )
|
pNewSoldier->ubSoldierClass = SOLDIER_CLASS_ZOMBIE;
|
||||||
|
pNewSoldier->aiData.bOrders = SEEKENEMY;
|
||||||
|
pNewSoldier->aiData.bAttitude = AGGRESSIVE;
|
||||||
|
|
||||||
|
////////////// stuff for poisoning ///////////////////////////////////
|
||||||
|
// this is important - by declaring the gap between bLife and bLifeMax as bBleeding, the zombies will bleed (even more if they are damaged)
|
||||||
|
// all their lifepoints are also poisoned. Thereby all bleeding damage will be poisoned bleeding damage
|
||||||
|
// as they have bPoisonAbsorption of at least 200%, they will absorp this poison damage
|
||||||
|
// This leads to them GAINING life through bleeding
|
||||||
|
// They can thereby regain their health in battle (although not very fast)
|
||||||
|
pNewSoldier->bBleeding = pNewSoldier->stats.bLifeMax - pNewSoldier->stats.bLife;
|
||||||
|
|
||||||
|
pNewSoldier->bPoisonSum = pNewSoldier->stats.bLifeMax;
|
||||||
|
pNewSoldier->bPoisonLife = pNewSoldier->stats.bLife;
|
||||||
|
pNewSoldier->bPoisonBleeding = pNewSoldier->bPoisonSum - pNewSoldier->bPoisonLife;
|
||||||
|
// zombies get 200% poison absorption, but no resistance to it, as it would reduce their healing
|
||||||
|
pNewSoldier->bPoisonResistance = 0;
|
||||||
|
pNewSoldier->bPoisonAbsorption = 200 + Random(100);
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
|
if ( !memcmp( pCorpse->name, TacticalStr[ CIV_TEAM_MINER_NAME ], sizeof(pCorpse->name) )
|
||||||
|
|| !memcmp( pCorpse->name, TacticalStr[ MILITIA_TEAM_MERC_NAME ], sizeof(pCorpse->name) )
|
||||||
|
|| !memcmp( pCorpse->name, TacticalStr[ CREATURE_TEAM_MERC_NAME ], sizeof(pCorpse->name) )
|
||||||
|
|| !memcmp( pCorpse->name, TacticalStr[ CIV_TEAM_MERC_NAME ], sizeof(pCorpse->name) )
|
||||||
|
|| !memcmp( pCorpse->name, TacticalStr[ ZOMBIE_TEAM_MERC_NAME ], sizeof(pCorpse->name) )
|
||||||
|
|| !memcmp( pCorpse->name, TacticalStr[ ENEMY_TEAM_MERC_NAME ], sizeof(pCorpse->name) ) )
|
||||||
{
|
{
|
||||||
pItemPoolNext = pItemPool->pNext;
|
swprintf( pNewSoldier->name, TacticalStr[ ZOMBIE_TEAM_MERC_NAME ] );
|
||||||
|
|
||||||
OBJECTTYPE* pObj = &(gWorldItems[ pItemPool->iItemIndex ].object);
|
|
||||||
|
|
||||||
if ( Item[ pObj->usItem ].usItemClass == IC_ARMOUR )
|
|
||||||
{
|
|
||||||
switch (Armour[Item[pObj->usItem].ubClassIndex].ubArmourClass)
|
|
||||||
{
|
|
||||||
case ARMOURCLASS_HELMET:
|
|
||||||
{
|
|
||||||
if( !fHelmetFound && AutoPlaceObject(pNewSoldier, pObj, FALSE))
|
|
||||||
{
|
|
||||||
// remove item from the ground
|
|
||||||
RemoveItemFromPool( pCorpse->def.sGridNo, pItemPool->iItemIndex, pCorpse->def.bLevel );
|
|
||||||
fHelmetFound = TRUE;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case ARMOURCLASS_VEST:
|
|
||||||
{
|
|
||||||
if( !fVestFound && AutoPlaceObject(pNewSoldier, pObj, FALSE))
|
|
||||||
{
|
|
||||||
// remove item from the ground
|
|
||||||
RemoveItemFromPool( pCorpse->def.sGridNo, pItemPool->iItemIndex, pCorpse->def.bLevel );
|
|
||||||
fVestFound = TRUE;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case ARMOURCLASS_LEGGINGS:
|
|
||||||
{
|
|
||||||
if( !fPantsFound && AutoPlaceObject(pNewSoldier, pObj, FALSE))
|
|
||||||
{
|
|
||||||
// remove item from the ground
|
|
||||||
RemoveItemFromPool( pCorpse->def.sGridNo, pItemPool->iItemIndex, pCorpse->def.bLevel );
|
|
||||||
fPantsFound = TRUE;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pItemPool = pItemPoolNext;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
memcpy( &(pNewSoldier->name), &(pCorpse->name), sizeof(CHAR16) * 10 );
|
||||||
|
pNewSoldier->name[9] = '\0';
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
memcpy( &(pNewSoldier->name), &(pCorpse->name), sizeof(CHAR16) * 10 );
|
||||||
|
pNewSoldier->name[9] = '\0';
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// add skills according to difficulty level
|
||||||
|
switch( gGameExternalOptions.sZombieDifficultyLevel )
|
||||||
|
{
|
||||||
|
case 4:
|
||||||
|
if ( gGameOptions.fNewTraitSystem )
|
||||||
|
{
|
||||||
|
pNewSoldier->stats.ubSkillTraits[0] = MARTIAL_ARTS_NT;
|
||||||
|
pNewSoldier->stats.ubSkillTraits[1] = MARTIAL_ARTS_NT;
|
||||||
|
pNewSoldier->stats.ubSkillTraits[2] = ATHLETICS_NT;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pNewSoldier->stats.ubSkillTraits[0] = HANDTOHAND_OT;
|
||||||
|
pNewSoldier->stats.ubSkillTraits[1] = MARTIALARTS_OT;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
if ( gGameOptions.fNewTraitSystem )
|
||||||
|
{
|
||||||
|
pNewSoldier->stats.ubSkillTraits[0] = MARTIAL_ARTS_NT;
|
||||||
|
pNewSoldier->stats.ubSkillTraits[1] = ATHLETICS_NT;
|
||||||
|
pNewSoldier->stats.ubSkillTraits[2] = NO_SKILLTRAIT_NT;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pNewSoldier->stats.ubSkillTraits[0] = HANDTOHAND_OT;
|
||||||
|
pNewSoldier->stats.ubSkillTraits[1] = NO_SKILLTRAIT_OT;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
if ( gGameOptions.fNewTraitSystem )
|
||||||
|
{
|
||||||
|
pNewSoldier->stats.ubSkillTraits[0] = MARTIAL_ARTS_NT;
|
||||||
|
pNewSoldier->stats.ubSkillTraits[1] = NO_SKILLTRAIT_NT;
|
||||||
|
pNewSoldier->stats.ubSkillTraits[2] = NO_SKILLTRAIT_NT;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pNewSoldier->stats.ubSkillTraits[0] = NO_SKILLTRAIT_OT;
|
||||||
|
pNewSoldier->stats.ubSkillTraits[1] = NO_SKILLTRAIT_OT;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
default:
|
||||||
|
if ( gGameOptions.fNewTraitSystem )
|
||||||
|
{
|
||||||
|
pNewSoldier->stats.ubSkillTraits[0] = NO_SKILLTRAIT_NT;
|
||||||
|
pNewSoldier->stats.ubSkillTraits[1] = NO_SKILLTRAIT_NT;
|
||||||
|
pNewSoldier->stats.ubSkillTraits[2] = NO_SKILLTRAIT_NT;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pNewSoldier->stats.ubSkillTraits[0] = NO_SKILLTRAIT_OT;
|
||||||
|
pNewSoldier->stats.ubSkillTraits[1] = NO_SKILLTRAIT_OT;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
AddSoldierToSectorNoCalculateDirectionUseAnimation( iNewIndex, usAnimState, 0 );
|
||||||
|
|
||||||
|
// If this corpse has camo, use palette from hvobject
|
||||||
|
if ( pCorpse->def.ubType == ROTTING_STAGE2 )
|
||||||
|
{
|
||||||
|
memcpy( pNewSoldier->p8BPPPalette, gpTileCache[ pCorpse->iCachedTileID ].pImagery->vo->pPaletteEntry, sizeof( pCorpse->p8BPPPalette ) * 256 );
|
||||||
|
}
|
||||||
|
else if ( pCorpse->def.usFlags & ROTTING_CORPSE_USE_CAMO_PALETTE )
|
||||||
|
{
|
||||||
|
pNewSoldier->bCamo = 60;
|
||||||
|
pNewSoldier->wornCamo = 60;
|
||||||
|
}
|
||||||
|
else if ( pCorpse->def.usFlags & ROTTING_CORPSE_USE_URBAN_CAMO_PALETTE )
|
||||||
|
{
|
||||||
|
pNewSoldier->urbanCamo = 60;
|
||||||
|
pNewSoldier->wornUrbanCamo = 60;
|
||||||
|
}
|
||||||
|
else if ( pCorpse->def.usFlags & ROTTING_CORPSE_USE_DESERT_CAMO_PALETTE )
|
||||||
|
{
|
||||||
|
pNewSoldier->desertCamo = 60;
|
||||||
|
pNewSoldier->wornDesertCamo = 60;
|
||||||
|
}
|
||||||
|
else if ( pCorpse->def.usFlags & ROTTING_CORPSE_USE_SNOW_CAMO_PALETTE )
|
||||||
|
{
|
||||||
|
pNewSoldier->snowCamo = 60;
|
||||||
|
pNewSoldier->wornSnowCamo = 60;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reload palettes....
|
||||||
|
if ( pNewSoldier->bInSector )
|
||||||
|
{
|
||||||
|
pNewSoldier->CreateSoldierPalettes( );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set a pending animation to change stance first...
|
||||||
|
//SendChangeSoldierStanceEvent( pNewSoldier, ANIM_CROUCH );
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
|
// search for armour and equip if found
|
||||||
|
if ( gGameExternalOptions.fZombieRiseWithArmour )
|
||||||
|
{
|
||||||
|
BOOLEAN fHelmetFound = FALSE;
|
||||||
|
BOOLEAN fVestFound = FALSE;
|
||||||
|
BOOLEAN fPantsFound = FALSE;
|
||||||
|
|
||||||
|
ITEM_POOL * pItemPool, * pItemPoolNext;
|
||||||
|
|
||||||
|
GetItemPool( pCorpse->def.sGridNo, &pItemPool, pCorpse->def.bLevel );
|
||||||
|
|
||||||
|
while( pItemPool && ( !fHelmetFound || !fVestFound ||!fPantsFound ) )
|
||||||
|
{
|
||||||
|
pItemPoolNext = pItemPool->pNext;
|
||||||
|
|
||||||
|
OBJECTTYPE* pObj = &(gWorldItems[ pItemPool->iItemIndex ].object);
|
||||||
|
|
||||||
|
if ( Item[ pObj->usItem ].usItemClass == IC_ARMOUR )
|
||||||
|
{
|
||||||
|
switch (Armour[Item[pObj->usItem].ubClassIndex].ubArmourClass)
|
||||||
|
{
|
||||||
|
case ARMOURCLASS_HELMET:
|
||||||
|
{
|
||||||
|
if( !fHelmetFound && AutoPlaceObject(pNewSoldier, pObj, FALSE))
|
||||||
|
{
|
||||||
|
// remove item from the ground
|
||||||
|
RemoveItemFromPool( pCorpse->def.sGridNo, pItemPool->iItemIndex, pCorpse->def.bLevel );
|
||||||
|
fHelmetFound = TRUE;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case ARMOURCLASS_VEST:
|
||||||
|
{
|
||||||
|
if( !fVestFound && AutoPlaceObject(pNewSoldier, pObj, FALSE))
|
||||||
|
{
|
||||||
|
// remove item from the ground
|
||||||
|
RemoveItemFromPool( pCorpse->def.sGridNo, pItemPool->iItemIndex, pCorpse->def.bLevel );
|
||||||
|
fVestFound = TRUE;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case ARMOURCLASS_LEGGINGS:
|
||||||
|
{
|
||||||
|
if( !fPantsFound && AutoPlaceObject(pNewSoldier, pObj, FALSE))
|
||||||
|
{
|
||||||
|
// remove item from the ground
|
||||||
|
RemoveItemFromPool( pCorpse->def.sGridNo, pItemPool->iItemIndex, pCorpse->def.bLevel );
|
||||||
|
fPantsFound = TRUE;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pItemPool = pItemPoolNext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Change to standing,unless we can getup with an animation
|
||||||
|
pNewSoldier->EVENT_InitNewSoldierAnim( STANDING, 0, TRUE );
|
||||||
|
pNewSoldier->BeginSoldierGetup( );
|
||||||
|
|
||||||
|
// So we can see them!
|
||||||
|
AllTeamsLookForAll(ALLOW_INTERRUPTS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Flugente Zombies: returns true if a zombie can be raised from this corpse, and returns the correct pAnimState for the new zombie
|
||||||
|
BOOLEAN CorpseOkToSpawnZombie( ROTTING_CORPSE * pCorpse, UINT16* pAnimState )
|
||||||
|
{
|
||||||
|
BOOLEAN canbezombie = FALSE;
|
||||||
|
*pAnimState = FALLBACKHIT_STOP;
|
||||||
|
|
||||||
|
switch ( pCorpse->def.ubType )
|
||||||
|
{
|
||||||
|
case SMERC_BCK:
|
||||||
|
case SMERC_DHD:
|
||||||
|
case SMERC_FALL:
|
||||||
|
case MMERC_BCK:
|
||||||
|
case MMERC_DHD:
|
||||||
|
case MMERC_FALL:
|
||||||
|
case FMERC_BCK:
|
||||||
|
case FMERC_DHD:
|
||||||
|
case FMERC_FALL:
|
||||||
|
case ROTTING_STAGE2:
|
||||||
|
canbezombie = TRUE;
|
||||||
|
*pAnimState = FALLBACKHIT_STOP;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SMERC_FWD:
|
||||||
|
case SMERC_PRN:
|
||||||
|
case SMERC_FALLF:
|
||||||
|
case MMERC_FWD:
|
||||||
|
case MMERC_PRN:
|
||||||
|
case MMERC_FALLF:
|
||||||
|
case FMERC_FWD:
|
||||||
|
case FMERC_PRN:
|
||||||
|
case FMERC_FALLF:
|
||||||
|
canbezombie = TRUE;
|
||||||
|
*pAnimState = FALLFORWARD_HITDEATH_STOP;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case M_DEAD1:
|
||||||
|
canbezombie = TRUE;
|
||||||
|
*pAnimState = GENERIC_HIT_DEATH;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case M_DEAD2:
|
||||||
|
canbezombie = TRUE;
|
||||||
|
*pAnimState = CIV_DIE2;
|
||||||
|
|
||||||
|
case H_DEAD1:
|
||||||
|
case K_DEAD1:
|
||||||
|
case FT_DEAD1:
|
||||||
|
case S_DEAD1:
|
||||||
|
case W_DEAD1:
|
||||||
|
case C_DEAD1:
|
||||||
|
case H_DEAD2:
|
||||||
|
case K_DEAD2:
|
||||||
|
case FT_DEAD2:
|
||||||
|
case S_DEAD2:
|
||||||
|
case W_DEAD2:
|
||||||
|
case C_DEAD2:
|
||||||
|
canbezombie = TRUE;
|
||||||
|
*pAnimState = STANDING;
|
||||||
|
|
||||||
|
default:
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change to standing,unless we can getup with an animation
|
return( canbezombie );
|
||||||
pNewSoldier->EVENT_InitNewSoldierAnim( STANDING, 0, TRUE );
|
|
||||||
pNewSoldier->BeginSoldierGetup( );
|
|
||||||
|
|
||||||
// So we can see them!
|
|
||||||
AllTeamsLookForAll(ALLOW_INTERRUPTS);
|
|
||||||
}
|
}
|
||||||
}
|
#endif
|
||||||
|
|
||||||
// Flugente Zombies: returns true if a zombie can be raised from this corpse, and returns the correct pAnimState for the new zombie
|
|
||||||
BOOLEAN CorpseOkToSpawnZombie( ROTTING_CORPSE * pCorpse, UINT16* pAnimState )
|
|
||||||
{
|
|
||||||
BOOLEAN canbezombie = FALSE;
|
|
||||||
*pAnimState = FALLBACKHIT_STOP;
|
|
||||||
|
|
||||||
switch ( pCorpse->def.ubType )
|
|
||||||
{
|
|
||||||
case SMERC_BCK:
|
|
||||||
case SMERC_DHD:
|
|
||||||
case SMERC_FALL:
|
|
||||||
case MMERC_BCK:
|
|
||||||
case MMERC_DHD:
|
|
||||||
case MMERC_FALL:
|
|
||||||
case FMERC_BCK:
|
|
||||||
case FMERC_DHD:
|
|
||||||
case FMERC_FALL:
|
|
||||||
case ROTTING_STAGE2:
|
|
||||||
canbezombie = TRUE;
|
|
||||||
*pAnimState = FALLBACKHIT_STOP;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SMERC_FWD:
|
|
||||||
case SMERC_PRN:
|
|
||||||
case SMERC_FALLF:
|
|
||||||
case MMERC_FWD:
|
|
||||||
case MMERC_PRN:
|
|
||||||
case MMERC_FALLF:
|
|
||||||
case FMERC_FWD:
|
|
||||||
case FMERC_PRN:
|
|
||||||
case FMERC_FALLF:
|
|
||||||
canbezombie = TRUE;
|
|
||||||
*pAnimState = FALLFORWARD_HITDEATH_STOP;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case M_DEAD1:
|
|
||||||
canbezombie = TRUE;
|
|
||||||
*pAnimState = GENERIC_HIT_DEATH;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case M_DEAD2:
|
|
||||||
canbezombie = TRUE;
|
|
||||||
*pAnimState = CIV_DIE2;
|
|
||||||
|
|
||||||
case H_DEAD1:
|
|
||||||
case K_DEAD1:
|
|
||||||
case FT_DEAD1:
|
|
||||||
case S_DEAD1:
|
|
||||||
case W_DEAD1:
|
|
||||||
case C_DEAD1:
|
|
||||||
case H_DEAD2:
|
|
||||||
case K_DEAD2:
|
|
||||||
case FT_DEAD2:
|
|
||||||
case S_DEAD2:
|
|
||||||
case W_DEAD2:
|
|
||||||
case C_DEAD2:
|
|
||||||
canbezombie = TRUE;
|
|
||||||
*pAnimState = STANDING;
|
|
||||||
|
|
||||||
default:
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
return( canbezombie );
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -84,7 +84,10 @@ enum RottingCorpseDefines
|
|||||||
#define ROTTING_CORPSE_USE_URBAN_CAMO_PALETTE 0x100 //We use urban palette here....
|
#define ROTTING_CORPSE_USE_URBAN_CAMO_PALETTE 0x100 //We use urban palette here....
|
||||||
#define ROTTING_CORPSE_USE_DESERT_CAMO_PALETTE 0x200 //We use desert palette here....
|
#define ROTTING_CORPSE_USE_DESERT_CAMO_PALETTE 0x200 //We use desert palette here....
|
||||||
#define ROTTING_CORPSE_USE_SNOW_CAMO_PALETTE 0x400 //We use snow palette here....
|
#define ROTTING_CORPSE_USE_SNOW_CAMO_PALETTE 0x400 //We use snow palette here....
|
||||||
#define ROTTING_CORPSE_NEVER_RISE_AGAIN 0x800 //a zombie cannot be created from this corpse (if not set, it'll eventually rise again )
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
|
#define ROTTING_CORPSE_NEVER_RISE_AGAIN 0x800 //a zombie cannot be created from this corpse (if not set, it'll eventually rise again )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
@@ -116,8 +119,10 @@ typedef struct
|
|||||||
|
|
||||||
UINT8 ubFiller[ 12 ];
|
UINT8 ubFiller[ 12 ];
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
// Flugente: added name so we can display individual name if corpse gets resurrected...
|
// Flugente: added name so we can display individual name if corpse gets resurrected...
|
||||||
CHAR16 name[ 10 ];
|
CHAR16 name[ 10 ];
|
||||||
|
#endif
|
||||||
|
|
||||||
} ROTTING_CORPSE_DEFINITION;
|
} ROTTING_CORPSE_DEFINITION;
|
||||||
|
|
||||||
@@ -140,8 +145,10 @@ typedef struct
|
|||||||
BOOLEAN fAttractCrowsOnlyWhenOnScreen;
|
BOOLEAN fAttractCrowsOnlyWhenOnScreen;
|
||||||
INT32 iID;
|
INT32 iID;
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
// Flugente: added name so we can display individual name if corpse gets resurrected...
|
// Flugente: added name so we can display individual name if corpse gets resurrected...
|
||||||
CHAR16 name[ 10 ];
|
CHAR16 name[ 10 ];
|
||||||
|
#endif
|
||||||
|
|
||||||
} ROTTING_CORPSE;
|
} ROTTING_CORPSE;
|
||||||
|
|
||||||
@@ -200,13 +207,15 @@ INT32 GetGridNoOfCorpseGivenProfileID( UINT8 ubProfileID );
|
|||||||
void DecayRottingCorpseAIWarnings( void );
|
void DecayRottingCorpseAIWarnings( void );
|
||||||
UINT8 GetNearestRottingCorpseAIWarning( INT32 sGridNo );
|
UINT8 GetNearestRottingCorpseAIWarning( INT32 sGridNo );
|
||||||
|
|
||||||
// Flugente: Raise zombies
|
#ifdef ENABLE_ZOMBIES
|
||||||
void RaiseZombies( void );
|
// Flugente: Raise zombies
|
||||||
|
void RaiseZombies( void );
|
||||||
|
|
||||||
// Flugente: create a zombie from a corpse
|
// Flugente: create a zombie from a corpse
|
||||||
void CreateZombiefromCorpse( ROTTING_CORPSE * pCorpse, UINT16 usAnimState );
|
void CreateZombiefromCorpse( ROTTING_CORPSE * pCorpse, UINT16 usAnimState );
|
||||||
|
|
||||||
// Flugente: returns true if a zombie can be raised from this corpse, and returns the correct pAnimState for the new zombie
|
// Flugente: returns true if a zombie can be raised from this corpse, and returns the correct pAnimState for the new zombie
|
||||||
BOOLEAN CorpseOkToSpawnZombie( ROTTING_CORPSE * pCorpse, UINT16* pAnimState );
|
BOOLEAN CorpseOkToSpawnZombie( ROTTING_CORPSE * pCorpse, UINT16* pAnimState );
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -3485,9 +3485,11 @@ BOOLEAN HandleSoldierDeath( SOLDIERTYPE *pSoldier , BOOLEAN *pfMadeCorpse )
|
|||||||
case SOLDIER_CLASS_CREATURE :
|
case SOLDIER_CLASS_CREATURE :
|
||||||
gMercProfiles[ MercPtrs[ ubAttacker ]->ubProfile ].records.usKillsCreatures++;
|
gMercProfiles[ MercPtrs[ ubAttacker ]->ubProfile ].records.usKillsCreatures++;
|
||||||
break;
|
break;
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
case SOLDIER_CLASS_ZOMBIE :
|
case SOLDIER_CLASS_ZOMBIE :
|
||||||
gMercProfiles[ MercPtrs[ ubAttacker ]->ubProfile ].records.usKillsZombies++;
|
gMercProfiles[ MercPtrs[ ubAttacker ]->ubProfile ].records.usKillsZombies++;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
default :
|
default :
|
||||||
if ( CREATURE_OR_BLOODCAT( pSoldier ) )
|
if ( CREATURE_OR_BLOODCAT( pSoldier ) )
|
||||||
gMercProfiles[ MercPtrs[ ubAttacker ]->ubProfile ].records.usKillsCreatures++;
|
gMercProfiles[ MercPtrs[ ubAttacker ]->ubProfile ].records.usKillsCreatures++;
|
||||||
|
|||||||
@@ -137,8 +137,10 @@ extern INT16 DirIncrementer[8];
|
|||||||
#define MIN_SUBSEQUENT_SNDS_DELAY 2000
|
#define MIN_SUBSEQUENT_SNDS_DELAY 2000
|
||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
|
|
||||||
extern void TeleportSelectedSoldier( void );
|
#ifdef ENABLE_ZOMBIES
|
||||||
extern BOOLEAN AddSoldierToSectorNoCalculateDirectionUseAnimation( UINT8 ubID, UINT16 usAnimState, UINT16 usAnimCode );
|
extern void TeleportSelectedSoldier( void );
|
||||||
|
extern BOOLEAN AddSoldierToSectorNoCalculateDirectionUseAnimation( UINT8 ubID, UINT16 usAnimState, UINT16 usAnimCode );
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// Enumerate extended directions
|
// Enumerate extended directions
|
||||||
@@ -1349,7 +1351,11 @@ MERCPROFILESTRUCT& MERCPROFILESTRUCT::operator=(const OLD_MERCPROFILESTRUCT_101&
|
|||||||
this->records.usKillsAdmins = (src.usKills/4);
|
this->records.usKillsAdmins = (src.usKills/4);
|
||||||
this->records.usKillsHostiles = 0;
|
this->records.usKillsHostiles = 0;
|
||||||
this->records.usKillsCreatures = 0;
|
this->records.usKillsCreatures = 0;
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
this->records.usKillsZombies = 0;
|
this->records.usKillsZombies = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
this->records.usKillsTanks = 0;
|
this->records.usKillsTanks = 0;
|
||||||
this->records.usKillsOthers = 0;
|
this->records.usKillsOthers = 0;
|
||||||
this->records.usAssistsMercs = (src.usAssists*3/4);
|
this->records.usAssistsMercs = (src.usAssists*3/4);
|
||||||
@@ -8673,6 +8679,7 @@ void SOLDIERTYPE::BeginSoldierClimbUpRoof( void )
|
|||||||
this->ubPendingDirection = bNewDirection;
|
this->ubPendingDirection = bNewDirection;
|
||||||
//this->usPendingAnimation = CLIMBUPROOF;
|
//this->usPendingAnimation = CLIMBUPROOF;
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
// Flugente: In case an animation is missing (zombies with bodytype of civilians), we TELEPORT instead
|
// Flugente: In case an animation is missing (zombies with bodytype of civilians), we TELEPORT instead
|
||||||
if ( IsAnimationValidForBodyType( this, CLIMBUPROOF ) == FALSE )
|
if ( IsAnimationValidForBodyType( this, CLIMBUPROOF ) == FALSE )
|
||||||
{
|
{
|
||||||
@@ -8682,6 +8689,9 @@ void SOLDIERTYPE::BeginSoldierClimbUpRoof( void )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
this->EVENT_InitNewSoldierAnim( CLIMBUPROOF, 0 , FALSE );
|
this->EVENT_InitNewSoldierAnim( CLIMBUPROOF, 0 , FALSE );
|
||||||
|
#else
|
||||||
|
this->EVENT_InitNewSoldierAnim( CLIMBUPROOF, 0 , FALSE );
|
||||||
|
#endif
|
||||||
|
|
||||||
this->InternalReceivingSoldierCancelServices( FALSE );
|
this->InternalReceivingSoldierCancelServices( FALSE );
|
||||||
this->InternalGivingSoldierCancelServices( FALSE );
|
this->InternalGivingSoldierCancelServices( FALSE );
|
||||||
@@ -9276,7 +9286,11 @@ UINT8 SOLDIERTYPE::SoldierTakeDamage( INT8 bHeight, INT16 sLifeDeduct, INT16 sPo
|
|||||||
// ATE: Put some logic in here to allow enemies to die quicker.....
|
// ATE: Put some logic in here to allow enemies to die quicker.....
|
||||||
// Are we an enemy?
|
// Are we an enemy?
|
||||||
// zombies don't die suddenly, as they regenerate health by bloodloss and poison. You have to make sure they die!
|
// zombies don't die suddenly, as they regenerate health by bloodloss and poison. You have to make sure they die!
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
if ( this->bSide != gbPlayerNum && !this->aiData.bNeutral && this->ubProfile == NO_PROFILE && !this->IsZombie() )
|
if ( this->bSide != gbPlayerNum && !this->aiData.bNeutral && this->ubProfile == NO_PROFILE && !this->IsZombie() )
|
||||||
|
#else
|
||||||
|
if ( this->bSide != gbPlayerNum && !this->aiData.bNeutral && this->ubProfile == NO_PROFILE)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
// ATE: Give them a chance to fall down...
|
// ATE: Give them a chance to fall down...
|
||||||
if ( this->stats.bLife > 0 && this->stats.bLife < ( OKLIFE - 1 ) )
|
if ( this->stats.bLife > 0 && this->stats.bLife < ( OKLIFE - 1 ) )
|
||||||
@@ -9310,12 +9324,15 @@ UINT8 SOLDIERTYPE::SoldierTakeDamage( INT8 bHeight, INT16 sLifeDeduct, INT16 sPo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
else if ( this->IsZombie() && this->stats.bLife > 0 && this->stats.bLife < OKLIFE )
|
else if ( this->IsZombie() && this->stats.bLife > 0 && this->stats.bLife < OKLIFE )
|
||||||
{
|
{
|
||||||
// a zombie doesn't automatically die, so he would normally stand up again after being hit.
|
// a zombie doesn't automatically die, so he would normally stand up again after being hit.
|
||||||
// We don't want that, because he is dying, so we manually skip that animation
|
// We don't want that, because he is dying, so we manually skip that animation
|
||||||
this->usPendingAnimation = NO_PENDING_ANIMATION;
|
this->usPendingAnimation = NO_PENDING_ANIMATION;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if ( fShowDamage )
|
if ( fShowDamage )
|
||||||
{
|
{
|
||||||
@@ -9988,6 +10005,7 @@ BOOLEAN SOLDIERTYPE::InternalDoMercBattleSound( UINT8 ubBattleSoundID, INT8 bSpe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
else if ( pSoldier->IsZombie() ) // Madd: add zombie sounds
|
else if ( pSoldier->IsZombie() ) // Madd: add zombie sounds
|
||||||
{
|
{
|
||||||
if ( ubSoundID == BATTLE_SOUND_DIE1 )
|
if ( ubSoundID == BATTLE_SOUND_DIE1 )
|
||||||
@@ -10007,6 +10025,7 @@ BOOLEAN SOLDIERTYPE::InternalDoMercBattleSound( UINT8 ubBattleSoundID, INT8 bSpe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( ubSoundID == BATTLE_SOUND_DIE1 )
|
if ( ubSoundID == BATTLE_SOUND_DIE1 )
|
||||||
@@ -10265,6 +10284,7 @@ void SOLDIERTYPE::BeginSoldierClimbDownRoof( void )
|
|||||||
|
|
||||||
this->ubPendingDirection = bNewDirection;
|
this->ubPendingDirection = bNewDirection;
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
// Flugente: In case an animation is missing (zombies with bodytype of civilians), we TELEPORT instead
|
// Flugente: In case an animation is missing (zombies with bodytype of civilians), we TELEPORT instead
|
||||||
if ( IsAnimationValidForBodyType( this, JUMPDOWNWALL ) == FALSE )
|
if ( IsAnimationValidForBodyType( this, JUMPDOWNWALL ) == FALSE )
|
||||||
{
|
{
|
||||||
@@ -10274,6 +10294,9 @@ void SOLDIERTYPE::BeginSoldierClimbDownRoof( void )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
this->EVENT_InitNewSoldierAnim( JUMPDOWNWALL, 0 , FALSE );
|
this->EVENT_InitNewSoldierAnim( JUMPDOWNWALL, 0 , FALSE );
|
||||||
|
#else
|
||||||
|
this->EVENT_InitNewSoldierAnim( JUMPDOWNWALL, 0 , FALSE );
|
||||||
|
#endif
|
||||||
|
|
||||||
this->InternalReceivingSoldierCancelServices( FALSE );
|
this->InternalReceivingSoldierCancelServices( FALSE );
|
||||||
this->InternalGivingSoldierCancelServices( FALSE );
|
this->InternalGivingSoldierCancelServices( FALSE );
|
||||||
@@ -11505,7 +11528,13 @@ void SOLDIERTYPE::EVENT_SoldierBeginPunchAttack( INT32 sGridNo, UINT8 ubDirectio
|
|||||||
#if (defined JA2UB || defined JA113NODEMO)
|
#if (defined JA2UB || defined JA113NODEMO)
|
||||||
if ( fMartialArtist && !Item[usItem].crowbar && this->ubBodyType == REGMALE)
|
if ( fMartialArtist && !Item[usItem].crowbar && this->ubBodyType == REGMALE)
|
||||||
#else
|
#else
|
||||||
if ( fMartialArtist && !AreInMeanwhile( ) && !Item[usItem].crowbar && this->ubBodyType == REGMALE && !IsZombie() ) // SANDRO - added check for body type
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
|
if ( fMartialArtist && !AreInMeanwhile( ) && !Item[usItem].crowbar && this->ubBodyType == REGMALE && !IsZombie() ) // SANDRO - added check for body type
|
||||||
|
#else
|
||||||
|
if ( fMartialArtist && !AreInMeanwhile( ) && !Item[usItem].crowbar && this->ubBodyType == REGMALE ) // SANDRO - added check for body type
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
// Are we in attack mode yet?
|
// Are we in attack mode yet?
|
||||||
@@ -11520,6 +11549,7 @@ void SOLDIERTYPE::EVENT_SoldierBeginPunchAttack( INT32 sGridNo, UINT8 ubDirectio
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
// Flugente: civilians can be zombies too, but they do not have a 'punch' animation. Simple fix: They 'attack' without animation...
|
// Flugente: civilians can be zombies too, but they do not have a 'punch' animation. Simple fix: They 'attack' without animation...
|
||||||
// CHECK IF WE CAN DO THIS ANIMATION!
|
// CHECK IF WE CAN DO THIS ANIMATION!
|
||||||
if ( this->IsZombie() && IsAnimationValidForBodyType( this, PUNCH ) == FALSE )
|
if ( this->IsZombie() && IsAnimationValidForBodyType( this, PUNCH ) == FALSE )
|
||||||
@@ -11589,6 +11619,7 @@ void SOLDIERTYPE::EVENT_SoldierBeginPunchAttack( INT32 sGridNo, UINT8 ubDirectio
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#endif
|
||||||
// Look at stance of target
|
// Look at stance of target
|
||||||
switch( gAnimControl[ pTSoldier->usAnimState ].ubEndHeight )
|
switch( gAnimControl[ pTSoldier->usAnimState ].ubEndHeight )
|
||||||
{
|
{
|
||||||
@@ -11649,7 +11680,10 @@ void SOLDIERTYPE::EVENT_SoldierBeginPunchAttack( INT32 sGridNo, UINT8 ubDirectio
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -13402,6 +13436,8 @@ INT32 SOLDIERTYPE::GetDamageResistance(BOOLEAN fAutoResolve, BOOLEAN fCalcBreath
|
|||||||
resistance += gGameExternalOptions.sEnemyRegularDamageResistance;
|
resistance += gGameExternalOptions.sEnemyRegularDamageResistance;
|
||||||
else if (this->ubSoldierClass == SOLDIER_CLASS_ELITE && gGameExternalOptions.sEnemyEliteDamageResistance != 0)
|
else if (this->ubSoldierClass == SOLDIER_CLASS_ELITE && gGameExternalOptions.sEnemyEliteDamageResistance != 0)
|
||||||
resistance += gGameExternalOptions.sEnemyEliteDamageResistance;
|
resistance += gGameExternalOptions.sEnemyEliteDamageResistance;
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
else if (IsZombie())
|
else if (IsZombie())
|
||||||
{
|
{
|
||||||
if ( fCalcBreathLoss )
|
if ( fCalcBreathLoss )
|
||||||
@@ -13409,6 +13445,7 @@ INT32 SOLDIERTYPE::GetDamageResistance(BOOLEAN fAutoResolve, BOOLEAN fCalcBreath
|
|||||||
else
|
else
|
||||||
resistance += gGameExternalOptions.sEnemyZombieDamageResistance;
|
resistance += gGameExternalOptions.sEnemyZombieDamageResistance;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
//////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@@ -13463,10 +13500,13 @@ INT16 SOLDIERTYPE::GetSoldierCriticalDamageBonus( void )
|
|||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOLEAN SOLDIERTYPE::IsZombie( void )
|
|
||||||
{
|
#ifdef ENABLE_ZOMBIES
|
||||||
return( ubSoldierClass == SOLDIER_CLASS_ZOMBIE );
|
BOOLEAN SOLDIERTYPE::IsZombie( void )
|
||||||
}
|
{
|
||||||
|
return( ubSoldierClass == SOLDIER_CLASS_ZOMBIE );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
INT16 SOLDIERTYPE::GetPoisonResistance( void )
|
INT16 SOLDIERTYPE::GetPoisonResistance( void )
|
||||||
{
|
{
|
||||||
@@ -13497,9 +13537,11 @@ INT16 SOLDIERTYPE::GetPoisonDamagePercentage( void )
|
|||||||
// Flugente: this percentage has to be between 0% and 100%
|
// Flugente: this percentage has to be between 0% and 100%
|
||||||
INT16 val = 0;
|
INT16 val = 0;
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
// zombies poison damage percentage is externalised
|
// zombies poison damage percentage is externalised
|
||||||
if ( IsZombie() )
|
if ( IsZombie() )
|
||||||
val += gGameExternalOptions.sZombiePoisonDamagePercentage;
|
val += gGameExternalOptions.sZombiePoisonDamagePercentage;
|
||||||
|
#endif
|
||||||
|
|
||||||
if ( this->usAttackingWeapon )
|
if ( this->usAttackingWeapon )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -310,7 +310,9 @@ enum
|
|||||||
SOLDIER_CLASS_ELITE_MILITIA,
|
SOLDIER_CLASS_ELITE_MILITIA,
|
||||||
SOLDIER_CLASS_CREATURE,
|
SOLDIER_CLASS_CREATURE,
|
||||||
SOLDIER_CLASS_MINER,
|
SOLDIER_CLASS_MINER,
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
SOLDIER_CLASS_ZOMBIE,
|
SOLDIER_CLASS_ZOMBIE,
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SOLDIER_CLASS_ENEMY( bSoldierClass ) ( ( bSoldierClass >= SOLDIER_CLASS_ADMINISTRATOR ) && ( bSoldierClass <= SOLDIER_CLASS_ARMY ) )
|
#define SOLDIER_CLASS_ENEMY( bSoldierClass ) ( ( bSoldierClass >= SOLDIER_CLASS_ADMINISTRATOR ) && ( bSoldierClass <= SOLDIER_CLASS_ARMY ) )
|
||||||
@@ -1358,8 +1360,10 @@ public:
|
|||||||
|
|
||||||
INT16 GetSoldierCriticalDamageBonus( void ); // Flugente: determines critical damage bonus depending on class, skill, etc.
|
INT16 GetSoldierCriticalDamageBonus( void ); // Flugente: determines critical damage bonus depending on class, skill, etc.
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
// Flugente: Zombies
|
// Flugente: Zombies
|
||||||
BOOLEAN IsZombie( void );
|
BOOLEAN IsZombie( void );
|
||||||
|
#endif
|
||||||
|
|
||||||
// Flugente: poison system
|
// Flugente: poison system
|
||||||
// These functions might one day be modified by traits etc. We'll keep that in these functions and not clutter the rest of the code
|
// These functions might one day be modified by traits etc. We'll keep that in these functions and not clutter the rest of the code
|
||||||
|
|||||||
+53
-30
@@ -1729,10 +1729,12 @@ BOOLEAN TacticalCopySoldierFromCreateStruct( SOLDIERTYPE *pSoldier, SOLDIERCREAT
|
|||||||
{
|
{
|
||||||
swprintf( pSoldier->name, gzLateLocalizedString[ 36 ] );
|
swprintf( pSoldier->name, gzLateLocalizedString[ 36 ] );
|
||||||
}
|
}
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
else if ( pSoldier->IsZombie() )
|
else if ( pSoldier->IsZombie() )
|
||||||
{
|
{
|
||||||
swprintf( pSoldier->name, TacticalStr[ ZOMBIE_TEAM_MERC_NAME ] );
|
swprintf( pSoldier->name, TacticalStr[ ZOMBIE_TEAM_MERC_NAME ] );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
swprintf( pSoldier->name, TacticalStr[ CREATURE_TEAM_MERC_NAME ] ); break;
|
swprintf( pSoldier->name, TacticalStr[ CREATURE_TEAM_MERC_NAME ] ); break;
|
||||||
@@ -2176,7 +2178,9 @@ void CreateDetailedPlacementGivenBasicPlacementInfo( SOLDIERCREATE_STRUCT *pp, B
|
|||||||
switch( ubSoldierClass )
|
switch( ubSoldierClass )
|
||||||
{
|
{
|
||||||
case SOLDIER_CLASS_ADMINISTRATOR:
|
case SOLDIER_CLASS_ADMINISTRATOR:
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
case SOLDIER_CLASS_ZOMBIE:
|
case SOLDIER_CLASS_ZOMBIE:
|
||||||
|
#endif
|
||||||
pp->bExpLevel = (INT8) 2 + bExpLevelModifier;
|
pp->bExpLevel = (INT8) 2 + bExpLevelModifier;
|
||||||
break;
|
break;
|
||||||
case SOLDIER_CLASS_ARMY:
|
case SOLDIER_CLASS_ARMY:
|
||||||
@@ -2294,7 +2298,11 @@ void CreateDetailedPlacementGivenBasicPlacementInfo( SOLDIERCREATE_STRUCT *pp, B
|
|||||||
//If it is a detailed placement, don't do this yet, as detailed placements may have their
|
//If it is a detailed placement, don't do this yet, as detailed placements may have their
|
||||||
//own equipment.
|
//own equipment.
|
||||||
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("CreateDetailedPlacementGivenBasicPlacementInfo: generate random equipment"));
|
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("CreateDetailedPlacementGivenBasicPlacementInfo: generate random equipment"));
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
if( !bp->fDetailedPlacement && ubSoldierClass != SOLDIER_CLASS_NONE && ubSoldierClass != SOLDIER_CLASS_CREATURE && ubSoldierClass != SOLDIER_CLASS_MINER && ubSoldierClass != SOLDIER_CLASS_ZOMBIE )
|
if( !bp->fDetailedPlacement && ubSoldierClass != SOLDIER_CLASS_NONE && ubSoldierClass != SOLDIER_CLASS_CREATURE && ubSoldierClass != SOLDIER_CLASS_MINER && ubSoldierClass != SOLDIER_CLASS_ZOMBIE )
|
||||||
|
#else
|
||||||
|
if( !bp->fDetailedPlacement && ubSoldierClass != SOLDIER_CLASS_NONE && ubSoldierClass != SOLDIER_CLASS_CREATURE && ubSoldierClass != SOLDIER_CLASS_MINER )
|
||||||
|
#endif
|
||||||
GenerateRandomEquipment( pp, ubSoldierClass, bp->bRelativeEquipmentLevel);
|
GenerateRandomEquipment( pp, ubSoldierClass, bp->bRelativeEquipmentLevel);
|
||||||
|
|
||||||
DecideToAssignSniperOrders(pp);
|
DecideToAssignSniperOrders(pp);
|
||||||
@@ -2462,7 +2470,12 @@ void CreateDetailedPlacementGivenStaticDetailedPlacementAndBasicPlacementInfo(
|
|||||||
//{
|
//{
|
||||||
// ReplaceExtendedGuns( pp, bp->ubSoldierClass );
|
// ReplaceExtendedGuns( pp, bp->ubSoldierClass );
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
if( bp->ubSoldierClass != SOLDIER_CLASS_NONE && bp->ubSoldierClass != SOLDIER_CLASS_CREATURE && bp->ubSoldierClass != SOLDIER_CLASS_MINER && bp->ubSoldierClass != SOLDIER_CLASS_ZOMBIE )
|
if( bp->ubSoldierClass != SOLDIER_CLASS_NONE && bp->ubSoldierClass != SOLDIER_CLASS_CREATURE && bp->ubSoldierClass != SOLDIER_CLASS_MINER && bp->ubSoldierClass != SOLDIER_CLASS_ZOMBIE )
|
||||||
|
#else
|
||||||
|
if( bp->ubSoldierClass != SOLDIER_CLASS_NONE && bp->ubSoldierClass != SOLDIER_CLASS_CREATURE && bp->ubSoldierClass != SOLDIER_CLASS_MINER )
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
GenerateRandomEquipment( pp, bp->ubSoldierClass, bp->bRelativeEquipmentLevel);
|
GenerateRandomEquipment( pp, bp->ubSoldierClass, bp->bRelativeEquipmentLevel);
|
||||||
DecideToAssignSniperOrders(pp);
|
DecideToAssignSniperOrders(pp);
|
||||||
@@ -2657,7 +2670,11 @@ SOLDIERTYPE* ReserveTacticalSoldierForAutoresolve( UINT8 ubSoldierClass )
|
|||||||
//returns the pointer to that soldier. This is used when copying the exact status of
|
//returns the pointer to that soldier. This is used when copying the exact status of
|
||||||
//all remaining enemy troops (or creatures) to finish the battle in autoresolve. To
|
//all remaining enemy troops (or creatures) to finish the battle in autoresolve. To
|
||||||
//signify that the troop has already been reserved, we simply set their gridno to NOWHERE.
|
//signify that the troop has already been reserved, we simply set their gridno to NOWHERE.
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
if( ubSoldierClass != SOLDIER_CLASS_CREATURE && ubSoldierClass != SOLDIER_CLASS_ZOMBIE )
|
if( ubSoldierClass != SOLDIER_CLASS_CREATURE && ubSoldierClass != SOLDIER_CLASS_ZOMBIE )
|
||||||
|
#else
|
||||||
|
if( ubSoldierClass != SOLDIER_CLASS_CREATURE )
|
||||||
|
#endif
|
||||||
{ //use the enemy team
|
{ //use the enemy team
|
||||||
iStart = gTacticalStatus.Team[ ENEMY_TEAM ].bFirstID;
|
iStart = gTacticalStatus.Team[ ENEMY_TEAM ].bFirstID;
|
||||||
iEnd = gTacticalStatus.Team[ ENEMY_TEAM ].bLastID;
|
iEnd = gTacticalStatus.Team[ ENEMY_TEAM ].bLastID;
|
||||||
@@ -2799,39 +2816,41 @@ SOLDIERTYPE* TacticalCreateEliteEnemy()
|
|||||||
return( pSoldier );
|
return( pSoldier );
|
||||||
}
|
}
|
||||||
|
|
||||||
//USED BY STRATEGIC AI and AUTORESOLVE
|
#ifdef ENABLE_ZOMBIES
|
||||||
SOLDIERTYPE* TacticalCreateZombie()
|
//USED BY STRATEGIC AI and AUTORESOLVE
|
||||||
{
|
SOLDIERTYPE* TacticalCreateZombie()
|
||||||
BASIC_SOLDIERCREATE_STRUCT bp;
|
|
||||||
SOLDIERCREATE_STRUCT pp;
|
|
||||||
UINT8 ubID;
|
|
||||||
SOLDIERTYPE * pSoldier;
|
|
||||||
|
|
||||||
if( guiCurrentScreen == AUTORESOLVE_SCREEN && !gfPersistantPBI )
|
|
||||||
{
|
{
|
||||||
pSoldier = ReserveTacticalSoldierForAutoresolve( SOLDIER_CLASS_ZOMBIE );
|
BASIC_SOLDIERCREATE_STRUCT bp;
|
||||||
if( pSoldier ) return pSoldier;
|
SOLDIERCREATE_STRUCT pp;
|
||||||
}
|
UINT8 ubID;
|
||||||
|
SOLDIERTYPE * pSoldier;
|
||||||
|
|
||||||
memset( &bp, 0, sizeof( BASIC_SOLDIERCREATE_STRUCT ) );
|
if( guiCurrentScreen == AUTORESOLVE_SCREEN && !gfPersistantPBI )
|
||||||
RandomizeRelativeLevel( &( bp.bRelativeAttributeLevel ), SOLDIER_CLASS_ZOMBIE );
|
{
|
||||||
RandomizeRelativeLevel( &( bp.bRelativeEquipmentLevel ), SOLDIER_CLASS_ZOMBIE );
|
pSoldier = ReserveTacticalSoldierForAutoresolve( SOLDIER_CLASS_ZOMBIE );
|
||||||
bp.bTeam = CREATURE_TEAM;//ZOMBIE_TEAM;
|
if( pSoldier ) return pSoldier;
|
||||||
bp.bOrders = SEEKENEMY;
|
}
|
||||||
bp.bAttitude = AGGRESSIVE;
|
|
||||||
bp.bBodyType = -1;
|
|
||||||
bp.ubSoldierClass = SOLDIER_CLASS_ZOMBIE;
|
|
||||||
CreateDetailedPlacementGivenBasicPlacementInfo( &pp, &bp );
|
|
||||||
pSoldier = TacticalCreateSoldier( &pp, &ubID );
|
|
||||||
if ( pSoldier )
|
|
||||||
{
|
|
||||||
// send soldier to centre of map, roughly
|
|
||||||
pSoldier->aiData.sNoiseGridno = (CENTRAL_GRIDNO + ( Random( CENTRAL_RADIUS * 2 + 1 ) - CENTRAL_RADIUS ) + ( Random( CENTRAL_RADIUS * 2 + 1 ) - CENTRAL_RADIUS ) * WORLD_COLS);
|
|
||||||
pSoldier->aiData.ubNoiseVolume = MAX_MISC_NOISE_DURATION;
|
|
||||||
}
|
|
||||||
|
|
||||||
return( pSoldier );
|
memset( &bp, 0, sizeof( BASIC_SOLDIERCREATE_STRUCT ) );
|
||||||
}
|
RandomizeRelativeLevel( &( bp.bRelativeAttributeLevel ), SOLDIER_CLASS_ZOMBIE );
|
||||||
|
RandomizeRelativeLevel( &( bp.bRelativeEquipmentLevel ), SOLDIER_CLASS_ZOMBIE );
|
||||||
|
bp.bTeam = CREATURE_TEAM;//ZOMBIE_TEAM;
|
||||||
|
bp.bOrders = SEEKENEMY;
|
||||||
|
bp.bAttitude = AGGRESSIVE;
|
||||||
|
bp.bBodyType = -1;
|
||||||
|
bp.ubSoldierClass = SOLDIER_CLASS_ZOMBIE;
|
||||||
|
CreateDetailedPlacementGivenBasicPlacementInfo( &pp, &bp );
|
||||||
|
pSoldier = TacticalCreateSoldier( &pp, &ubID );
|
||||||
|
if ( pSoldier )
|
||||||
|
{
|
||||||
|
// send soldier to centre of map, roughly
|
||||||
|
pSoldier->aiData.sNoiseGridno = (CENTRAL_GRIDNO + ( Random( CENTRAL_RADIUS * 2 + 1 ) - CENTRAL_RADIUS ) + ( Random( CENTRAL_RADIUS * 2 + 1 ) - CENTRAL_RADIUS ) * WORLD_COLS);
|
||||||
|
pSoldier->aiData.ubNoiseVolume = MAX_MISC_NOISE_DURATION;
|
||||||
|
}
|
||||||
|
|
||||||
|
return( pSoldier );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
SOLDIERTYPE* ReserveTacticalMilitiaSoldierForAutoresolve( UINT8 ubSoldierClass )
|
SOLDIERTYPE* ReserveTacticalMilitiaSoldierForAutoresolve( UINT8 ubSoldierClass )
|
||||||
{
|
{
|
||||||
@@ -4236,8 +4255,10 @@ BOOLEAN AssignTraitsToSoldier( SOLDIERTYPE *pSoldier, SOLDIERCREATE_STRUCT *pCre
|
|||||||
iChance = 10 + ubProgress/4; // 10-35% chance
|
iChance = 10 + ubProgress/4; // 10-35% chance
|
||||||
else if( ubSolClass == SOLDIER_CLASS_ADMINISTRATOR || ubSolClass == SOLDIER_CLASS_GREEN_MILITIA )
|
else if( ubSolClass == SOLDIER_CLASS_ADMINISTRATOR || ubSolClass == SOLDIER_CLASS_GREEN_MILITIA )
|
||||||
iChance = ubProgress/4; // 0-25% chance
|
iChance = ubProgress/4; // 0-25% chance
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
else if (ubSolClass == SOLDIER_CLASS_ZOMBIE )
|
else if (ubSolClass == SOLDIER_CLASS_ZOMBIE )
|
||||||
iChance = 100; // 100% chance
|
iChance = 100; // 100% chance
|
||||||
|
#endif
|
||||||
|
|
||||||
if( foundHtH ) // if found brass knuckless, increase the chance (doesn't happen often)
|
if( foundHtH ) // if found brass knuckless, increase the chance (doesn't happen often)
|
||||||
iChance += 35;
|
iChance += 35;
|
||||||
@@ -4281,8 +4302,10 @@ BOOLEAN AssignTraitsToSoldier( SOLDIERTYPE *pSoldier, SOLDIERCREATE_STRUCT *pCre
|
|||||||
iChance = 25 + ubProgress*2/5; // 25-65% chance
|
iChance = 25 + ubProgress*2/5; // 25-65% chance
|
||||||
else if( ubSolClass == SOLDIER_CLASS_ADMINISTRATOR || ubSolClass == SOLDIER_CLASS_GREEN_MILITIA )
|
else if( ubSolClass == SOLDIER_CLASS_ADMINISTRATOR || ubSolClass == SOLDIER_CLASS_GREEN_MILITIA )
|
||||||
iChance = 10 + ubProgress*2/5; // 10-50% chance
|
iChance = 10 + ubProgress*2/5; // 10-50% chance
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
else if (ubSolClass == SOLDIER_CLASS_ZOMBIE )
|
else if (ubSolClass == SOLDIER_CLASS_ZOMBIE )
|
||||||
iChance = 100; // 100% chance
|
iChance = 100; // 100% chance
|
||||||
|
#endif
|
||||||
|
|
||||||
// modify the chance by preset ini setting
|
// modify the chance by preset ini setting
|
||||||
if( gGameExternalOptions.bAssignedTraitsRarity != 0 )
|
if( gGameExternalOptions.bAssignedTraitsRarity != 0 )
|
||||||
|
|||||||
@@ -420,7 +420,9 @@ SOLDIERTYPE* TacticalCreateSoldier( SOLDIERCREATE_STRUCT *pCreateStruct, UINT8 *
|
|||||||
SOLDIERTYPE* TacticalCreateAdministrator();
|
SOLDIERTYPE* TacticalCreateAdministrator();
|
||||||
SOLDIERTYPE* TacticalCreateEliteEnemy();
|
SOLDIERTYPE* TacticalCreateEliteEnemy();
|
||||||
SOLDIERTYPE* TacticalCreateArmyTroop();
|
SOLDIERTYPE* TacticalCreateArmyTroop();
|
||||||
SOLDIERTYPE* TacticalCreateZombie(); // Flugente Zombies
|
#ifdef ENABLE_ZOMBIES
|
||||||
|
SOLDIERTYPE* TacticalCreateZombie(); // Flugente Zombies
|
||||||
|
#endif
|
||||||
SOLDIERTYPE* TacticalCreateMilitia( UINT8 ubMilitiaClass );
|
SOLDIERTYPE* TacticalCreateMilitia( UINT8 ubMilitiaClass );
|
||||||
SOLDIERTYPE* TacticalCreateCreature( INT8 bCreatureBodyType );
|
SOLDIERTYPE* TacticalCreateCreature( INT8 bCreatureBodyType );
|
||||||
|
|
||||||
|
|||||||
@@ -275,11 +275,14 @@ void HandleTacticalEndTurn( )
|
|||||||
|
|
||||||
// Flugente: Cool down all items not in a soldier's inventory
|
// Flugente: Cool down all items not in a soldier's inventory
|
||||||
CoolDownWorldItems( FALSE );
|
CoolDownWorldItems( FALSE );
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
// Flugente: raise zombies if in gamescreen and option set
|
// Flugente: raise zombies if in gamescreen and option set
|
||||||
if ( guiCurrentScreen == GAME_SCREEN )
|
if ( guiCurrentScreen == GAME_SCREEN )
|
||||||
{
|
{
|
||||||
RaiseZombies();
|
RaiseZombies();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -464,11 +464,14 @@ void EndTurnEvents( void )
|
|||||||
|
|
||||||
// Flugente: Cool down all items not in a soldier's inventory
|
// Flugente: Cool down all items not in a soldier's inventory
|
||||||
CoolDownWorldItems( FALSE );
|
CoolDownWorldItems( FALSE );
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
// Flugente: raise zombies if in gamescreen and option set
|
// Flugente: raise zombies if in gamescreen and option set
|
||||||
if ( guiCurrentScreen == GAME_SCREEN )
|
if ( guiCurrentScreen == GAME_SCREEN )
|
||||||
{
|
{
|
||||||
RaiseZombies();
|
RaiseZombies();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// decay AI warning values from corpses
|
// decay AI warning values from corpses
|
||||||
DecayRottingCorpseAIWarnings();
|
DecayRottingCorpseAIWarnings();
|
||||||
|
|||||||
@@ -8635,12 +8635,14 @@ INT32 BulletImpact( SOLDIERTYPE *pFirer, BULLET *pBullet, SOLDIERTYPE * pTarget,
|
|||||||
INT8 bStatLoss = 0;
|
INT8 bStatLoss = 0;
|
||||||
UINT8 ubAmmoType;
|
UINT8 ubAmmoType;
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
if ( pTarget->IsZombie() && gGameExternalOptions.fZombieOnlyHeadshotsWork )
|
if ( pTarget->IsZombie() && gGameExternalOptions.fZombieOnlyHeadshotsWork )
|
||||||
{
|
{
|
||||||
// if bullet does not hits anything other than the head, it doesn't do any damage
|
// if bullet does not hits anything other than the head, it doesn't do any damage
|
||||||
if ( ubHitLocation != AIM_SHOT_HEAD )
|
if ( ubHitLocation != AIM_SHOT_HEAD )
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// NOTE: reduction of bullet impact due to range and obstacles is handled
|
// NOTE: reduction of bullet impact due to range and obstacles is handled
|
||||||
// in MoveBullet.
|
// in MoveBullet.
|
||||||
|
|||||||
@@ -4764,7 +4764,11 @@ void DebugSoldierPage4( )
|
|||||||
case SOLDIER_CLASS_REG_MILITIA: gprintf( 320, LINE_HEIGHT * ubLine, L"(Reg Militia)" ); break;
|
case SOLDIER_CLASS_REG_MILITIA: gprintf( 320, LINE_HEIGHT * ubLine, L"(Reg Militia)" ); break;
|
||||||
case SOLDIER_CLASS_ELITE_MILITIA: gprintf( 320, LINE_HEIGHT * ubLine, L"(Elite Militia)" ); break;
|
case SOLDIER_CLASS_ELITE_MILITIA: gprintf( 320, LINE_HEIGHT * ubLine, L"(Elite Militia)" ); break;
|
||||||
case SOLDIER_CLASS_MINER: gprintf( 320, LINE_HEIGHT * ubLine, L"(Miner)" ); break;
|
case SOLDIER_CLASS_MINER: gprintf( 320, LINE_HEIGHT * ubLine, L"(Miner)" ); break;
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
case SOLDIER_CLASS_ZOMBIE: gprintf( 320, LINE_HEIGHT * ubLine, L"(Zombie)" ); break;
|
case SOLDIER_CLASS_ZOMBIE: gprintf( 320, LINE_HEIGHT * ubLine, L"(Zombie)" ); break;
|
||||||
|
#endif
|
||||||
|
|
||||||
default: break; //don't care (don't write anything)
|
default: break; //don't care (don't write anything)
|
||||||
}
|
}
|
||||||
ubLine++;
|
ubLine++;
|
||||||
|
|||||||
@@ -172,12 +172,14 @@ void CreatureCall( SOLDIERTYPE * pCaller );
|
|||||||
INT8 CreatureDecideAction( SOLDIERTYPE * pCreature );
|
INT8 CreatureDecideAction( SOLDIERTYPE * pCreature );
|
||||||
void CreatureDecideAlertStatus( SOLDIERTYPE *pCreature );
|
void CreatureDecideAlertStatus( SOLDIERTYPE *pCreature );
|
||||||
|
|
||||||
// Flugente: Zombie AI
|
#ifdef ENABLE_ZOMBIES
|
||||||
INT8 ZombieDecideAction( SOLDIERTYPE * pZombie );
|
// Flugente: Zombie AI
|
||||||
void ZombieDecideAlertStatus( SOLDIERTYPE *pZombie );
|
INT8 ZombieDecideAction( SOLDIERTYPE * pZombie );
|
||||||
|
void ZombieDecideAlertStatus( SOLDIERTYPE *pZombie );
|
||||||
|
|
||||||
// a variant of ClosestSeenOpponent(...), that allows zombies
|
// a variant of ClosestSeenOpponent(...), that allows zombies
|
||||||
INT32 ClosestSeenOpponentforZombie(SOLDIERTYPE *pSoldier, INT32 * psGridNo, INT8 * pbLevel);
|
INT32 ClosestSeenOpponentforZombie(SOLDIERTYPE *pSoldier, INT32 * psGridNo, INT8 * pbLevel);
|
||||||
|
#endif
|
||||||
|
|
||||||
INT8 CrowDecideAction( SOLDIERTYPE * pSoldier );
|
INT8 CrowDecideAction( SOLDIERTYPE * pSoldier );
|
||||||
void DecideAlertStatus( SOLDIERTYPE *pSoldier );
|
void DecideAlertStatus( SOLDIERTYPE *pSoldier );
|
||||||
@@ -241,9 +243,11 @@ INT8 FindDirectionForClimbing( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bLevel
|
|||||||
|
|
||||||
// HEADROCK HAM B2.7: Functions to assist group AI
|
// HEADROCK HAM B2.7: Functions to assist group AI
|
||||||
// WANNE: Headrock informed me that I should disable these 3 functions in code, because they need a lot of CPU during AI calculation.
|
// WANNE: Headrock informed me that I should disable these 3 functions in code, because they need a lot of CPU during AI calculation.
|
||||||
|
/*
|
||||||
INT16 AssessTacticalSituation( INT8 bSide );
|
INT16 AssessTacticalSituation( INT8 bSide );
|
||||||
BOOLEAN TeamSeesOpponent( INT8 bSide, SOLDIERTYPE * pOpponent );
|
BOOLEAN TeamSeesOpponent( INT8 bSide, SOLDIERTYPE * pOpponent );
|
||||||
INT32 CalcStraightThreatValue( SOLDIERTYPE *pEnemy );
|
INT32 CalcStraightThreatValue( SOLDIERTYPE *pEnemy );
|
||||||
|
*/
|
||||||
|
|
||||||
// SANDRO - added following functions
|
// SANDRO - added following functions
|
||||||
BOOLEAN DoctorIsPresent( SOLDIERTYPE * pPatient, BOOLEAN fOnDoctorAssignmentCheck );
|
BOOLEAN DoctorIsPresent( SOLDIERTYPE * pPatient, BOOLEAN fOnDoctorAssignmentCheck );
|
||||||
|
|||||||
@@ -1616,6 +1616,8 @@ fprintf(NetDebugFile,"\tNPC %d, dtctLvl %d, marking mine at gridno %d, gridCost
|
|||||||
|
|
||||||
void TurnBasedHandleNPCAI(SOLDIERTYPE *pSoldier)
|
void TurnBasedHandleNPCAI(SOLDIERTYPE *pSoldier)
|
||||||
{
|
{
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
|
|
||||||
// added by Flugente: static pointers, used to break out of an endless circles (currently only used for zombie AI)
|
// added by Flugente: static pointers, used to break out of an endless circles (currently only used for zombie AI)
|
||||||
static SOLDIERTYPE* pLastDecisionSoldier = NULL;
|
static SOLDIERTYPE* pLastDecisionSoldier = NULL;
|
||||||
static INT16 lastdecisioncount = 0;
|
static INT16 lastdecisioncount = 0;
|
||||||
@@ -1642,6 +1644,7 @@ void TurnBasedHandleNPCAI(SOLDIERTYPE *pSoldier)
|
|||||||
pLastDecisionSoldier = pSoldier;
|
pLastDecisionSoldier = pSoldier;
|
||||||
lastdecisioncount = 0;
|
lastdecisioncount = 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if (Status.gamePaused)
|
if (Status.gamePaused)
|
||||||
@@ -1930,11 +1933,15 @@ void TurnBasedHandleNPCAI(SOLDIERTYPE *pSoldier)
|
|||||||
{
|
{
|
||||||
if (!(gTacticalStatus.uiFlags & ENGAGED_IN_CONV))
|
if (!(gTacticalStatus.uiFlags & ENGAGED_IN_CONV))
|
||||||
{
|
{
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
if ( pSoldier->IsZombie() )
|
if ( pSoldier->IsZombie() )
|
||||||
{
|
{
|
||||||
pSoldier->aiData.bAction = ZombieDecideAction(pSoldier);
|
pSoldier->aiData.bAction = ZombieDecideAction(pSoldier);
|
||||||
}
|
}
|
||||||
else if (CREATURE_OR_BLOODCAT( pSoldier ))
|
else if (CREATURE_OR_BLOODCAT( pSoldier ))
|
||||||
|
#else
|
||||||
|
if (CREATURE_OR_BLOODCAT( pSoldier ))
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
pSoldier->aiData.bAction = CreatureDecideAction( pSoldier );
|
pSoldier->aiData.bAction = CreatureDecideAction( pSoldier );
|
||||||
}
|
}
|
||||||
@@ -2000,7 +2007,9 @@ void TurnBasedHandleNPCAI(SOLDIERTYPE *pSoldier)
|
|||||||
{
|
{
|
||||||
// turn based... abort this guy's turn
|
// turn based... abort this guy's turn
|
||||||
EndAIGuysTurn( pSoldier );
|
EndAIGuysTurn( pSoldier );
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
lastdecisioncount = 0;
|
lastdecisioncount = 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -2281,8 +2290,10 @@ INT8 ExecuteAction(SOLDIERTYPE *pSoldier)
|
|||||||
StartEnemyTaunt( pSoldier, TAUNT_SEEK_NOISE );
|
StartEnemyTaunt( pSoldier, TAUNT_SEEK_NOISE );
|
||||||
else if (pSoldier->aiData.bAction == AI_ACTION_RUN_AWAY )
|
else if (pSoldier->aiData.bAction == AI_ACTION_RUN_AWAY )
|
||||||
StartEnemyTaunt( pSoldier, TAUNT_RUN_AWAY );
|
StartEnemyTaunt( pSoldier, TAUNT_RUN_AWAY );
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
else if ( pSoldier->IsZombie() ) // Madd: Zombies randomly moan...
|
else if ( pSoldier->IsZombie() ) // Madd: Zombies randomly moan...
|
||||||
pSoldier->DoMercBattleSound( (INT8)( BATTLE_SOUND_LAUGH1 ) );
|
pSoldier->DoMercBattleSound( (INT8)( BATTLE_SOUND_LAUGH1 ) );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case AI_ACTION_APPROACH_MERC: // walk up to someone to talk
|
case AI_ACTION_APPROACH_MERC: // walk up to someone to talk
|
||||||
|
|||||||
+83
-79
@@ -1296,98 +1296,100 @@ INT32 ClosestSeenOpponent(SOLDIERTYPE *pSoldier, INT32 * psGridNo, INT8 * pbLeve
|
|||||||
|
|
||||||
|
|
||||||
// special variant with a minor twist for the zombie AI
|
// special variant with a minor twist for the zombie AI
|
||||||
INT32 ClosestSeenOpponentforZombie(SOLDIERTYPE *pSoldier, INT32 * psGridNo, INT8 * pbLevel)
|
#ifdef ENABLE_ZOMBIES
|
||||||
{
|
INT32 ClosestSeenOpponentforZombie(SOLDIERTYPE *pSoldier, INT32 * psGridNo, INT8 * pbLevel)
|
||||||
INT32 sGridNo, sClosestOpponent = NOWHERE;
|
|
||||||
UINT32 uiLoop;
|
|
||||||
INT32 iRange, iClosestRange = 1500;
|
|
||||||
INT8 *pbPersOL;
|
|
||||||
INT8 bLevel, bClosestLevel;
|
|
||||||
SOLDIERTYPE * pOpp;
|
|
||||||
|
|
||||||
bClosestLevel = -1;
|
|
||||||
|
|
||||||
// look through this man's personal & public opplists for opponents known
|
|
||||||
for (uiLoop = 0; uiLoop < guiNumMercSlots; uiLoop++)
|
|
||||||
{
|
{
|
||||||
pOpp = MercSlots[ uiLoop ];
|
INT32 sGridNo, sClosestOpponent = NOWHERE;
|
||||||
|
UINT32 uiLoop;
|
||||||
|
INT32 iRange, iClosestRange = 1500;
|
||||||
|
INT8 *pbPersOL;
|
||||||
|
INT8 bLevel, bClosestLevel;
|
||||||
|
SOLDIERTYPE * pOpp;
|
||||||
|
|
||||||
// if this merc is inactive, at base, on assignment, or dead
|
bClosestLevel = -1;
|
||||||
if (!pOpp)
|
|
||||||
|
// look through this man's personal & public opplists for opponents known
|
||||||
|
for (uiLoop = 0; uiLoop < guiNumMercSlots; uiLoop++)
|
||||||
{
|
{
|
||||||
continue; // next merc
|
pOpp = MercSlots[ uiLoop ];
|
||||||
|
|
||||||
|
// if this merc is inactive, at base, on assignment, or dead
|
||||||
|
if (!pOpp)
|
||||||
|
{
|
||||||
|
continue; // next merc
|
||||||
|
}
|
||||||
|
|
||||||
|
// if this merc is neutral/on same side, he's not an opponent
|
||||||
|
if ( CONSIDERED_NEUTRAL( pSoldier, pOpp ) || (pSoldier->bSide == pOpp->bSide))
|
||||||
|
{
|
||||||
|
continue; // next merc
|
||||||
|
}
|
||||||
|
|
||||||
|
// Special stuff for Carmen the bounty hunter
|
||||||
|
if (pSoldier->aiData.bAttitude == ATTACKSLAYONLY && pOpp->ubProfile != 64)
|
||||||
|
{
|
||||||
|
continue; // next opponent
|
||||||
|
}
|
||||||
|
|
||||||
|
pbPersOL = pSoldier->aiData.bOppList + pOpp->ubID;
|
||||||
|
|
||||||
|
// if this opponent is not seen personally
|
||||||
|
if (*pbPersOL != SEEN_CURRENTLY)
|
||||||
|
{
|
||||||
|
continue; // next merc
|
||||||
|
}
|
||||||
|
|
||||||
|
// since we're dealing with seen people, use exact gridnos
|
||||||
|
sGridNo = pOpp->sGridNo;
|
||||||
|
bLevel = pOpp->pathing.bLevel;
|
||||||
|
|
||||||
|
// if we are standing at that gridno(!, obviously our info is old...)
|
||||||
|
if (sGridNo == pSoldier->sGridNo)
|
||||||
|
{
|
||||||
|
continue; // next merc
|
||||||
|
}
|
||||||
|
|
||||||
|
// special: allow zombies to also find opponents on a roof
|
||||||
|
// otherwise they have will never decide to climb a roof while they are seeing an enemy
|
||||||
|
// this function is used only for turning towards closest opponent or changing stance
|
||||||
|
// as such, if they AI is in a building,
|
||||||
|
// we should ignore people who are on the roof of the same building as the AI
|
||||||
|
if ( !pSoldier->IsZombie() && (bLevel != pSoldier->pathing.bLevel) && SameBuilding( pSoldier->sGridNo, sGridNo ) )
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// I hope this will be good enough; otherwise we need a fractional/world-units-based 2D distance function
|
||||||
|
//sRange = PythSpacesAway( pSoldier->sGridNo, sGridNo);
|
||||||
|
iRange = GetRangeInCellCoordsFromGridNoDiff( pSoldier->sGridNo, sGridNo );
|
||||||
|
|
||||||
|
if (iRange < iClosestRange)
|
||||||
|
{
|
||||||
|
iClosestRange = iRange;
|
||||||
|
sClosestOpponent = sGridNo;
|
||||||
|
bClosestLevel = bLevel;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if this merc is neutral/on same side, he's not an opponent
|
#ifdef DEBUGDECISIONS
|
||||||
if ( CONSIDERED_NEUTRAL( pSoldier, pOpp ) || (pSoldier->bSide == pOpp->bSide))
|
if (!TileIsOutOfBounds(sClosestOpponent))
|
||||||
{
|
{
|
||||||
continue; // next merc
|
AINumMessage("CLOSEST OPPONENT is at gridno ",sClosestOpponent);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Special stuff for Carmen the bounty hunter
|
if (psGridNo)
|
||||||
if (pSoldier->aiData.bAttitude == ATTACKSLAYONLY && pOpp->ubProfile != 64)
|
|
||||||
{
|
{
|
||||||
continue; // next opponent
|
*psGridNo = sClosestOpponent;
|
||||||
}
|
}
|
||||||
|
if (pbLevel)
|
||||||
pbPersOL = pSoldier->aiData.bOppList + pOpp->ubID;
|
|
||||||
|
|
||||||
// if this opponent is not seen personally
|
|
||||||
if (*pbPersOL != SEEN_CURRENTLY)
|
|
||||||
{
|
{
|
||||||
continue; // next merc
|
*pbLevel = bClosestLevel;
|
||||||
}
|
}
|
||||||
|
return( sClosestOpponent );
|
||||||
// since we're dealing with seen people, use exact gridnos
|
|
||||||
sGridNo = pOpp->sGridNo;
|
|
||||||
bLevel = pOpp->pathing.bLevel;
|
|
||||||
|
|
||||||
// if we are standing at that gridno(!, obviously our info is old...)
|
|
||||||
if (sGridNo == pSoldier->sGridNo)
|
|
||||||
{
|
|
||||||
continue; // next merc
|
|
||||||
}
|
|
||||||
|
|
||||||
// special: allow zombies to also find opponents on a roof
|
|
||||||
// otherwise they have will never decide to climb a roof while they are seeing an enemy
|
|
||||||
// this function is used only for turning towards closest opponent or changing stance
|
|
||||||
// as such, if they AI is in a building,
|
|
||||||
// we should ignore people who are on the roof of the same building as the AI
|
|
||||||
if ( !pSoldier->IsZombie() && (bLevel != pSoldier->pathing.bLevel) && SameBuilding( pSoldier->sGridNo, sGridNo ) )
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// I hope this will be good enough; otherwise we need a fractional/world-units-based 2D distance function
|
|
||||||
//sRange = PythSpacesAway( pSoldier->sGridNo, sGridNo);
|
|
||||||
iRange = GetRangeInCellCoordsFromGridNoDiff( pSoldier->sGridNo, sGridNo );
|
|
||||||
|
|
||||||
if (iRange < iClosestRange)
|
|
||||||
{
|
|
||||||
iClosestRange = iRange;
|
|
||||||
sClosestOpponent = sGridNo;
|
|
||||||
bClosestLevel = bLevel;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef DEBUGDECISIONS
|
|
||||||
if (!TileIsOutOfBounds(sClosestOpponent))
|
|
||||||
{
|
|
||||||
AINumMessage("CLOSEST OPPONENT is at gridno ",sClosestOpponent);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (psGridNo)
|
|
||||||
{
|
|
||||||
*psGridNo = sClosestOpponent;
|
|
||||||
}
|
|
||||||
if (pbLevel)
|
|
||||||
{
|
|
||||||
*pbLevel = bClosestLevel;
|
|
||||||
}
|
|
||||||
return( sClosestOpponent );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
INT32 ClosestPC( SOLDIERTYPE *pSoldier, INT32 * psDistance )
|
INT32 ClosestPC( SOLDIERTYPE *pSoldier, INT32 * psDistance )
|
||||||
{
|
{
|
||||||
@@ -2581,9 +2583,11 @@ UINT8 SoldierDifficultyLevel( SOLDIERTYPE * pSoldier )
|
|||||||
bDifficulty = 4;
|
bDifficulty = 4;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
case SOLDIER_CLASS_ZOMBIE:
|
case SOLDIER_CLASS_ZOMBIE:
|
||||||
bDifficulty = bDifficultyBase;
|
bDifficulty = bDifficultyBase;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (pSoldier->bTeam == CREATURE_TEAM)
|
if (pSoldier->bTeam == CREATURE_TEAM)
|
||||||
@@ -2733,7 +2737,7 @@ void AINameMessage(SOLDIERTYPE * pSoldier,const STR8 str,INT32 num)
|
|||||||
// friendlies. The idea is to return a value called "TacticalSituation" which can tell a combatant
|
// friendlies. The idea is to return a value called "TacticalSituation" which can tell a combatant
|
||||||
// whether he should try to undertake a smarter course of action.
|
// whether he should try to undertake a smarter course of action.
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/*
|
||||||
INT16 AssessTacticalSituation( INT8 bTeam )
|
INT16 AssessTacticalSituation( INT8 bTeam )
|
||||||
{
|
{
|
||||||
UINT16 ubFriendlyTeamTacticalValue = 0;
|
UINT16 ubFriendlyTeamTacticalValue = 0;
|
||||||
@@ -2815,7 +2819,7 @@ INT16 AssessTacticalSituation( INT8 bTeam )
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// HEADROCK: Function to check whether a team can see the specified soldier.
|
// HEADROCK: Function to check whether a team can see the specified soldier.
|
||||||
BOOLEAN TeamSeesOpponent( INT8 bTeam, SOLDIERTYPE * pOpponent )
|
BOOLEAN TeamSeesOpponent( INT8 bTeam, SOLDIERTYPE * pOpponent )
|
||||||
|
|||||||
+1901
-1888
File diff suppressed because it is too large
Load Diff
@@ -27,10 +27,12 @@ INT8 RTPlayerDecideAction( SOLDIERTYPE * pSoldier )
|
|||||||
{
|
{
|
||||||
bAction = DecideAutoBandage( pSoldier );
|
bAction = DecideAutoBandage( pSoldier );
|
||||||
}
|
}
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
else if ( pSoldier->IsZombie() )
|
else if ( pSoldier->IsZombie() )
|
||||||
{
|
{
|
||||||
bAction = ZombieDecideAction( pSoldier );
|
bAction = ZombieDecideAction( pSoldier );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bAction = DecideAction( pSoldier );
|
bAction = DecideAction( pSoldier );
|
||||||
@@ -51,10 +53,12 @@ INT8 RTDecideAction(SOLDIERTYPE *pSoldier)
|
|||||||
{
|
{
|
||||||
return( CreatureDecideAction( pSoldier ) );
|
return( CreatureDecideAction( pSoldier ) );
|
||||||
}
|
}
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
else if ( pSoldier->IsZombie() )
|
else if ( pSoldier->IsZombie() )
|
||||||
{
|
{
|
||||||
return( ZombieDecideAction( pSoldier ) );
|
return( ZombieDecideAction( pSoldier ) );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else if (pSoldier->ubBodyType == CROW)
|
else if (pSoldier->ubBodyType == CROW)
|
||||||
{
|
{
|
||||||
return( CrowDecideAction( pSoldier ) );
|
return( CrowDecideAction( pSoldier ) );
|
||||||
|
|||||||
@@ -1582,8 +1582,25 @@ BOOLEAN DamageSoldierFromBlast( UINT8 ubPerson, UINT8 ubOwner, INT32 sBombGridNo
|
|||||||
sNewWoundAmt = max( 1, (INT16)(sNewWoundAmt * (100 - gSkillTraitValues.ubBBDamageResistance) / 100));
|
sNewWoundAmt = max( 1, (INT16)(sNewWoundAmt * (100 - gSkillTraitValues.ubBBDamageResistance) / 100));
|
||||||
|
|
||||||
// Flugente: moved the damage calculation into a separate function
|
// Flugente: moved the damage calculation into a separate function
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
if ( pSoldier->GetDamageResistance(FALSE, FALSE) > 0 )
|
if ( pSoldier->GetDamageResistance(FALSE, FALSE) > 0 )
|
||||||
sNewWoundAmt -= ((sNewWoundAmt * pSoldier->GetDamageResistance(FALSE, FALSE)) /100);
|
sNewWoundAmt -= ((sNewWoundAmt * pSoldier->GetDamageResistance(FALSE, FALSE)) /100);
|
||||||
|
#else
|
||||||
|
// Damage resistance for Militia
|
||||||
|
if (pSoldier->ubSoldierClass == SOLDIER_CLASS_GREEN_MILITIA && gGameExternalOptions.bGreenMilitiaDamageResistance != 0)
|
||||||
|
sNewWoundAmt -= ((sNewWoundAmt * gGameExternalOptions.bGreenMilitiaDamageResistance) /100);
|
||||||
|
else if (pSoldier->ubSoldierClass == SOLDIER_CLASS_REG_MILITIA && gGameExternalOptions.bRegularMilitiaDamageResistance != 0)
|
||||||
|
sNewWoundAmt -= ((sNewWoundAmt * gGameExternalOptions.bRegularMilitiaDamageResistance) /100);
|
||||||
|
else if (pSoldier->ubSoldierClass == SOLDIER_CLASS_ELITE_MILITIA && gGameExternalOptions.bVeteranMilitiaDamageResistance != 0)
|
||||||
|
sNewWoundAmt -= ((sNewWoundAmt * gGameExternalOptions.bVeteranMilitiaDamageResistance) /100);
|
||||||
|
// bonus for enemy too
|
||||||
|
else if (pSoldier->ubSoldierClass == SOLDIER_CLASS_ADMINISTRATOR && gGameExternalOptions.sEnemyAdminDamageResistance != 0)
|
||||||
|
sNewWoundAmt -= ((sNewWoundAmt * gGameExternalOptions.sEnemyAdminDamageResistance) /100);
|
||||||
|
else if (pSoldier->ubSoldierClass == SOLDIER_CLASS_ARMY && gGameExternalOptions.sEnemyRegularDamageResistance != 0)
|
||||||
|
sNewWoundAmt -= ((sNewWoundAmt * gGameExternalOptions.sEnemyRegularDamageResistance) /100);
|
||||||
|
else if (pSoldier->ubSoldierClass == SOLDIER_CLASS_ELITE && gGameExternalOptions.sEnemyEliteDamageResistance != 0)
|
||||||
|
sNewWoundAmt -= ((sNewWoundAmt * gGameExternalOptions.sEnemyEliteDamageResistance) /100);
|
||||||
|
#endif
|
||||||
|
|
||||||
// we can loose stats due to being hit by the blast
|
// we can loose stats due to being hit by the blast
|
||||||
else if ( gGameOptions.fNewTraitSystem && Explosive[Item[usItem].ubClassIndex].ubType == EXPLOSV_NORMAL &&
|
else if ( gGameOptions.fNewTraitSystem && Explosive[Item[usItem].ubClassIndex].ubType == EXPLOSV_NORMAL &&
|
||||||
@@ -1783,6 +1800,38 @@ BOOLEAN DamageSoldierFromBlast( UINT8 ubPerson, UINT8 ubOwner, INT32 sBombGridNo
|
|||||||
}
|
}
|
||||||
//////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
|
// Nothing to do here
|
||||||
|
#else
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// SANDRO - option to make special NPCs stronger - damage resistance
|
||||||
|
if (gGameExternalOptions.usSpecialNPCStronger > 0)
|
||||||
|
{
|
||||||
|
switch( pSoldier->ubProfile )
|
||||||
|
{
|
||||||
|
case CARMEN:
|
||||||
|
case QUEEN:
|
||||||
|
case JOE:
|
||||||
|
case ANNIE:
|
||||||
|
case CHRIS:
|
||||||
|
case KINGPIN:
|
||||||
|
case TIFFANY:
|
||||||
|
case T_REX:
|
||||||
|
case DRUGGIST:
|
||||||
|
case GENERAL:
|
||||||
|
case JACK:
|
||||||
|
case OLAF:
|
||||||
|
case RAY:
|
||||||
|
case OLGA:
|
||||||
|
case TYRONE:
|
||||||
|
case MIKE:
|
||||||
|
sNewWoundAmt -= (sNewWoundAmt * gGameExternalOptions.usSpecialNPCStronger / 200);
|
||||||
|
sNewWoundAmt = max( 1, sNewWoundAmt);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// SANDRO - new merc records - times wounded (blasted by explosion)
|
// SANDRO - new merc records - times wounded (blasted by explosion)
|
||||||
if ( ( sNewWoundAmt > 1 || sBreathAmt > 1000 ) && pSoldier->ubProfile != NO_PROFILE )
|
if ( ( sNewWoundAmt > 1 || sBreathAmt > 1000 ) && pSoldier->ubProfile != NO_PROFILE )
|
||||||
gMercProfiles[ pSoldier->ubProfile ].records.usTimesWoundedBlasted++;
|
gMercProfiles[ pSoldier->ubProfile ].records.usTimesWoundedBlasted++;
|
||||||
@@ -1882,7 +1931,11 @@ BOOLEAN DishOutGasDamage( SOLDIERTYPE * pSoldier, EXPLOSIVETYPE * pExplosive, IN
|
|||||||
if ( pExplosive->ubType == EXPLOSV_TEARGAS )
|
if ( pExplosive->ubType == EXPLOSV_TEARGAS )
|
||||||
{
|
{
|
||||||
// zombies and robots are unaffected by tear gas
|
// zombies and robots are unaffected by tear gas
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
if ( AM_A_ROBOT( pSoldier ) || pSoldier->IsZombie() )
|
if ( AM_A_ROBOT( pSoldier ) || pSoldier->IsZombie() )
|
||||||
|
#else
|
||||||
|
if ( AM_A_ROBOT( pSoldier ) )
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
return( fRecompileMovementCosts );
|
return( fRecompileMovementCosts );
|
||||||
}
|
}
|
||||||
@@ -1896,8 +1949,12 @@ BOOLEAN DishOutGasDamage( SOLDIERTYPE * pSoldier, EXPLOSIVETYPE * pExplosive, IN
|
|||||||
}
|
}
|
||||||
else if ( pExplosive->ubType == EXPLOSV_MUSTGAS )
|
else if ( pExplosive->ubType == EXPLOSV_MUSTGAS )
|
||||||
{
|
{
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
// zombies and robots are unaffected by mustard gas
|
// zombies and robots are unaffected by mustard gas
|
||||||
if ( AM_A_ROBOT( pSoldier ) || pSoldier->IsZombie() )
|
if ( AM_A_ROBOT( pSoldier ) || pSoldier->IsZombie() )
|
||||||
|
#else
|
||||||
|
if ( AM_A_ROBOT( pSoldier ) )
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
return( fRecompileMovementCosts );
|
return( fRecompileMovementCosts );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5115,7 +5115,10 @@ STR16 zOptionsToggleText[] =
|
|||||||
L"自动加速敌军回合", // Automatic fast forward through AI turns
|
L"自动加速敌军回合", // Automatic fast forward through AI turns
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
L"Allow Zombies", // TODO.Translate
|
L"Allow Zombies", // TODO.Translate
|
||||||
|
#endif
|
||||||
|
|
||||||
L"--作弊模式选项--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER,
|
L"--作弊模式选项--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER,
|
||||||
L"强制 Bobby Ray 送货", // force all pending Bobby Ray shipments
|
L"强制 Bobby Ray 送货", // force all pending Bobby Ray shipments
|
||||||
L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END
|
L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END
|
||||||
@@ -5228,7 +5231,10 @@ STR16 zOptionsScreenHelpText[] =
|
|||||||
L"打开时,敌军回合将被大幅加速。",
|
L"打开时,敌军回合将被大幅加速。",
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
L"When ON, zombies will span. Be aware!", // allow zombies // TODO.Translate
|
L"When ON, zombies will span. Be aware!", // allow zombies // TODO.Translate
|
||||||
|
#endif
|
||||||
|
|
||||||
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER",
|
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER",
|
||||||
L"强制 Bobby Ray 出货",
|
L"强制 Bobby Ray 出货",
|
||||||
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END",
|
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END",
|
||||||
|
|||||||
@@ -5114,7 +5114,10 @@ STR16 zOptionsToggleText[] =
|
|||||||
L"Auto Fast Forward AI Turns", // Automatic fast forward through AI turns // TODO.Translate
|
L"Auto Fast Forward AI Turns", // Automatic fast forward through AI turns // TODO.Translate
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
L"Allow Zombies", // TODO.Translate
|
L"Allow Zombies", // TODO.Translate
|
||||||
|
#endif
|
||||||
|
|
||||||
L"--Cheat Mode Options--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER,
|
L"--Cheat Mode Options--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER,
|
||||||
L"Force Bobby Ray shipments", // force all pending Bobby Ray shipments
|
L"Force Bobby Ray shipments", // force all pending Bobby Ray shipments
|
||||||
L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END
|
L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END
|
||||||
@@ -5227,7 +5230,10 @@ STR16 zOptionsScreenHelpText[] =
|
|||||||
L"When ON, AI turns will be much faster.", // TODO.Translate
|
L"When ON, AI turns will be much faster.", // TODO.Translate
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
L"When ON, zombies will span. Be aware!", // allow zombies // TODO.Translate
|
L"When ON, zombies will span. Be aware!", // allow zombies // TODO.Translate
|
||||||
|
#endif
|
||||||
|
|
||||||
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER",
|
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER",
|
||||||
L"Force all pending Bobby Ray shipments",
|
L"Force all pending Bobby Ray shipments",
|
||||||
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END",
|
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END",
|
||||||
|
|||||||
@@ -5113,7 +5113,10 @@ STR16 zOptionsToggleText[] =
|
|||||||
L"Auto Fast Forward AI Turns", // Automatic fast forward through AI turns
|
L"Auto Fast Forward AI Turns", // Automatic fast forward through AI turns
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
L"Allow Zombies", // Flugente Zombies 1.0
|
L"Allow Zombies", // Flugente Zombies 1.0
|
||||||
|
#endif
|
||||||
|
|
||||||
L"--Cheat Mode Options--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER,
|
L"--Cheat Mode Options--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER,
|
||||||
L"Force Bobby Ray shipments", // force all pending Bobby Ray shipments
|
L"Force Bobby Ray shipments", // force all pending Bobby Ray shipments
|
||||||
L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END
|
L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END
|
||||||
@@ -5226,7 +5229,10 @@ STR16 zOptionsScreenHelpText[] =
|
|||||||
L"When ON, AI turns will be much faster.",
|
L"When ON, AI turns will be much faster.",
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
L"When ON, zombies will spawn. Be aware!", // allow zombies
|
L"When ON, zombies will spawn. Be aware!", // allow zombies
|
||||||
|
#endif
|
||||||
|
|
||||||
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER",
|
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER",
|
||||||
L"Force all pending Bobby Ray shipments",
|
L"Force all pending Bobby Ray shipments",
|
||||||
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END",
|
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END",
|
||||||
|
|||||||
@@ -5104,7 +5104,10 @@ STR16 zOptionsToggleText[] =
|
|||||||
L"Auto Fast Forward AI Turns", // Automatic fast forward through AI turns // TODO.Translate
|
L"Auto Fast Forward AI Turns", // Automatic fast forward through AI turns // TODO.Translate
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
L"Allow Zombies", // Flugente Zombies 1.0
|
L"Allow Zombies", // Flugente Zombies 1.0
|
||||||
|
#endif
|
||||||
|
|
||||||
L"--Cheat Mode Options--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER,
|
L"--Cheat Mode Options--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER,
|
||||||
L"Forcer envois Bobby Ray", // force all pending Bobby Ray shipments
|
L"Forcer envois Bobby Ray", // force all pending Bobby Ray shipments
|
||||||
L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END
|
L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END
|
||||||
@@ -5217,7 +5220,10 @@ STR16 zOptionsScreenHelpText[] =
|
|||||||
L"When ON, AI turns will be much faster.", // TODO.Translate
|
L"When ON, AI turns will be much faster.", // TODO.Translate
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
L"When ON, zombies will span. Be aware!", // allow zombies // TODO.Translate
|
L"When ON, zombies will span. Be aware!", // allow zombies // TODO.Translate
|
||||||
|
#endif
|
||||||
|
|
||||||
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER",
|
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER",
|
||||||
L"Forcer tous les envois en attente de Bobby Ray",
|
L"Forcer tous les envois en attente de Bobby Ray",
|
||||||
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END",
|
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END",
|
||||||
|
|||||||
@@ -4962,7 +4962,10 @@ STR16 zOptionsToggleText[] =
|
|||||||
L"Autom. schnelle Gegner-Züge", // Automatic fast forward through AI turns
|
L"Autom. schnelle Gegner-Züge", // Automatic fast forward through AI turns
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
L"Allow Zombies", // Flugente Zombies 1.0
|
L"Allow Zombies", // Flugente Zombies 1.0
|
||||||
|
#endif
|
||||||
|
|
||||||
L"--Cheat Mode Options--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER,
|
L"--Cheat Mode Options--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER,
|
||||||
L"Erzwinge BR Lieferung", // force all pending Bobby Ray shipments
|
L"Erzwinge BR Lieferung", // force all pending Bobby Ray shipments
|
||||||
L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END
|
L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END
|
||||||
@@ -5075,7 +5078,10 @@ STR16 zOptionsScreenHelpText[] =
|
|||||||
L"Wenn diese Funktion aktiviert ist, werden gegnerische Züge schneller durchgeführt.",
|
L"Wenn diese Funktion aktiviert ist, werden gegnerische Züge schneller durchgeführt.",
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
L"When ON, zombies will span. Be aware!", // allow zombies // TODO.Translate
|
L"When ON, zombies will span. Be aware!", // allow zombies // TODO.Translate
|
||||||
|
#endif
|
||||||
|
|
||||||
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER",
|
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER",
|
||||||
L"Force all pending Bobby Ray shipments",
|
L"Force all pending Bobby Ray shipments",
|
||||||
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END",
|
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END",
|
||||||
|
|||||||
@@ -5099,7 +5099,10 @@ STR16 zOptionsToggleText[] =
|
|||||||
L"Auto Fast Forward AI Turns", // Automatic fast forward through AI turns // TODO.Translate
|
L"Auto Fast Forward AI Turns", // Automatic fast forward through AI turns // TODO.Translate
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
L"Allow Zombies", // Flugente Zombies 1.0
|
L"Allow Zombies", // Flugente Zombies 1.0
|
||||||
|
#endif
|
||||||
|
|
||||||
L"--Cheat Mode Options--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER,
|
L"--Cheat Mode Options--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER,
|
||||||
L"Force Bobby Ray shipments", // force all pending Bobby Ray shipments
|
L"Force Bobby Ray shipments", // force all pending Bobby Ray shipments
|
||||||
L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END
|
L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END
|
||||||
@@ -5212,7 +5215,10 @@ STR16 zOptionsScreenHelpText[] =
|
|||||||
L"When ON, AI turns will be much faster.", // TODO.Translate
|
L"When ON, AI turns will be much faster.", // TODO.Translate
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
L"When ON, zombies will span. Be aware!", // allow zombies // TODO.Translate
|
L"When ON, zombies will span. Be aware!", // allow zombies // TODO.Translate
|
||||||
|
#endif
|
||||||
|
|
||||||
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER",
|
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER",
|
||||||
L"Force all pending Bobby Ray shipments",
|
L"Force all pending Bobby Ray shipments",
|
||||||
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END",
|
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END",
|
||||||
|
|||||||
@@ -5111,7 +5111,10 @@ STR16 zOptionsToggleText[] =
|
|||||||
L"Auto Fast Forward AI Turns", // Automatic fast forward through AI turns // TODO.Translate
|
L"Auto Fast Forward AI Turns", // Automatic fast forward through AI turns // TODO.Translate
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
L"Allow Zombies", // Flugente Zombies 1.0
|
L"Allow Zombies", // Flugente Zombies 1.0
|
||||||
|
#endif
|
||||||
|
|
||||||
L"--Cheat Mode Options--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER,
|
L"--Cheat Mode Options--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER,
|
||||||
L"Force Bobby Ray shipments", // force all pending Bobby Ray shipments
|
L"Force Bobby Ray shipments", // force all pending Bobby Ray shipments
|
||||||
L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END
|
L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END
|
||||||
@@ -5224,7 +5227,10 @@ STR16 zOptionsScreenHelpText[] =
|
|||||||
L"When ON, AI turns will be much faster.", // TODO.Translate
|
L"When ON, AI turns will be much faster.", // TODO.Translate
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
L"When ON, zombies will span. Be aware!", // allow zombies // TODO.Translate
|
L"When ON, zombies will span. Be aware!", // allow zombies // TODO.Translate
|
||||||
|
#endif
|
||||||
|
|
||||||
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER",
|
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER",
|
||||||
L"WymuŚ wszystkie oczekiwane dostawy od Bobby Ray's.",
|
L"WymuŚ wszystkie oczekiwane dostawy od Bobby Ray's.",
|
||||||
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END",
|
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END",
|
||||||
|
|||||||
@@ -5094,7 +5094,10 @@ STR16 zOptionsToggleText[] =
|
|||||||
L"Auto Fast Forward AI Turns", // Automatic fast forward through AI turns // TODO.Translate
|
L"Auto Fast Forward AI Turns", // Automatic fast forward through AI turns // TODO.Translate
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
L"Allow Zombies", // Flugente Zombies 1.0
|
L"Allow Zombies", // Flugente Zombies 1.0
|
||||||
|
#endif
|
||||||
|
|
||||||
L"--Читерские настройки--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER,
|
L"--Читерские настройки--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER,
|
||||||
L"Ускорить доставку Бобби Рэя", // force all pending Bobby Ray shipments
|
L"Ускорить доставку Бобби Рэя", // force all pending Bobby Ray shipments
|
||||||
L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END
|
L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END
|
||||||
@@ -5207,7 +5210,10 @@ STR16 zOptionsScreenHelpText[] =
|
|||||||
L"When ON, AI turns will be much faster.", // TODO.Translate
|
L"When ON, AI turns will be much faster.", // TODO.Translate
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
L"When ON, zombies will span. Be aware!", // allow zombies // TODO.Translate
|
L"When ON, zombies will span. Be aware!", // allow zombies // TODO.Translate
|
||||||
|
#endif
|
||||||
|
|
||||||
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER",
|
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER",
|
||||||
L"Выберите этот пункт чтобы груз Бобби Рэя прибыл немедленно.",
|
L"Выберите этот пункт чтобы груз Бобби Рэя прибыл немедленно.",
|
||||||
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END",
|
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END",
|
||||||
|
|||||||
@@ -5115,7 +5115,10 @@ STR16 zOptionsToggleText[] =
|
|||||||
L"Auto Fast Forward AI Turns", // Automatic fast forward through AI turns // TODO.Translate
|
L"Auto Fast Forward AI Turns", // Automatic fast forward through AI turns // TODO.Translate
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
L"Allow Zombies", // Flugente Zombies 1.0
|
L"Allow Zombies", // Flugente Zombies 1.0
|
||||||
|
#endif
|
||||||
|
|
||||||
L"--Cheat Mode Options--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER,
|
L"--Cheat Mode Options--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER,
|
||||||
L"Force Bobby Ray shipments", // force all pending Bobby Ray shipments
|
L"Force Bobby Ray shipments", // force all pending Bobby Ray shipments
|
||||||
L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END
|
L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END
|
||||||
@@ -5228,7 +5231,10 @@ STR16 zOptionsScreenHelpText[] =
|
|||||||
L"When ON, AI turns will be much faster.", // TODO.Translate
|
L"When ON, AI turns will be much faster.", // TODO.Translate
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_ZOMBIES
|
||||||
L"When ON, zombies will span. Be aware!", // allow zombies // TODO.Translate
|
L"When ON, zombies will span. Be aware!", // allow zombies // TODO.Translate
|
||||||
|
#endif
|
||||||
|
|
||||||
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER",
|
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER",
|
||||||
L"Force all pending Bobby Ray shipments",
|
L"Force all pending Bobby Ray shipments",
|
||||||
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END",
|
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END",
|
||||||
|
|||||||
+13
-1
@@ -3,10 +3,22 @@
|
|||||||
|
|
||||||
#include "Language Defines.h"
|
#include "Language Defines.h"
|
||||||
|
|
||||||
|
// -----------------------------
|
||||||
|
// *****************************
|
||||||
|
// WANNE: Enable this define, to build an executable where you can enable/disable zombies in tactical (ingame option screen).
|
||||||
|
// It seems, that executables compiled with this zombie option turned on, causes slowdown in tactical.
|
||||||
|
//#define ENABLE_ZOMBIES
|
||||||
|
// -----------------------------
|
||||||
|
// *****************************
|
||||||
|
|
||||||
|
// -----------------------------
|
||||||
|
// *****************************
|
||||||
// WANNE: Enable this define, to build the gameloop with the highspeed timer. To use the highspeed timer, you also have to set the HIGHSPEED_TIMER = TRUE in ja2.ini
|
// WANNE: Enable this define, to build the gameloop with the highspeed timer. To use the highspeed timer, you also have to set the HIGHSPEED_TIMER = TRUE in ja2.ini
|
||||||
// CAUTION: A lot of games reported, when the exe is compiled with the highspeed timer on, the game runs very slowly in strategy map screen when doing repair, ..
|
// CAUTION: A lot of games reported, when the exe is compiled with the highspeed timer on, the game runs very slowly in strategy map screen when doing repair, ..
|
||||||
// This is the reason, why I made a compilation define, where we can turn on/off the highspeed timer.
|
// This is the reason, why I made a compilation define, where we can turn on/off the highspeed timer.
|
||||||
//#define USE_HIGHSPEED_GAMELOOP_TIMER
|
#define USE_HIGHSPEED_GAMELOOP_TIMER
|
||||||
|
// -----------------------------
|
||||||
|
// *****************************
|
||||||
|
|
||||||
// -----------------------------
|
// -----------------------------
|
||||||
// *****************************
|
// *****************************
|
||||||
|
|||||||
Reference in New Issue
Block a user