mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
Removed ENABLE_ZOMBIES-define
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8047 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -862,11 +862,9 @@ void GenerateRandomEquipment( SOLDIERCREATE_STRUCT *pp, INT8 bSoldierClass, INT8
|
||||
}
|
||||
break;
|
||||
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
case SOLDIER_CLASS_ZOMBIE:
|
||||
// zombies get no items at all...
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
UINT32 invsize = pp->Inv.size();
|
||||
@@ -1086,11 +1084,8 @@ void ChooseWeaponForSoldierCreateStruct( SOLDIERCREATE_STRUCT *pp, INT8 bWeaponC
|
||||
bStatus += (INT8)(HighestPlayerProgressPercentage() / 10);
|
||||
bStatus = (INT8)min( 100, bStatus );
|
||||
break;
|
||||
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
case SOLDIER_CLASS_ZOMBIE:
|
||||
bStatus = (INT8)(1); // if a zombie gets anything, it'll be broken
|
||||
#endif
|
||||
bStatus = 1; // if a zombie gets anything, it'll be broken
|
||||
default:
|
||||
bStatus = (INT8)(50 + Random( 51 ) );
|
||||
break;
|
||||
@@ -2144,9 +2139,7 @@ void ChooseFaceGearForSoldierCreateStruct( SOLDIERCREATE_STRUCT *pp )
|
||||
break;
|
||||
case SOLDIER_CLASS_ADMINISTRATOR:
|
||||
case SOLDIER_CLASS_GREEN_MILITIA:
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
case SOLDIER_CLASS_ZOMBIE:
|
||||
#endif
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
@@ -993,15 +993,14 @@ void HandleFirstHeliDropOfGame( )
|
||||
SayQuoteFromAnyBodyInSector( QUOTE_ENEMY_PRESENCE );
|
||||
|
||||
// Start music
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
UseCreatureMusic(HostileZombiesPresent());
|
||||
#endif
|
||||
#ifdef NEWMUSIC
|
||||
|
||||
#ifdef NEWMUSIC
|
||||
GlobalSoundID = MusicSoundValues[ SECTOR( gWorldSectorX, gWorldSectorY ) ].SoundTacticalTensor[gbWorldSectorZ];
|
||||
if ( MusicSoundValues[ SECTOR( gWorldSectorX, gWorldSectorY ) ].SoundTacticalTensor[gbWorldSectorZ] != -1 )
|
||||
SetMusicModeID( MUSIC_TACTICAL_ENEMYPRESENT, MusicSoundValues[ SECTOR( gWorldSectorX, gWorldSectorY ) ].SoundTacticalTensor[gbWorldSectorZ] );
|
||||
else
|
||||
#endif
|
||||
#endif
|
||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||
|
||||
}
|
||||
|
||||
+8
-18
@@ -6242,16 +6242,14 @@ void ExitCombatMode( )
|
||||
// unused
|
||||
//gfForceMusicToTense = TRUE;
|
||||
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
UseCreatureMusic(HostileZombiesPresent());
|
||||
#endif
|
||||
|
||||
#ifdef NEWMUSIC
|
||||
#ifdef NEWMUSIC
|
||||
GlobalSoundID = MusicSoundValues[ SECTOR( gWorldSectorX, gWorldSectorY ) ].SoundTacticalTensor[gbWorldSectorZ];
|
||||
if ( MusicSoundValues[ SECTOR( gWorldSectorX, gWorldSectorY ) ].SoundTacticalTensor[gbWorldSectorZ] != -1 )
|
||||
SetMusicModeID( MUSIC_TACTICAL_ENEMYPRESENT, MusicSoundValues[ SECTOR( gWorldSectorX, gWorldSectorY ) ].SoundTacticalTensor[gbWorldSectorZ] );
|
||||
else
|
||||
#endif
|
||||
#endif
|
||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||
|
||||
BetweenTurnsVisibilityAdjustments();
|
||||
@@ -6311,15 +6309,14 @@ void SetEnemyPresence( )
|
||||
#endif
|
||||
{
|
||||
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
UseCreatureMusic(HostileZombiesPresent());
|
||||
#endif
|
||||
#ifdef NEWMUSIC
|
||||
|
||||
#ifdef NEWMUSIC
|
||||
GlobalSoundID = MusicSoundValues[ SECTOR( gWorldSectorX, gWorldSectorY ) ].SoundTacticalTensor[gbWorldSectorZ];
|
||||
if ( MusicSoundValues[ SECTOR( gWorldSectorX, gWorldSectorY ) ].SoundTacticalTensor[gbWorldSectorZ] != -1 )
|
||||
SetMusicModeID( MUSIC_TACTICAL_ENEMYPRESENT, MusicSoundValues[ SECTOR( gWorldSectorX, gWorldSectorY ) ].SoundTacticalTensor[gbWorldSectorZ] );
|
||||
else
|
||||
#endif
|
||||
#endif
|
||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||
|
||||
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("SetEnemyPresence: warnings = false"));
|
||||
@@ -6658,15 +6655,14 @@ BOOLEAN CheckForEndOfCombatMode( BOOLEAN fIncrementTurnsNotSeen )
|
||||
// Begin tense music....
|
||||
// unused
|
||||
//gfForceMusicToTense = TRUE;
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
UseCreatureMusic(HostileZombiesPresent());
|
||||
#endif
|
||||
#ifdef NEWMUSIC
|
||||
|
||||
#ifdef NEWMUSIC
|
||||
GlobalSoundID = MusicSoundValues[ SECTOR( gWorldSectorX, gWorldSectorY ) ].SoundTacticalTensor[gbWorldSectorZ];
|
||||
if ( MusicSoundValues[ SECTOR( gWorldSectorX, gWorldSectorY ) ].SoundTacticalTensor[gbWorldSectorZ] != -1 )
|
||||
SetMusicModeID( MUSIC_TACTICAL_ENEMYPRESENT, MusicSoundValues[ SECTOR( gWorldSectorX, gWorldSectorY ) ].SoundTacticalTensor[gbWorldSectorZ] );
|
||||
else
|
||||
#endif
|
||||
#endif
|
||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||
|
||||
return( TRUE );
|
||||
@@ -7082,10 +7078,8 @@ BOOLEAN CheckForEndOfBattle( BOOLEAN fAnEnemyRetreated )
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
if ( HostileZombiesPresent() ) //Madd: got tired of the victory music playing right after the zombies arose
|
||||
return FALSE;
|
||||
#endif
|
||||
|
||||
// OK, this is to releave infinate looping...becasue we can kill guys in this function
|
||||
if ( gfKillingGuysForLosingBattle )
|
||||
@@ -7802,7 +7796,6 @@ UINT8 NumEnemyInSector( )
|
||||
|
||||
}
|
||||
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
UINT8 NumZombiesInSector( )
|
||||
{
|
||||
SOLDIERTYPE *pTeamSoldier;
|
||||
@@ -7822,7 +7815,6 @@ UINT8 NumZombiesInSector( )
|
||||
|
||||
return( ubNumZombies );
|
||||
}
|
||||
#endif
|
||||
|
||||
UINT8 NumEnemyInSectorExceptCreatures()
|
||||
{
|
||||
@@ -10056,7 +10048,6 @@ BOOLEAN HostileBloodcatsPresent( )
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
BOOLEAN HostileZombiesPresent( )
|
||||
{
|
||||
INT32 iLoop;
|
||||
@@ -10079,7 +10070,6 @@ BOOLEAN HostileZombiesPresent( )
|
||||
|
||||
return( FALSE );
|
||||
}
|
||||
#endif
|
||||
|
||||
void HandleCreatureTenseQuote( )
|
||||
{
|
||||
|
||||
@@ -318,10 +318,7 @@ void DoPOWPathChecks( );
|
||||
BOOLEAN HostileCiviliansWithGunsPresent( );
|
||||
BOOLEAN HostileCiviliansPresent( );
|
||||
BOOLEAN HostileBloodcatsPresent( );
|
||||
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
BOOLEAN HostileZombiesPresent( );
|
||||
#endif
|
||||
|
||||
UINT8 NumPCsInSector( );
|
||||
void SetSoldierNonNeutral( SOLDIERTYPE * pSoldier );
|
||||
@@ -353,10 +350,8 @@ BOOLEAN WillAirRaidBeStopped( INT16 sSectorX, INT16 sSectorY );
|
||||
// HEADROCK HAM 3.5: Externalized for First Arrival enemy check
|
||||
extern UINT8 NumEnemyInSector();
|
||||
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
// Flugente
|
||||
extern UINT8 NumZombiesInSector();
|
||||
#endif
|
||||
|
||||
// Flugente: offer the enemy the chance to surrender
|
||||
void HandleSurrenderOffer( SOLDIERTYPE* pSoldier );
|
||||
|
||||
@@ -590,11 +590,9 @@ INT32 AddRottingCorpse( ROTTING_CORPSE_DEFINITION *pCorpseDef )
|
||||
pCorpse->pAniTile->uiUserData = iIndex;
|
||||
pCorpse->iID = iIndex;
|
||||
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
// copy name of corpse definition...
|
||||
memcpy( &(pCorpse->name), &(pCorpseDef->name), sizeof(CHAR16) * 10 );
|
||||
pCorpse->name[9] = '\0';
|
||||
#endif
|
||||
|
||||
pCorpse->fActivated = TRUE;
|
||||
|
||||
@@ -865,7 +863,6 @@ BOOLEAN TurnSoldierIntoCorpse( SOLDIERTYPE *pSoldier, BOOLEAN fRemoveMerc, BOOLE
|
||||
Corpse.usFlags |= ROTTING_CORPSE_USE_SNOW_CAMO_PALETTE;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
// Flugente Zombies: Determine if a zombie can rise from this corpse
|
||||
switch ( gGameExternalOptions.sZombieRiseBehaviour )
|
||||
{
|
||||
@@ -900,7 +897,6 @@ BOOLEAN TurnSoldierIntoCorpse( SOLDIERTYPE *pSoldier, BOOLEAN fRemoveMerc, BOOLE
|
||||
// Flugente: copy name of soldier...
|
||||
memcpy( &(Corpse.name), &(pSoldier->name), sizeof(CHAR16) * 10 );
|
||||
Corpse.name[9] = '\0';
|
||||
#endif
|
||||
|
||||
// if this soldier's uniform was damaged (gunfire, blade attacks, explosions) then don't allow to take the uniform. We can't stay hidden if we're covered in blood :-)
|
||||
if ( pSoldier->usSoldierFlagMask & SOLDIER_DAMAGED_VEST )
|
||||
@@ -2090,10 +2086,8 @@ BOOLEAN TakeCorpse( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bLevel )
|
||||
if ( pCorpse->def.usFlags & ROTTING_CORPSE_NO_PANTS )
|
||||
gTempObject[0]->data.sObjectFlag |= CORPSE_NO_PANTS;
|
||||
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
if ( pCorpse->def.usFlags & ROTTING_CORPSE_NEVER_RISE_AGAIN )
|
||||
gTempObject[0]->data.sObjectFlag |= CORPSE_NO_ZOMBIE_RISE;
|
||||
#endif
|
||||
|
||||
// now we have to get the correct flags for the object from the corpse, so that upon recreating the corpse, it looks the same
|
||||
UINT8 headpal = 0, skinpal = 0, vestpal = 0, pantspal = 0;
|
||||
@@ -2341,11 +2335,9 @@ BOOLEAN AddCorpseFromObject(OBJECTTYPE* pObj, INT32 sGridNo, INT8 bLevel )
|
||||
Corpse.fHeadTaken = FALSE;
|
||||
Corpse.ubAIWarningValue = 20;
|
||||
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
// Flugente: use zombie name (it's the only way this will ever be relevant again anyway)
|
||||
swprintf( Corpse.name, TacticalStr[ ZOMBIE_TEAM_MERC_NAME ] );
|
||||
Corpse.name[9] = '\0';
|
||||
#endif
|
||||
|
||||
INT32 iCorpseID = AddRottingCorpse( &Corpse );
|
||||
|
||||
@@ -2361,11 +2353,9 @@ BOOLEAN AddCorpseFromObject(OBJECTTYPE* pObj, INT32 sGridNo, INT8 bLevel )
|
||||
|
||||
if ( (*pObj)[0]->data.sObjectFlag & CORPSE_NO_PANTS )
|
||||
gRottingCorpse[ iCorpseID ].def.usFlags |= ROTTING_CORPSE_NO_PANTS;
|
||||
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
|
||||
if ( (*pObj)[0]->data.sObjectFlag & CORPSE_NO_ZOMBIE_RISE )
|
||||
gRottingCorpse[ iCorpseID ].def.usFlags |= ROTTING_CORPSE_NEVER_RISE_AGAIN;
|
||||
#endif
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -2585,7 +2575,6 @@ UINT8 GetNearestRottingCorpseAIWarning( INT32 sGridNo )
|
||||
return( ubHighestWarning );
|
||||
}
|
||||
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
// Flugente Zombies: resurrect zombies
|
||||
void RaiseZombies( void )
|
||||
{
|
||||
@@ -3011,7 +3000,6 @@ BOOLEAN CorpseOkToSpawnZombie( ROTTING_CORPSE * pCorpse, UINT16* pAnimState )
|
||||
|
||||
return( canbezombie );
|
||||
}
|
||||
#endif
|
||||
|
||||
// Flugente: can we take the clothes of this corpse?
|
||||
// calling this with NULL for soldier will give a general answer for any bodytype
|
||||
|
||||
@@ -86,9 +86,7 @@ enum RottingCorpseDefines
|
||||
#define ROTTING_CORPSE_USE_DESERT_CAMO_PALETTE 0x00000200 //We use desert palette here....
|
||||
#define ROTTING_CORPSE_USE_SNOW_CAMO_PALETTE 0x00000400 //We use snow palette here....
|
||||
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
#define ROTTING_CORPSE_NEVER_RISE_AGAIN 0x00000800 //a zombie cannot be created from this corpse (if not set, it'll eventually rise again )
|
||||
#endif
|
||||
#define ROTTING_CORPSE_NEVER_RISE_AGAIN 0x00000800 //a zombie cannot be created from this corpse (if not set, it'll eventually rise again )
|
||||
|
||||
// Flugente: corpses can now be gutted after they have been decapitated. Atm there is no corpse that can be both gutted and decapitated (to be done later)
|
||||
#define ROTTING_CORPSE_HEAD_TAKEN 0x00001000 // head has been taken off
|
||||
@@ -125,10 +123,8 @@ typedef struct
|
||||
|
||||
UINT8 ubFiller[ 10 ]; // Flugente: 12 -> 10, because usFlags was cahnged from UINT16 to UINT32
|
||||
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
// Flugente: added name so we can display individual name if corpse gets resurrected...
|
||||
CHAR16 name[ 10 ];
|
||||
#endif
|
||||
|
||||
} ROTTING_CORPSE_DEFINITION;
|
||||
|
||||
@@ -151,10 +147,8 @@ typedef struct
|
||||
BOOLEAN fAttractCrowsOnlyWhenOnScreen;
|
||||
INT32 iID;
|
||||
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
// Flugente: added name so we can display individual name if corpse gets resurrected...
|
||||
CHAR16 name[ 10 ];
|
||||
#endif
|
||||
|
||||
} ROTTING_CORPSE;
|
||||
|
||||
@@ -226,16 +220,14 @@ INT32 GetGridNoOfCorpseGivenProfileID( UINT8 ubProfileID );
|
||||
void DecayRottingCorpseAIWarnings( void );
|
||||
UINT8 GetNearestRottingCorpseAIWarning( INT32 sGridNo );
|
||||
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
// Flugente: Raise zombies
|
||||
void RaiseZombies( void );
|
||||
// Flugente: Raise zombies
|
||||
void RaiseZombies( void );
|
||||
|
||||
// Flugente: create a zombie from a corpse
|
||||
void CreateZombiefromCorpse( ROTTING_CORPSE * pCorpse, UINT16 usAnimState );
|
||||
// Flugente: create a zombie from a corpse
|
||||
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
|
||||
BOOLEAN CorpseOkToSpawnZombie( ROTTING_CORPSE * pCorpse, UINT16* pAnimState );
|
||||
#endif
|
||||
// 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 );
|
||||
|
||||
// Flugente: can we take the clothes of this corpse?
|
||||
BOOLEAN CorpseOkToDress( ROTTING_CORPSE* pCorpse );
|
||||
|
||||
@@ -3943,11 +3943,9 @@ BOOLEAN HandleSoldierDeath( SOLDIERTYPE *pSoldier , BOOLEAN *pfMadeCorpse )
|
||||
case SOLDIER_CLASS_CREATURE :
|
||||
gMercProfiles[ MercPtrs[ ubAttacker ]->ubProfile ].records.usKillsCreatures++;
|
||||
break;
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
case SOLDIER_CLASS_ZOMBIE :
|
||||
gMercProfiles[ MercPtrs[ ubAttacker ]->ubProfile ].records.usKillsZombies++;
|
||||
break;
|
||||
#endif
|
||||
default :
|
||||
if ( CREATURE_OR_BLOODCAT( pSoldier ) )
|
||||
gMercProfiles[ MercPtrs[ ubAttacker ]->ubProfile ].records.usKillsCreatures++;
|
||||
|
||||
@@ -150,10 +150,8 @@ extern BOOLEAN gfShiftBombPlant;
|
||||
#define MIN_SUBSEQUENT_SNDS_DELAY 2000
|
||||
#include "connect.h"
|
||||
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
extern void TeleportSelectedSoldier( void );
|
||||
extern BOOLEAN AddSoldierToSectorNoCalculateDirectionUseAnimation( UINT8 ubID, UINT16 usAnimState, UINT16 usAnimCode );
|
||||
#endif
|
||||
|
||||
// Flugente: external sector data
|
||||
extern SECTOR_EXT_DATA SectorExternalData[256][4];
|
||||
@@ -1369,11 +1367,7 @@ MERCPROFILESTRUCT& MERCPROFILESTRUCT::operator=(const OLD_MERCPROFILESTRUCT_101&
|
||||
this->records.usKillsAdmins = (src.usKills / 4);
|
||||
this->records.usKillsHostiles = 0;
|
||||
this->records.usKillsCreatures = 0;
|
||||
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
this->records.usKillsZombies = 0;
|
||||
#endif
|
||||
|
||||
this->records.usKillsTanks = 0;
|
||||
this->records.usKillsOthers = 0;
|
||||
this->records.usAssistsMercs = (src.usAssists * 3 / 4);
|
||||
@@ -9363,7 +9357,6 @@ void SOLDIERTYPE::BeginSoldierClimbUpRoof( void )
|
||||
this->ubPendingDirection = bNewDirection;
|
||||
//this->usPendingAnimation = CLIMBUPROOF;
|
||||
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
// Flugente: In case an animation is missing (zombies with bodytype of civilians), we TELEPORT instead
|
||||
if ( IsAnimationValidForBodyType( this, CLIMBUPROOF ) == FALSE )
|
||||
{
|
||||
@@ -9373,9 +9366,6 @@ void SOLDIERTYPE::BeginSoldierClimbUpRoof( void )
|
||||
}
|
||||
else
|
||||
this->EVENT_InitNewSoldierAnim( CLIMBUPROOF, 0, FALSE );
|
||||
#else
|
||||
this->EVENT_InitNewSoldierAnim( CLIMBUPROOF, 0, FALSE );
|
||||
#endif
|
||||
|
||||
this->InternalReceivingSoldierCancelServices( FALSE );
|
||||
this->InternalGivingSoldierCancelServices( FALSE );
|
||||
@@ -10059,15 +10049,12 @@ UINT8 SOLDIERTYPE::SoldierTakeDamage( INT8 bHeight, INT16 sLifeDeduct, INT16 sBr
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
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.
|
||||
// We don't want that, because he is dying, so we manually skip that animation
|
||||
this->usPendingAnimation = NO_PENDING_ANIMATION;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( fShowDamage )
|
||||
{
|
||||
@@ -10776,7 +10763,6 @@ BOOLEAN SOLDIERTYPE::InternalDoMercBattleSound( UINT8 ubBattleSoundID, INT8 bSpe
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
else if ( pSoldier->IsZombie( ) ) // Madd: add zombie sounds
|
||||
{
|
||||
if ( ubSoundID == BATTLE_SOUND_DIE1 )
|
||||
@@ -10796,7 +10782,6 @@ BOOLEAN SOLDIERTYPE::InternalDoMercBattleSound( UINT8 ubBattleSoundID, INT8 bSpe
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
else
|
||||
{
|
||||
if ( ubSoundID == BATTLE_SOUND_DIE1 )
|
||||
@@ -11054,7 +11039,6 @@ void SOLDIERTYPE::BeginSoldierClimbDownRoof( void )
|
||||
|
||||
this->ubPendingDirection = bNewDirection;
|
||||
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
// Flugente: In case an animation is missing (zombies with bodytype of civilians), we TELEPORT instead
|
||||
if ( IsAnimationValidForBodyType( this, JUMPDOWNWALL ) == FALSE )
|
||||
{
|
||||
@@ -11064,9 +11048,6 @@ void SOLDIERTYPE::BeginSoldierClimbDownRoof( void )
|
||||
}
|
||||
else
|
||||
this->EVENT_InitNewSoldierAnim( JUMPDOWNWALL, 0, FALSE );
|
||||
#else
|
||||
this->EVENT_InitNewSoldierAnim( JUMPDOWNWALL, 0, FALSE );
|
||||
#endif
|
||||
|
||||
this->InternalReceivingSoldierCancelServices( FALSE );
|
||||
this->InternalGivingSoldierCancelServices( FALSE );
|
||||
@@ -12330,7 +12311,6 @@ void SOLDIERTYPE::EVENT_SoldierBeginPunchAttack( INT32 sGridNo, UINT8 ubDirectio
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
// 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!
|
||||
if ( this->IsZombie( ) && IsAnimationValidForBodyType( this, PUNCH ) == FALSE )
|
||||
@@ -12397,13 +12377,10 @@ void SOLDIERTYPE::EVENT_SoldierBeginPunchAttack( INT32 sGridNo, UINT8 ubDirectio
|
||||
}
|
||||
else
|
||||
{
|
||||
#endif
|
||||
// Flugente: zombies do not kick
|
||||
BOOLEAN nokick = FALSE;
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
if ( this->IsZombie( ) )
|
||||
nokick = TRUE;
|
||||
#endif
|
||||
|
||||
// Look at stance of target
|
||||
switch ( gAnimControl[pTSoldier->usAnimState].ubEndHeight )
|
||||
@@ -12547,9 +12524,7 @@ void SOLDIERTYPE::EVENT_SoldierBeginPunchAttack( INT32 sGridNo, UINT8 ubDirectio
|
||||
}
|
||||
break;
|
||||
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14543,8 +14518,6 @@ INT32 SOLDIERTYPE::GetDamageResistance( BOOLEAN fAutoResolve, BOOLEAN fCalcBreat
|
||||
resistance += gGameExternalOptions.sEnemyRegularDamageResistance;
|
||||
else if ( this->ubSoldierClass == SOLDIER_CLASS_ELITE && gGameExternalOptions.sEnemyEliteDamageResistance != 0 )
|
||||
resistance += gGameExternalOptions.sEnemyEliteDamageResistance;
|
||||
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
else if ( IsZombie( ) )
|
||||
{
|
||||
if ( fCalcBreathLoss )
|
||||
@@ -14552,7 +14525,6 @@ INT32 SOLDIERTYPE::GetDamageResistance( BOOLEAN fAutoResolve, BOOLEAN fCalcBreat
|
||||
else
|
||||
resistance += gGameExternalOptions.sEnemyZombieDamageResistance;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -14652,11 +14624,7 @@ INT16 SOLDIERTYPE::GetSoldierCriticalDamageBonus( void )
|
||||
|
||||
BOOLEAN SOLDIERTYPE::IsZombie( void )
|
||||
{
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
return(ubSoldierClass == SOLDIER_CLASS_ZOMBIE);
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
// reset the extra stat variables
|
||||
|
||||
+41
-59
@@ -2399,9 +2399,7 @@ void CreateDetailedPlacementGivenBasicPlacementInfo( SOLDIERCREATE_STRUCT *pp, B
|
||||
switch( ubSoldierClass )
|
||||
{
|
||||
case SOLDIER_CLASS_ADMINISTRATOR:
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
case SOLDIER_CLASS_ZOMBIE:
|
||||
#endif
|
||||
pp->bExpLevel = (INT8) 2 + bExpLevelModifier;
|
||||
break;
|
||||
case SOLDIER_CLASS_ARMY:
|
||||
@@ -2553,21 +2551,18 @@ void CreateDetailedPlacementGivenBasicPlacementInfo( SOLDIERCREATE_STRUCT *pp, B
|
||||
//If it is a detailed placement, don't do this yet, as detailed placements may have their
|
||||
//own 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 )
|
||||
#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);
|
||||
|
||||
// Flugente testing: militia get equipment in a different way
|
||||
if ( pp->bTeam == MILITIA_TEAM && sX > 0 && sX < 17 && sY > 0 && sY < 17 )
|
||||
{
|
||||
INT8 sZ = gbWorldSectorZ > -1 ? gbWorldSectorZ : 0;
|
||||
// Flugente testing: militia get equipment in a different way
|
||||
if ( pp->bTeam == MILITIA_TEAM && sX > 0 && sX < 17 && sY > 0 && sY < 17 )
|
||||
{
|
||||
INT8 sZ = gbWorldSectorZ > -1 ? gbWorldSectorZ : 0;
|
||||
|
||||
TakeMilitiaEquipmentfromSector(sX, sY, sZ, pp, ubSoldierClass);
|
||||
}
|
||||
TakeMilitiaEquipmentfromSector(sX, sY, sZ, pp, ubSoldierClass);
|
||||
}
|
||||
}
|
||||
|
||||
DecideToAssignSniperOrders(pp);
|
||||
@@ -2739,11 +2734,7 @@ void CreateDetailedPlacementGivenStaticDetailedPlacementAndBasicPlacementInfo(
|
||||
// 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 )
|
||||
#else
|
||||
if( bp->ubSoldierClass != SOLDIER_CLASS_NONE && bp->ubSoldierClass != SOLDIER_CLASS_CREATURE && bp->ubSoldierClass != SOLDIER_CLASS_MINER )
|
||||
#endif
|
||||
{
|
||||
GenerateRandomEquipment( pp, bp->ubSoldierClass, bp->bRelativeEquipmentLevel);
|
||||
|
||||
@@ -2946,12 +2937,9 @@ SOLDIERTYPE* ReserveTacticalSoldierForAutoresolve( UINT8 ubSoldierClass )
|
||||
//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
|
||||
//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 )
|
||||
#else
|
||||
if( ubSoldierClass != SOLDIER_CLASS_CREATURE )
|
||||
#endif
|
||||
{ //use the enemy team
|
||||
{
|
||||
//use the enemy team
|
||||
iStart = gTacticalStatus.Team[ ENEMY_TEAM ].bFirstID;
|
||||
iEnd = gTacticalStatus.Team[ ENEMY_TEAM ].bLastID;
|
||||
}
|
||||
@@ -3171,41 +3159,39 @@ SOLDIERTYPE* TacticalCreateJeep()
|
||||
return( pSoldier );
|
||||
}
|
||||
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
//USED BY STRATEGIC AI and AUTORESOLVE
|
||||
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 )
|
||||
{
|
||||
BASIC_SOLDIERCREATE_STRUCT bp;
|
||||
SOLDIERCREATE_STRUCT pp;
|
||||
UINT8 ubID;
|
||||
SOLDIERTYPE * pSoldier;
|
||||
|
||||
if( guiCurrentScreen == AUTORESOLVE_SCREEN && !gfPersistantPBI )
|
||||
{
|
||||
pSoldier = ReserveTacticalSoldierForAutoresolve( SOLDIER_CLASS_ZOMBIE );
|
||||
if( pSoldier ) 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.ubBodyType = -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 );
|
||||
pSoldier = ReserveTacticalSoldierForAutoresolve( SOLDIER_CLASS_ZOMBIE );
|
||||
if( pSoldier ) return pSoldier;
|
||||
}
|
||||
#endif
|
||||
|
||||
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.ubBodyType = -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 );
|
||||
}
|
||||
|
||||
SOLDIERTYPE* ReserveTacticalMilitiaSoldierForAutoresolve( UINT8 ubSoldierClass )
|
||||
{
|
||||
@@ -5085,10 +5071,8 @@ BOOLEAN AssignTraitsToSoldier( SOLDIERTYPE *pSoldier, SOLDIERCREATE_STRUCT *pCre
|
||||
iChance = 10 + ubProgress / 4; // 10-35% chance
|
||||
else if ( ubSolClass == SOLDIER_CLASS_ADMINISTRATOR || ubSolClass == SOLDIER_CLASS_GREEN_MILITIA )
|
||||
iChance = ubProgress / 4; // 0-25% chance
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
else if ( ubSolClass == SOLDIER_CLASS_ZOMBIE )
|
||||
iChance = 100; // 100% chance
|
||||
#endif
|
||||
|
||||
if ( foundHtH ) // if found brass knuckless, increase the chance (doesn't happen often)
|
||||
iChance += 35;
|
||||
@@ -5132,10 +5116,8 @@ BOOLEAN AssignTraitsToSoldier( SOLDIERTYPE *pSoldier, SOLDIERCREATE_STRUCT *pCre
|
||||
iChance = 25 + ubProgress * 2 / 5; // 25-65% chance
|
||||
else if ( ubSolClass == SOLDIER_CLASS_ADMINISTRATOR || ubSolClass == SOLDIER_CLASS_GREEN_MILITIA )
|
||||
iChance = 10 + ubProgress * 2 / 5; // 10-50% chance
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
else if ( ubSolClass == SOLDIER_CLASS_ZOMBIE )
|
||||
iChance = 100; // 100% chance
|
||||
#endif
|
||||
|
||||
// modify the chance by preset ini setting
|
||||
if ( gGameExternalOptions.bAssignedTraitsRarity != 0 )
|
||||
|
||||
@@ -439,9 +439,7 @@ SOLDIERTYPE* TacticalCreateSoldier( SOLDIERCREATE_STRUCT *pCreateStruct, UINT8 *
|
||||
SOLDIERTYPE* TacticalCreateAdministrator();
|
||||
SOLDIERTYPE* TacticalCreateEliteEnemy();
|
||||
SOLDIERTYPE* TacticalCreateArmyTroop();
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
SOLDIERTYPE* TacticalCreateZombie(); // Flugente Zombies
|
||||
#endif
|
||||
SOLDIERTYPE* TacticalCreateZombie(); // Flugente Zombies
|
||||
SOLDIERTYPE* TacticalCreateMilitia( UINT8 ubMilitiaClass, INT16 sX, INT16 sY ); // Flugente: added sector coordinates
|
||||
SOLDIERTYPE* TacticalCreateCreature( INT8 bCreatureBodyType );
|
||||
SOLDIERTYPE* TacticalCreateEnemyTank();
|
||||
|
||||
@@ -277,13 +277,11 @@ void HandleTacticalEndTurn( )
|
||||
// Flugente: Cool down/decay all items not in a soldier's inventory
|
||||
CoolDownWorldItems();
|
||||
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
// Flugente: raise zombies if in gamescreen and option set
|
||||
if ( guiCurrentScreen == GAME_SCREEN )
|
||||
{
|
||||
RaiseZombies();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -477,13 +477,11 @@ void EndTurnEvents( void )
|
||||
// Flugente: Cool down/decay all items not in a soldier's inventory
|
||||
CoolDownWorldItems( );
|
||||
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
// Flugente: raise zombies if in gamescreen and option set
|
||||
if ( guiCurrentScreen == GAME_SCREEN )
|
||||
{
|
||||
RaiseZombies();
|
||||
}
|
||||
#endif
|
||||
|
||||
// decay AI warning values from corpses
|
||||
DecayRottingCorpseAIWarnings();
|
||||
|
||||
@@ -4859,10 +4859,7 @@ void DebugSoldierPage4( )
|
||||
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_MINER: gprintf( 320, LINE_HEIGHT * ubLine, L"(Miner)" ); break;
|
||||
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
case SOLDIER_CLASS_ZOMBIE: gprintf( 320, LINE_HEIGHT * ubLine, L"(Zombie)" ); break;
|
||||
#endif
|
||||
|
||||
default: break; //don't care (don't write anything)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user