mirror of
https://github.com/1dot13/source.git
synced 2026-08-26 14:30:26 +02:00
Convert SOLDIERTYPE->ubAttackerID to SoldierID
This commit is contained in:
@@ -3844,9 +3844,9 @@ void send_death( SOLDIERTYPE *pSoldier )
|
|||||||
if(pSoldier->ubID<20)nDeath.soldier_id=nDeath.soldier_id+ubID_prefix;
|
if(pSoldier->ubID<20)nDeath.soldier_id=nDeath.soldier_id+ubID_prefix;
|
||||||
|
|
||||||
// if soldier died from bleeding
|
// if soldier died from bleeding
|
||||||
if(pSoldier->ubAttackerID==NULL || pSoldier->ubAttackerID == NOBODY)
|
if(pSoldier->ubAttackerID >= NOBODY)
|
||||||
{
|
{
|
||||||
if (pSoldier->ubPreviousAttackerID != NOBODY && pSoldier->ubPreviousAttackerID != NULL)
|
if (pSoldier->ubPreviousAttackerID < NOBODY)
|
||||||
nDeath.attacker_id = pSoldier->ubPreviousAttackerID;
|
nDeath.attacker_id = pSoldier->ubPreviousAttackerID;
|
||||||
else if (pSoldier->ubNextToPreviousAttackerID != NOBODY && pSoldier->ubNextToPreviousAttackerID != NULL)
|
else if (pSoldier->ubNextToPreviousAttackerID != NOBODY && pSoldier->ubNextToPreviousAttackerID != NULL)
|
||||||
nDeath.attacker_id = pSoldier->ubNextToPreviousAttackerID;
|
nDeath.attacker_id = pSoldier->ubNextToPreviousAttackerID;
|
||||||
@@ -3871,8 +3871,8 @@ void send_death( SOLDIERTYPE *pSoldier )
|
|||||||
pAttacker=MercPtrs[ pSoldier->ubNextToPreviousAttackerID ];
|
pAttacker=MercPtrs[ pSoldier->ubNextToPreviousAttackerID ];
|
||||||
// if its still a friendly, use the original attacker id...for posterity
|
// if its still a friendly, use the original attacker id...for posterity
|
||||||
// guy must snore too loudly if all his mates wanna kill him :)
|
// guy must snore too loudly if all his mates wanna kill him :)
|
||||||
if (pAttacker->bTeam == pSoldier->bTeam && pSoldier->ubAttackerID != NULL && pSoldier->ubAttackerID != NOBODY)
|
if (pAttacker->bTeam == pSoldier->bTeam && pSoldier->ubAttackerID != NOBODY)
|
||||||
pAttacker = MercPtrs[ pSoldier->ubAttackerID ];
|
pAttacker = pSoldier->ubAttackerID;
|
||||||
|
|
||||||
nDeath.attacker_id = pAttacker->ubID;
|
nDeath.attacker_id = pAttacker->ubID;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ void StrategicHandlePlayerTeamMercDeath( SOLDIERTYPE *pSoldier )
|
|||||||
//add to the history log the fact that the merc died and the circumstances
|
//add to the history log the fact that the merc died and the circumstances
|
||||||
if( pSoldier->ubAttackerID != NOBODY )
|
if( pSoldier->ubAttackerID != NOBODY )
|
||||||
{
|
{
|
||||||
pKiller = MercPtrs[ pSoldier->ubAttackerID ];
|
pKiller = pSoldier->ubAttackerID;
|
||||||
}
|
}
|
||||||
|
|
||||||
// CJC Nov 11, 2002
|
// CJC Nov 11, 2002
|
||||||
@@ -141,7 +141,7 @@ void StrategicHandlePlayerTeamMercDeath( SOLDIERTYPE *pSoldier )
|
|||||||
gMercProfiles[ pSoldier->ubProfile ].ubSuspiciousDeath = VERY_SUSPICIOUS_DEATH;
|
gMercProfiles[ pSoldier->ubProfile ].ubSuspiciousDeath = VERY_SUSPICIOUS_DEATH;
|
||||||
}
|
}
|
||||||
// if killed by someone on our team, or while there weren't any opponents around
|
// if killed by someone on our team, or while there weren't any opponents around
|
||||||
else if (Menptr[ pSoldier->ubAttackerID ].bTeam == OUR_TEAM || !gTacticalStatus.fEnemyInSector )
|
else if (pSoldier->ubAttackerID->bTeam == OUR_TEAM || !gTacticalStatus.fEnemyInSector )
|
||||||
{
|
{
|
||||||
// cause insurance company to suspect fraud and investigate this claim
|
// cause insurance company to suspect fraud and investigate this claim
|
||||||
gMercProfiles[ pSoldier->ubProfile ].ubSuspiciousDeath = SUSPICIOUS_DEATH;
|
gMercProfiles[ pSoldier->ubProfile ].ubSuspiciousDeath = SUSPICIOUS_DEATH;
|
||||||
|
|||||||
@@ -740,13 +740,13 @@ void HandleMurderOfCivilian( SOLDIERTYPE *pSoldier, BOOLEAN fIntentional )
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
// set killer team
|
// set killer team
|
||||||
bKillerTeam = Menptr[ pSoldier->ubAttackerID ].bTeam;
|
bKillerTeam = pSoldier->ubAttackerID->bTeam;
|
||||||
|
|
||||||
|
|
||||||
// if the player did the killing
|
// if the player did the killing
|
||||||
if( bKillerTeam == OUR_TEAM )
|
if( bKillerTeam == OUR_TEAM )
|
||||||
{
|
{
|
||||||
SOLDIERTYPE *pKiller = MercPtrs[ pSoldier->ubAttackerID ];
|
SOLDIERTYPE *pKiller = pSoldier->ubAttackerID;
|
||||||
|
|
||||||
// apply morale penalty for killing a civilian!
|
// apply morale penalty for killing a civilian!
|
||||||
HandleMoraleEvent( pKiller, MORALE_KILLED_CIVILIAN, pKiller->sSectorX, pKiller->sSectorY, pKiller->bSectorZ );
|
HandleMoraleEvent( pKiller, MORALE_KILLED_CIVILIAN, pKiller->sSectorX, pKiller->sSectorY, pKiller->bSectorZ );
|
||||||
@@ -800,7 +800,7 @@ void HandleMurderOfCivilian( SOLDIERTYPE *pSoldier, BOOLEAN fIntentional )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// killer seen by civ?
|
// killer seen by civ?
|
||||||
if ( SoldierToSoldierLineOfSightTest( pCivSoldier, MercPtrs[ pSoldier->ubAttackerID ], TRUE, gGameExternalOptions.ubStraightSightRange ) != 0 )
|
if ( SoldierToSoldierLineOfSightTest( pCivSoldier, pSoldier->ubAttackerID, TRUE, gGameExternalOptions.ubStraightSightRange ) != 0 )
|
||||||
{
|
{
|
||||||
bSeenState |= 1;
|
bSeenState |= 1;
|
||||||
}
|
}
|
||||||
@@ -908,7 +908,7 @@ void HandleMurderOfCivilian( SOLDIERTYPE *pSoldier, BOOLEAN fIntentional )
|
|||||||
|
|
||||||
case CREATURE_TEAM:
|
case CREATURE_TEAM:
|
||||||
// killed by a monster - make sure it was one
|
// killed by a monster - make sure it was one
|
||||||
if( ( Menptr[ pSoldier->ubAttackerID ].ubBodyType >= ADULTFEMALEMONSTER ) && ( Menptr[ pSoldier->ubAttackerID ].ubBodyType <= QUEENMONSTER ) )
|
if( ( pSoldier->ubAttackerID->ubBodyType >= ADULTFEMALEMONSTER ) && ( pSoldier->ubAttackerID->ubBodyType <= QUEENMONSTER ) )
|
||||||
{
|
{
|
||||||
// increase for the extreme horror of being killed by a monster
|
// increase for the extreme horror of being killed by a monster
|
||||||
iLoyaltyChange *= MULTIPLIER_FOR_MURDER_BY_MONSTER;
|
iLoyaltyChange *= MULTIPLIER_FOR_MURDER_BY_MONSTER;
|
||||||
|
|||||||
+11
-11
@@ -3796,7 +3796,7 @@ void HandleNPCTeamMemberDeath( SOLDIERTYPE *pSoldierOld )
|
|||||||
{
|
{
|
||||||
if ( pSoldierOld->ubAttackerID != NOBODY )
|
if ( pSoldierOld->ubAttackerID != NOBODY )
|
||||||
{
|
{
|
||||||
pKiller = MercPtrs[ pSoldierOld->ubAttackerID ];
|
pKiller = pSoldierOld->ubAttackerID;
|
||||||
}
|
}
|
||||||
if( pKiller && pKiller->bTeam == OUR_TEAM )
|
if( pKiller && pKiller->bTeam == OUR_TEAM )
|
||||||
{
|
{
|
||||||
@@ -4016,7 +4016,7 @@ void HandleNPCTeamMemberDeath( SOLDIERTYPE *pSoldierOld )
|
|||||||
{
|
{
|
||||||
if ( pSoldierOld->ubAttackerID != NOBODY )
|
if ( pSoldierOld->ubAttackerID != NOBODY )
|
||||||
{
|
{
|
||||||
pKiller = MercPtrs[ pSoldierOld->ubAttackerID ];
|
pKiller = pSoldierOld->ubAttackerID;
|
||||||
}
|
}
|
||||||
|
|
||||||
BeginHandleDeidrannaDeath( pKiller, pSoldierOld->sGridNo, pSoldierOld->pathing.bLevel );
|
BeginHandleDeidrannaDeath( pKiller, pSoldierOld->sGridNo, pSoldierOld->pathing.bLevel );
|
||||||
@@ -4088,7 +4088,7 @@ void HandleNPCTeamMemberDeath( SOLDIERTYPE *pSoldierOld )
|
|||||||
|
|
||||||
// If the militia's killer is known
|
// If the militia's killer is known
|
||||||
// silversurfer: did the player team kill the militia? If not, militia shouldn't become hostile towards the player.
|
// silversurfer: did the player team kill the militia? If not, militia shouldn't become hostile towards the player.
|
||||||
if ( pSoldierOld->ubAttackerID != NOBODY && MercPtrs[ pSoldierOld->ubAttackerID ]->bTeam == OUR_TEAM )
|
if ( pSoldierOld->ubAttackerID != NOBODY && pSoldierOld->ubAttackerID->bTeam == OUR_TEAM )
|
||||||
{
|
{
|
||||||
// also treat this as murder - but player will never be blamed for militia death he didn't cause
|
// also treat this as murder - but player will never be blamed for militia death he didn't cause
|
||||||
// HEADROCK HAM 3.6: Actually this function never runs for militia (see function for details)
|
// HEADROCK HAM 3.6: Actually this function never runs for militia (see function for details)
|
||||||
@@ -4118,7 +4118,7 @@ void HandleNPCTeamMemberDeath( SOLDIERTYPE *pSoldierOld )
|
|||||||
|
|
||||||
if ( pSoldierOld->ubAttackerID != NOBODY )
|
if ( pSoldierOld->ubAttackerID != NOBODY )
|
||||||
{
|
{
|
||||||
pKiller = MercPtrs[ pSoldierOld->ubAttackerID ];
|
pKiller = pSoldierOld->ubAttackerID;
|
||||||
|
|
||||||
BeginHandleQueenBitchDeath( pKiller, pSoldierOld->sGridNo, pSoldierOld->pathing.bLevel );
|
BeginHandleQueenBitchDeath( pKiller, pSoldierOld->sGridNo, pSoldierOld->pathing.bLevel );
|
||||||
}
|
}
|
||||||
@@ -4130,9 +4130,9 @@ void HandleNPCTeamMemberDeath( SOLDIERTYPE *pSoldierOld )
|
|||||||
TrackEnemiesKilled( ENEMY_KILLED_IN_TACTICAL, pSoldierOld->ubSoldierClass );
|
TrackEnemiesKilled( ENEMY_KILLED_IN_TACTICAL, pSoldierOld->ubSoldierClass );
|
||||||
}
|
}
|
||||||
// If enemy guy was killed by the player, give morale boost to player's team!
|
// If enemy guy was killed by the player, give morale boost to player's team!
|
||||||
if (pSoldierOld->ubAttackerID != NOBODY && MercPtrs[ pSoldierOld->ubAttackerID ]->bTeam == gbPlayerNum )
|
if (pSoldierOld->ubAttackerID != NOBODY && pSoldierOld->ubAttackerID->bTeam == gbPlayerNum )
|
||||||
{
|
{
|
||||||
HandleMoraleEvent( MercPtrs[pSoldierOld->ubAttackerID], MORALE_KILLED_ENEMY, gWorldSectorX, gWorldSectorY, gbWorldSectorZ );
|
HandleMoraleEvent( pSoldierOld->ubAttackerID, MORALE_KILLED_ENEMY, gWorldSectorX, gWorldSectorY, gbWorldSectorZ );
|
||||||
}
|
}
|
||||||
|
|
||||||
HandleGlobalLoyaltyEvent( GLOBAL_LOYALTY_ENEMY_KILLED, gWorldSectorX, gWorldSectorY, gbWorldSectorZ );
|
HandleGlobalLoyaltyEvent( GLOBAL_LOYALTY_ENEMY_KILLED, gWorldSectorX, gWorldSectorY, gbWorldSectorZ );
|
||||||
@@ -4176,7 +4176,7 @@ void HandleNPCTeamMemberDeath( SOLDIERTYPE *pSoldierOld )
|
|||||||
UINT16 ubAssister = NOBODY;
|
UINT16 ubAssister = NOBODY;
|
||||||
|
|
||||||
// if it was a kill by a player's merc
|
// if it was a kill by a player's merc
|
||||||
if (pSoldierOld->ubAttackerID != NOBODY && MercPtrs[ pSoldierOld->ubAttackerID ]->bTeam == gbPlayerNum )
|
if (pSoldierOld->ubAttackerID != NOBODY && pSoldierOld->ubAttackerID->bTeam == gbPlayerNum )
|
||||||
{
|
{
|
||||||
// SANDRO - for special NPCs, you gain more experiences
|
// SANDRO - for special NPCs, you gain more experiences
|
||||||
UINT16 usNumExpChances = ( 10 * pSoldierOld->stats.bExpLevel ); // basic value
|
UINT16 usNumExpChances = ( 10 * pSoldierOld->stats.bExpLevel ); // basic value
|
||||||
@@ -4207,7 +4207,7 @@ void HandleNPCTeamMemberDeath( SOLDIERTYPE *pSoldierOld )
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// EXPERIENCE CLASS GAIN: Earned a kill
|
// EXPERIENCE CLASS GAIN: Earned a kill
|
||||||
StatChange( MercPtrs[ pSoldierOld->ubAttackerID ], EXPERAMT, usNumExpChances, FALSE );
|
StatChange( pSoldierOld->ubAttackerID, EXPERAMT, usNumExpChances, FALSE );
|
||||||
}
|
}
|
||||||
|
|
||||||
// JA2 Gold: if previous and current attackers are the same, the next-to-previous attacker gets the assist
|
// JA2 Gold: if previous and current attackers are the same, the next-to-previous attacker gets the assist
|
||||||
@@ -4229,9 +4229,9 @@ void HandleNPCTeamMemberDeath( SOLDIERTYPE *pSoldierOld )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pSoldierOld->ubAttackerID != NOBODY && MercPtrs[ pSoldierOld->ubAttackerID ]->bTeam == MILITIA_TEAM )
|
if (pSoldierOld->ubAttackerID != NOBODY && pSoldierOld->ubAttackerID->bTeam == MILITIA_TEAM )
|
||||||
{
|
{
|
||||||
MercPtrs[pSoldierOld->ubAttackerID]->ubMilitiaAssists++;
|
pSoldierOld->ubAttackerID->ubMilitiaAssists++;
|
||||||
}
|
}
|
||||||
|
|
||||||
//if the NPC is a dealer, add the dealers items to the ground
|
//if the NPC is a dealer, add the dealers items to the ground
|
||||||
@@ -4567,7 +4567,7 @@ UINT8 CivilianGroupMembersChangeSidesWithinProximity( SOLDIERTYPE * pAttacked )
|
|||||||
// if in LOS of this guy's attacker
|
// if in LOS of this guy's attacker
|
||||||
if ( (pAttacked->ubAttackerID != NOBODY && pSoldier->aiData.bOppList[pAttacked->ubAttackerID] == SEEN_CURRENTLY)
|
if ( (pAttacked->ubAttackerID != NOBODY && pSoldier->aiData.bOppList[pAttacked->ubAttackerID] == SEEN_CURRENTLY)
|
||||||
|| ( PythSpacesAway( pSoldier->sGridNo, pAttacked->sGridNo ) < pAttacked->GetMaxDistanceVisible(pSoldier->sGridNo, pSoldier->pathing.bLevel) )
|
|| ( PythSpacesAway( pSoldier->sGridNo, pAttacked->sGridNo ) < pAttacked->GetMaxDistanceVisible(pSoldier->sGridNo, pSoldier->pathing.bLevel) )
|
||||||
|| ( pAttacked->ubAttackerID != NOBODY && PythSpacesAway( pSoldier->sGridNo, MercPtrs[ pAttacked->ubAttackerID ]->sGridNo ) < pAttacked->GetMaxDistanceVisible(MercPtrs[ pAttacked->ubAttackerID ]->sGridNo, MercPtrs[ pAttacked->ubAttackerID ]->pathing.bLevel) ) )
|
|| ( pAttacked->ubAttackerID != NOBODY && PythSpacesAway( pSoldier->sGridNo, pAttacked->ubAttackerID->sGridNo ) < pAttacked->GetMaxDistanceVisible(pAttacked->ubAttackerID->sGridNo, pAttacked->ubAttackerID->pathing.bLevel) ) )
|
||||||
{
|
{
|
||||||
MakeCivHostile(pSoldier);
|
MakeCivHostile(pSoldier);
|
||||||
if ( pSoldier->aiData.bOppCnt > 0 )
|
if ( pSoldier->aiData.bOppCnt > 0 )
|
||||||
|
|||||||
@@ -1022,7 +1022,7 @@ BOOLEAN TurnSoldierIntoCorpse( SOLDIERTYPE *pSoldier, BOOLEAN fRemoveMerc, BOOLE
|
|||||||
// HEADROCK HAM B2.8: Now also reveals equipment dropped by militia, if requirement is met.
|
// HEADROCK HAM B2.8: Now also reveals equipment dropped by militia, if requirement is met.
|
||||||
if( pSoldier->bTeam == ENEMY_TEAM ||
|
if( pSoldier->bTeam == ENEMY_TEAM ||
|
||||||
( gGameExternalOptions.ubMilitiaDropEquipment == 2 && pSoldier->bTeam == MILITIA_TEAM ) ||
|
( gGameExternalOptions.ubMilitiaDropEquipment == 2 && pSoldier->bTeam == MILITIA_TEAM ) ||
|
||||||
( gGameExternalOptions.ubMilitiaDropEquipment == 1 && pSoldier->bTeam == MILITIA_TEAM && Menptr[ pSoldier->ubAttackerID ].bTeam != OUR_TEAM ))
|
( gGameExternalOptions.ubMilitiaDropEquipment == 1 && pSoldier->bTeam == MILITIA_TEAM && pSoldier->ubAttackerID->bTeam != OUR_TEAM ))
|
||||||
{
|
{
|
||||||
//add a flag to the item so when all enemies are killed, we can run through and reveal all the enemies items
|
//add a flag to the item so when all enemies are killed, we can run through and reveal all the enemies items
|
||||||
usItemFlags |= WORLD_ITEM_DROPPED_FROM_ENEMY;
|
usItemFlags |= WORLD_ITEM_DROPPED_FROM_ENEMY;
|
||||||
@@ -1054,7 +1054,7 @@ BOOLEAN TurnSoldierIntoCorpse( SOLDIERTYPE *pSoldier, BOOLEAN fRemoveMerc, BOOLE
|
|||||||
|
|
||||||
// HEADROCK HAM B2.8: Militia will drop items only if allowed.
|
// HEADROCK HAM B2.8: Militia will drop items only if allowed.
|
||||||
if (!(gGameExternalOptions.ubMilitiaDropEquipment == 0 && pSoldier->bTeam == MILITIA_TEAM ) &&
|
if (!(gGameExternalOptions.ubMilitiaDropEquipment == 0 && pSoldier->bTeam == MILITIA_TEAM ) &&
|
||||||
!(gGameExternalOptions.ubMilitiaDropEquipment == 1 && pSoldier->bTeam == MILITIA_TEAM && Menptr[ pSoldier->ubAttackerID ].bTeam == OUR_TEAM ))
|
!(gGameExternalOptions.ubMilitiaDropEquipment == 1 && pSoldier->bTeam == MILITIA_TEAM && pSoldier->ubAttackerID->bTeam == OUR_TEAM ))
|
||||||
{
|
{
|
||||||
AddItemToPool( pSoldier->sGridNo, pObj, bVisible , pSoldier->pathing.bLevel, usItemFlags, -1 );
|
AddItemToPool( pSoldier->sGridNo, pObj, bVisible , pSoldier->pathing.bLevel, usItemFlags, -1 );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3932,7 +3932,7 @@ BOOLEAN HandleSoldierDeath( SOLDIERTYPE *pSoldier , BOOLEAN *pfMadeCorpse )
|
|||||||
SOLDIERTYPE *pKillerSoldier = NULL;
|
SOLDIERTYPE *pKillerSoldier = NULL;
|
||||||
if(pSoldier->ubAttackerID != NOBODY)
|
if(pSoldier->ubAttackerID != NOBODY)
|
||||||
{
|
{
|
||||||
pKillerSoldier = MercPtrs[pSoldier->ubAttackerID];
|
pKillerSoldier = pSoldier->ubAttackerID;
|
||||||
}
|
}
|
||||||
else if(pSoldier->ubPreviousAttackerID != NOBODY)
|
else if(pSoldier->ubPreviousAttackerID != NOBODY)
|
||||||
{
|
{
|
||||||
@@ -3995,8 +3995,8 @@ BOOLEAN HandleSoldierDeath( SOLDIERTYPE *pSoldier , BOOLEAN *pfMadeCorpse )
|
|||||||
{
|
{
|
||||||
//////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
// SANDRO - some changes here
|
// SANDRO - some changes here
|
||||||
UINT16 ubAttacker = pSoldier->ubAttackerID;
|
SoldierID ubAttacker = pSoldier->ubAttackerID;
|
||||||
UINT16 ubAssister = pSoldier->ubPreviousAttackerID;
|
SoldierID ubAssister = pSoldier->ubPreviousAttackerID;
|
||||||
// If attacker is nobody, and we died, then set the last attacker(if exists) as our killer
|
// If attacker is nobody, and we died, then set the last attacker(if exists) as our killer
|
||||||
if ( ubAttacker == NOBODY )
|
if ( ubAttacker == NOBODY )
|
||||||
{
|
{
|
||||||
@@ -4024,9 +4024,9 @@ BOOLEAN HandleSoldierDeath( SOLDIERTYPE *pSoldier , BOOLEAN *pfMadeCorpse )
|
|||||||
{
|
{
|
||||||
// anv: note that ubAttacker can be already different from pSoldier->ubAttackerID
|
// anv: note that ubAttacker can be already different from pSoldier->ubAttackerID
|
||||||
// IF this guy has an attacker and he's a good guy, play sound
|
// IF this guy has an attacker and he's a good guy, play sound
|
||||||
if ( pSoldier->ubAttackerID != NOBODY )
|
if ( pSoldier->ubAttackerID < NOBODY )
|
||||||
{
|
{
|
||||||
if ( MercPtrs[ pSoldier->ubAttackerID ] != NULL && MercPtrs[ pSoldier->ubAttackerID ]->bTeam == gbPlayerNum && gTacticalStatus.ubAttackBusyCount > 0 )
|
if ( pSoldier->ubAttackerID->bTeam == gbPlayerNum && gTacticalStatus.ubAttackBusyCount > 0 )
|
||||||
{
|
{
|
||||||
gTacticalStatus.fKilledEnemyOnAttack = TRUE;
|
gTacticalStatus.fKilledEnemyOnAttack = TRUE;
|
||||||
gTacticalStatus.ubEnemyKilledOnAttack = pSoldier->ubID;
|
gTacticalStatus.ubEnemyKilledOnAttack = pSoldier->ubID;
|
||||||
@@ -4110,7 +4110,7 @@ BOOLEAN HandleSoldierDeath( SOLDIERTYPE *pSoldier , BOOLEAN *pfMadeCorpse )
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//gMercProfiles[ MercPtrs[ pSoldier->ubAttackerID ]->ubProfile ].usKills++;
|
//gMercProfiles[ pSoldier->ubAttackerID->ubProfile ].usKills++;
|
||||||
/////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////
|
||||||
gStrategicStatus.usPlayerKills++;
|
gStrategicStatus.usPlayerKills++;
|
||||||
|
|
||||||
@@ -4456,7 +4456,7 @@ void CheckForAndHandleSoldierIncompacitated( SOLDIERTYPE *pSoldier )
|
|||||||
// SANDRO - if Martial Artist took someone down, always fall back if possible (for the fun)
|
// SANDRO - if Martial Artist took someone down, always fall back if possible (for the fun)
|
||||||
if ( pSoldier->ubAttackerID != NOBODY && gGameOptions.fNewTraitSystem )
|
if ( pSoldier->ubAttackerID != NOBODY && gGameOptions.fNewTraitSystem )
|
||||||
{
|
{
|
||||||
if ( HAS_SKILL_TRAIT( MercPtrs[ pSoldier->ubAttackerID ], MARTIAL_ARTS_NT ) && (!MercPtrs[ pSoldier->ubAttackerID ]->usAttackingWeapon || ItemIsBrassKnuckles(MercPtrs[ pSoldier->ubAttackerID ]->inv[HANDPOS].usItem)) )
|
if ( HAS_SKILL_TRAIT( pSoldier->ubAttackerID, MARTIAL_ARTS_NT ) && (!pSoldier->ubAttackerID->usAttackingWeapon || ItemIsBrassKnuckles(pSoldier->ubAttackerID->inv[HANDPOS].usItem)) )
|
||||||
{
|
{
|
||||||
fAlwaysFallBack = TRUE;
|
fAlwaysFallBack = TRUE;
|
||||||
}
|
}
|
||||||
@@ -4468,7 +4468,7 @@ void CheckForAndHandleSoldierIncompacitated( SOLDIERTYPE *pSoldier )
|
|||||||
if ( pSoldier->ubAttackerID != NOBODY )
|
if ( pSoldier->ubAttackerID != NOBODY )
|
||||||
{
|
{
|
||||||
// Find direction!
|
// Find direction!
|
||||||
bTestDirection = (INT8)GetDirectionFromGridNo( MercPtrs[ pSoldier->ubAttackerID ]->sGridNo, pSoldier );
|
bTestDirection = (INT8)GetDirectionFromGridNo( pSoldier->ubAttackerID->sGridNo, pSoldier );
|
||||||
fForceDirection = TRUE;
|
fForceDirection = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5732,9 +5732,9 @@ void SOLDIERTYPE::EVENT_SoldierGotHit( UINT16 usWeaponIndex, INT16 sDamage, INT1
|
|||||||
// handle morale for heavy damage attacks
|
// handle morale for heavy damage attacks
|
||||||
if ( sDamage > 25 )
|
if ( sDamage > 25 )
|
||||||
{
|
{
|
||||||
if ( this->ubAttackerID != NOBODY && MercPtrs[this->ubAttackerID]->bTeam == gbPlayerNum )
|
if ( this->ubAttackerID != NOBODY && this->ubAttackerID->bTeam == gbPlayerNum )
|
||||||
{
|
{
|
||||||
HandleMoraleEvent( MercPtrs[this->ubAttackerID], MORALE_DID_LOTS_OF_DAMAGE, MercPtrs[this->ubAttackerID]->sSectorX, MercPtrs[this->ubAttackerID]->sSectorY, MercPtrs[this->ubAttackerID]->bSectorZ );
|
HandleMoraleEvent( this->ubAttackerID, MORALE_DID_LOTS_OF_DAMAGE, this->ubAttackerID->sSectorX, this->ubAttackerID->sSectorY, this->ubAttackerID->bSectorZ );
|
||||||
this->ubLastMoraleFromHit++;
|
this->ubLastMoraleFromHit++;
|
||||||
}
|
}
|
||||||
if ( this->bTeam == gbPlayerNum )
|
if ( this->bTeam == gbPlayerNum )
|
||||||
@@ -10475,7 +10475,7 @@ UINT8 SOLDIERTYPE::SoldierTakeDamage( INT8 bHeight, INT16 sLifeDeduct, INT16 sBr
|
|||||||
sTestOne = EffectiveStrength( this, FALSE );
|
sTestOne = EffectiveStrength( this, FALSE );
|
||||||
sTestTwo = 2 * max(sLifeDeduct, (sBreathLoss / 100));
|
sTestTwo = 2 * max(sLifeDeduct, (sBreathLoss / 100));
|
||||||
|
|
||||||
if (this->ubAttackerID != NOBODY && MercPtrs[this->ubAttackerID]->ubBodyType == BLOODCAT)
|
if (this->ubAttackerID != NOBODY && this->ubAttackerID->ubBodyType == BLOODCAT)
|
||||||
{
|
{
|
||||||
// bloodcat boost, let them make people drop items more
|
// bloodcat boost, let them make people drop items more
|
||||||
sTestTwo += 20;
|
sTestTwo += 20;
|
||||||
|
|||||||
@@ -1187,8 +1187,8 @@ public:
|
|||||||
|
|
||||||
UINT32 uiAIDelay;
|
UINT32 uiAIDelay;
|
||||||
INT16 sReloadDelay;
|
INT16 sReloadDelay;
|
||||||
UINT16 ubAttackerID;
|
|
||||||
UINT16 ubPreviousAttackerID;
|
UINT16 ubPreviousAttackerID;
|
||||||
|
SoldierID ubAttackerID;
|
||||||
|
|
||||||
INT32 sInsertionGridNo;
|
INT32 sInsertionGridNo;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user