mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Convert SOLDIERTYPE->ubAttackerID to SoldierID
This commit is contained in:
@@ -85,7 +85,7 @@ void StrategicHandlePlayerTeamMercDeath( SOLDIERTYPE *pSoldier )
|
||||
//add to the history log the fact that the merc died and the circumstances
|
||||
if( pSoldier->ubAttackerID != NOBODY )
|
||||
{
|
||||
pKiller = MercPtrs[ pSoldier->ubAttackerID ];
|
||||
pKiller = pSoldier->ubAttackerID;
|
||||
}
|
||||
|
||||
// CJC Nov 11, 2002
|
||||
@@ -141,7 +141,7 @@ void StrategicHandlePlayerTeamMercDeath( SOLDIERTYPE *pSoldier )
|
||||
gMercProfiles[ pSoldier->ubProfile ].ubSuspiciousDeath = VERY_SUSPICIOUS_DEATH;
|
||||
}
|
||||
// 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
|
||||
gMercProfiles[ pSoldier->ubProfile ].ubSuspiciousDeath = SUSPICIOUS_DEATH;
|
||||
|
||||
@@ -740,13 +740,13 @@ void HandleMurderOfCivilian( SOLDIERTYPE *pSoldier, BOOLEAN fIntentional )
|
||||
}
|
||||
*/
|
||||
// set killer team
|
||||
bKillerTeam = Menptr[ pSoldier->ubAttackerID ].bTeam;
|
||||
bKillerTeam = pSoldier->ubAttackerID->bTeam;
|
||||
|
||||
|
||||
// if the player did the killing
|
||||
if( bKillerTeam == OUR_TEAM )
|
||||
{
|
||||
SOLDIERTYPE *pKiller = MercPtrs[ pSoldier->ubAttackerID ];
|
||||
SOLDIERTYPE *pKiller = pSoldier->ubAttackerID;
|
||||
|
||||
// apply morale penalty for killing a civilian!
|
||||
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?
|
||||
if ( SoldierToSoldierLineOfSightTest( pCivSoldier, MercPtrs[ pSoldier->ubAttackerID ], TRUE, gGameExternalOptions.ubStraightSightRange ) != 0 )
|
||||
if ( SoldierToSoldierLineOfSightTest( pCivSoldier, pSoldier->ubAttackerID, TRUE, gGameExternalOptions.ubStraightSightRange ) != 0 )
|
||||
{
|
||||
bSeenState |= 1;
|
||||
}
|
||||
@@ -908,7 +908,7 @@ void HandleMurderOfCivilian( SOLDIERTYPE *pSoldier, BOOLEAN fIntentional )
|
||||
|
||||
case CREATURE_TEAM:
|
||||
// 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
|
||||
iLoyaltyChange *= MULTIPLIER_FOR_MURDER_BY_MONSTER;
|
||||
|
||||
Reference in New Issue
Block a user