mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
Convert SOLDIERTYPE::ubTargetID to SoldierID
This commit is contained in:
+3
-3
@@ -4907,7 +4907,7 @@ INT8 FireBulletGivenTargetNCTH( SOLDIERTYPE * pFirer, FLOAT dEndX, FLOAT dEndY,
|
|||||||
ubImpact = (UINT8) (ubImpact * AmmoTypes[weapon->gun.ubGunAmmoType].multipleBulletDamageMultiplier / max(1,AmmoTypes[weapon->gun.ubGunAmmoType].multipleBulletDamageDivisor) );
|
ubImpact = (UINT8) (ubImpact * AmmoTypes[weapon->gun.ubGunAmmoType].multipleBulletDamageMultiplier / max(1,AmmoTypes[weapon->gun.ubGunAmmoType].multipleBulletDamageDivisor) );
|
||||||
if (pFirer->ubTargetID != NOBODY)
|
if (pFirer->ubTargetID != NOBODY)
|
||||||
{
|
{
|
||||||
MercPtrs[ pFirer->ubTargetID ]->bNumPelletsHitBy = 0;
|
pFirer->ubTargetID->bNumPelletsHitBy = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
weapon=NULL;
|
weapon=NULL;
|
||||||
@@ -5435,7 +5435,7 @@ INT8 FireBulletGivenTarget( SOLDIERTYPE * pFirer, FLOAT dEndX, FLOAT dEndY, FLOA
|
|||||||
ubImpact = (UINT8) (ubImpact * AmmoTypes[weapon->gun.ubGunAmmoType].multipleBulletDamageMultiplier / max(1,AmmoTypes[weapon->gun.ubGunAmmoType].multipleBulletDamageDivisor) );
|
ubImpact = (UINT8) (ubImpact * AmmoTypes[weapon->gun.ubGunAmmoType].multipleBulletDamageMultiplier / max(1,AmmoTypes[weapon->gun.ubGunAmmoType].multipleBulletDamageDivisor) );
|
||||||
if (pFirer->ubTargetID != NOBODY)
|
if (pFirer->ubTargetID != NOBODY)
|
||||||
{
|
{
|
||||||
MercPtrs[ pFirer->ubTargetID ]->bNumPelletsHitBy = 0;
|
pFirer->ubTargetID->bNumPelletsHitBy = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
weapon=NULL;
|
weapon=NULL;
|
||||||
@@ -6951,7 +6951,7 @@ INT8 ChanceToGetThrough(SOLDIERTYPE * pFirer, FLOAT dEndX, FLOAT dEndY, FLOAT dE
|
|||||||
// sevenfm: additionally initialize usAttackingWeapon, ubTargetID, bDoBurst and bDoAutofire which are used by FireBulletGivenTarget()
|
// sevenfm: additionally initialize usAttackingWeapon, ubTargetID, bDoBurst and bDoAutofire which are used by FireBulletGivenTarget()
|
||||||
UINT16 oldAttackingWeapon = pFirer->usAttackingWeapon;
|
UINT16 oldAttackingWeapon = pFirer->usAttackingWeapon;
|
||||||
UINT8 oldAttackingHand = pFirer->ubAttackingHand;
|
UINT8 oldAttackingHand = pFirer->ubAttackingHand;
|
||||||
UINT8 oldTargetID = pFirer->ubTargetID;
|
SoldierID oldTargetID = pFirer->ubTargetID;
|
||||||
INT8 oldBurst = pFirer->bDoBurst;
|
INT8 oldBurst = pFirer->bDoBurst;
|
||||||
INT8 oldAutofire = pFirer->bDoAutofire;
|
INT8 oldAutofire = pFirer->bDoAutofire;
|
||||||
|
|
||||||
|
|||||||
@@ -9676,7 +9676,7 @@ SOLDIERTYPE *InternalReduceAttackBusyCount( )
|
|||||||
pTarget = NULL;
|
pTarget = NULL;
|
||||||
if (pSoldier->ubTargetID != NOBODY)
|
if (pSoldier->ubTargetID != NOBODY)
|
||||||
{
|
{
|
||||||
pTarget = MercPtrs[ pSoldier->ubTargetID ];
|
pTarget = pSoldier->ubTargetID;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Flugente 18-07-22: commenting this out - it doesn't do harm in realtime, and is more realistic
|
// Flugente 18-07-22: commenting this out - it doesn't do harm in realtime, and is more realistic
|
||||||
|
|||||||
+37
-37
@@ -1557,7 +1557,7 @@ BOOLEAN AdjustToNextAnimationFrame( SOLDIERTYPE *pSoldier )
|
|||||||
if ( pSoldier->bTeam != gbPlayerNum )
|
if ( pSoldier->bTeam != gbPlayerNum )
|
||||||
{
|
{
|
||||||
// only locate if the enemy is visible or he's aiming at a player
|
// only locate if the enemy is visible or he's aiming at a player
|
||||||
if ( pSoldier->bVisible != -1 || (pSoldier->ubTargetID != NOBODY && MercPtrs[ pSoldier->ubTargetID ]->bTeam == gbPlayerNum) )
|
if ( pSoldier->bVisible != -1 || (pSoldier->ubTargetID != NOBODY && pSoldier->ubTargetID->bTeam == gbPlayerNum) )
|
||||||
{
|
{
|
||||||
LocateGridNo( pSoldier->sTargetGridNo );
|
LocateGridNo( pSoldier->sTargetGridNo );
|
||||||
}
|
}
|
||||||
@@ -4043,13 +4043,13 @@ BOOLEAN HandleSoldierDeath( SOLDIERTYPE *pSoldier , BOOLEAN *pfMadeCorpse )
|
|||||||
else if ( pSoldier->bVisible == TRUE )
|
else if ( pSoldier->bVisible == TRUE )
|
||||||
{
|
{
|
||||||
// We were a visible enemy, say laugh!
|
// We were a visible enemy, say laugh!
|
||||||
if ( Random(3) == 0 && !CREATURE_OR_BLOODCAT( MercPtrs[ ubAttacker ] ) )
|
if ( Random(3) == 0 && !CREATURE_OR_BLOODCAT( ubAttacker ) )
|
||||||
{
|
{
|
||||||
// if the attacker was from the same team, play a curse, otherwise play a laugh
|
// if the attacker was from the same team, play a curse, otherwise play a laugh
|
||||||
if ( MercPtrs[ubAttacker]->bSide == pSoldier->bSide )
|
if ( ubAttacker->bSide == pSoldier->bSide )
|
||||||
MercPtrs[ubAttacker]->DoMercBattleSound( BATTLE_SOUND_CURSE1 );
|
ubAttacker->DoMercBattleSound( BATTLE_SOUND_CURSE1 );
|
||||||
else
|
else
|
||||||
MercPtrs[ ubAttacker ]->DoMercBattleSound( BATTLE_SOUND_LAUGH1 );
|
ubAttacker->DoMercBattleSound( BATTLE_SOUND_LAUGH1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4061,7 +4061,7 @@ BOOLEAN HandleSoldierDeath( SOLDIERTYPE *pSoldier , BOOLEAN *pfMadeCorpse )
|
|||||||
// militia also now track kills...
|
// militia also now track kills...
|
||||||
if ( ubAttacker != NOBODY )
|
if ( ubAttacker != NOBODY )
|
||||||
{
|
{
|
||||||
if ( MercPtrs[ ubAttacker ]->bTeam == gbPlayerNum )
|
if ( ubAttacker->bTeam == gbPlayerNum )
|
||||||
{
|
{
|
||||||
// increment kills
|
// increment kills
|
||||||
/////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -4069,43 +4069,43 @@ BOOLEAN HandleSoldierDeath( SOLDIERTYPE *pSoldier , BOOLEAN *pfMadeCorpse )
|
|||||||
switch(pSoldier->ubSoldierClass)
|
switch(pSoldier->ubSoldierClass)
|
||||||
{
|
{
|
||||||
case SOLDIER_CLASS_ROBOT:
|
case SOLDIER_CLASS_ROBOT:
|
||||||
gMercProfiles[ MercPtrs[ ubAttacker ]->ubProfile ].records.usKillsOthers++;
|
gMercProfiles[ ubAttacker->ubProfile ].records.usKillsOthers++;
|
||||||
break;
|
break;
|
||||||
case SOLDIER_CLASS_ELITE :
|
case SOLDIER_CLASS_ELITE :
|
||||||
gMercProfiles[ MercPtrs[ ubAttacker ]->ubProfile ].records.usKillsElites++;
|
gMercProfiles[ ubAttacker->ubProfile ].records.usKillsElites++;
|
||||||
break;
|
break;
|
||||||
case SOLDIER_CLASS_ARMY :
|
case SOLDIER_CLASS_ARMY :
|
||||||
gMercProfiles[ MercPtrs[ ubAttacker ]->ubProfile ].records.usKillsRegulars++;
|
gMercProfiles[ ubAttacker->ubProfile ].records.usKillsRegulars++;
|
||||||
break;
|
break;
|
||||||
case SOLDIER_CLASS_ADMINISTRATOR :
|
case SOLDIER_CLASS_ADMINISTRATOR :
|
||||||
gMercProfiles[ MercPtrs[ ubAttacker ]->ubProfile ].records.usKillsAdmins++;
|
gMercProfiles[ ubAttacker->ubProfile ].records.usKillsAdmins++;
|
||||||
break;
|
break;
|
||||||
case SOLDIER_CLASS_CREATURE :
|
case SOLDIER_CLASS_CREATURE :
|
||||||
gMercProfiles[ MercPtrs[ ubAttacker ]->ubProfile ].records.usKillsCreatures++;
|
gMercProfiles[ ubAttacker->ubProfile ].records.usKillsCreatures++;
|
||||||
break;
|
break;
|
||||||
case SOLDIER_CLASS_ZOMBIE :
|
case SOLDIER_CLASS_ZOMBIE :
|
||||||
gMercProfiles[ MercPtrs[ ubAttacker ]->ubProfile ].records.usKillsZombies++;
|
gMercProfiles[ ubAttacker->ubProfile ].records.usKillsZombies++;
|
||||||
break;
|
break;
|
||||||
case SOLDIER_CLASS_BANDIT:
|
case SOLDIER_CLASS_BANDIT:
|
||||||
gMercProfiles[MercPtrs[ubAttacker]->ubProfile].records.usKillsOthers++;
|
gMercProfiles[ ubAttacker->ubProfile ].records.usKillsOthers++;
|
||||||
break;
|
break;
|
||||||
default :
|
default :
|
||||||
if ( CREATURE_OR_BLOODCAT( pSoldier ) )
|
if ( CREATURE_OR_BLOODCAT( pSoldier ) )
|
||||||
gMercProfiles[ MercPtrs[ ubAttacker ]->ubProfile ].records.usKillsCreatures++;
|
gMercProfiles[ ubAttacker->ubProfile ].records.usKillsCreatures++;
|
||||||
else if ( ARMED_VEHICLE( pSoldier ) )
|
else if ( ARMED_VEHICLE( pSoldier ) )
|
||||||
gMercProfiles[ MercPtrs[ ubAttacker ]->ubProfile ].records.usKillsTanks++;
|
gMercProfiles[ ubAttacker->ubProfile ].records.usKillsTanks++;
|
||||||
else if ( pSoldier->bTeam == CIV_TEAM && !pSoldier->aiData.bNeutral && pSoldier->bSide != gbPlayerNum )
|
else if ( pSoldier->bTeam == CIV_TEAM && !pSoldier->aiData.bNeutral && pSoldier->bSide != gbPlayerNum )
|
||||||
gMercProfiles[ MercPtrs[ ubAttacker ]->ubProfile ].records.usKillsHostiles++;
|
gMercProfiles[ ubAttacker->ubProfile ].records.usKillsHostiles++;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gMercProfiles[ MercPtrs[ ubAttacker ]->ubProfile ].records.usKillsOthers++;
|
gMercProfiles[ ubAttacker->ubProfile ].records.usKillsOthers++;
|
||||||
|
|
||||||
// Flugente: dynamic opinions: if this guy is not hostile towards us, then some mercs will complain about killing civilians
|
// Flugente: dynamic opinions: if this guy is not hostile towards us, then some mercs will complain about killing civilians
|
||||||
if (gGameExternalOptions.fDynamicOpinions && pSoldier->bTeam != OUR_TEAM && (pSoldier->aiData.bNeutral || pSoldier->bSide == MercPtrs[ubAttacker]->bSide) )
|
if (gGameExternalOptions.fDynamicOpinions && pSoldier->bTeam != OUR_TEAM && (pSoldier->aiData.bNeutral || pSoldier->bSide == ubAttacker->bSide) )
|
||||||
{
|
{
|
||||||
// not for killing animals though...
|
// not for killing animals though...
|
||||||
if ( pSoldier->ubBodyType != CROW && pSoldier->ubBodyType != COW )
|
if ( pSoldier->ubBodyType != CROW && pSoldier->ubBodyType != COW )
|
||||||
HandleDynamicOpinionChange( MercPtrs[ubAttacker], OPINIONEVENT_CIVKILLER, TRUE, TRUE );
|
HandleDynamicOpinionChange( ubAttacker, OPINIONEVENT_CIVKILLER, TRUE, TRUE );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -4117,61 +4117,61 @@ BOOLEAN HandleSoldierDeath( SOLDIERTYPE *pSoldier , BOOLEAN *pfMadeCorpse )
|
|||||||
// Flugente: dynamic opinions: if this guy is not hostile towards us, then some mercs will complain about killing civilians
|
// Flugente: dynamic opinions: if this guy is not hostile towards us, then some mercs will complain about killing civilians
|
||||||
if (gGameExternalOptions.fDynamicOpinions)
|
if (gGameExternalOptions.fDynamicOpinions)
|
||||||
{
|
{
|
||||||
if (pSoldier->bTeam != OUR_TEAM && (pSoldier->aiData.bNeutral || pSoldier->bSide == MercPtrs[ubAttacker]->bSide))
|
if (pSoldier->bTeam != OUR_TEAM && (pSoldier->aiData.bNeutral || pSoldier->bSide == ubAttacker->bSide))
|
||||||
{
|
{
|
||||||
// not for killing animals though...
|
// not for killing animals though...
|
||||||
if (pSoldier->ubBodyType != CROW && pSoldier->ubBodyType != COW)
|
if (pSoldier->ubBodyType != CROW && pSoldier->ubBodyType != COW)
|
||||||
HandleDynamicOpinionChange(MercPtrs[ubAttacker], OPINIONEVENT_CIVKILLER, TRUE, TRUE);
|
HandleDynamicOpinionChange(ubAttacker, OPINIONEVENT_CIVKILLER, TRUE, TRUE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// if this enemy was attacking a freshly wounded merc, it is likely they posed a real threat - the merc will be thankful for saving their life
|
// if this enemy was attacking a freshly wounded merc, it is likely they posed a real threat - the merc will be thankful for saving their life
|
||||||
if (pSoldier->ubTargetID != NOBODY && MercPtrs[pSoldier->ubTargetID]->bBleeding > 10)
|
if (pSoldier->ubTargetID != NOBODY && pSoldier->ubTargetID->bBleeding > 10)
|
||||||
{
|
{
|
||||||
AddOpinionEvent(MercPtrs[pSoldier->ubTargetID]->ubProfile, MercPtrs[ubAttacker]->ubProfile, OPINIONEVENT_BATTLE_SAVIOUR);
|
AddOpinionEvent(pSoldier->ubTargetID->ubProfile, ubAttacker->ubProfile, OPINIONEVENT_BATTLE_SAVIOUR);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// complain about a fragthief, or thank for assistance - correct event is chosen internally
|
// complain about a fragthief, or thank for assistance - correct event is chosen internally
|
||||||
HandleDynamicOpinionChange(MercPtrs[ubAttacker], OPINIONEVENT_FRAGTHIEF, TRUE, TRUE);
|
HandleDynamicOpinionChange(ubAttacker, OPINIONEVENT_FRAGTHIEF, TRUE, TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( MercPtrs[ ubAttacker ]->bTeam == MILITIA_TEAM )
|
else if ( ubAttacker->bTeam == MILITIA_TEAM )
|
||||||
{
|
{
|
||||||
// get a kill! 2 points!
|
// get a kill! 2 points!
|
||||||
MercPtrs[ ubAttacker ]->ubMilitiaKills += 1;
|
ubAttacker->ubMilitiaKills += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ubAssister != NOBODY && ubAssister != ubAttacker )
|
if ( ubAssister != NOBODY && ubAssister != ubAttacker )
|
||||||
{
|
{
|
||||||
if ( MercPtrs[ ubAssister ]->bTeam == gbPlayerNum )
|
if ( ubAssister->bTeam == gbPlayerNum )
|
||||||
{
|
{
|
||||||
/////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////
|
||||||
// SANDRO - new mercs' records
|
// SANDRO - new mercs' records
|
||||||
if( MercPtrs[ ubAttacker ] != NULL )
|
if( ubAttacker != NOBODY )
|
||||||
{
|
{
|
||||||
if( MercPtrs[ ubAttacker ]->bTeam == gbPlayerNum )
|
if( ubAttacker->bTeam == gbPlayerNum )
|
||||||
gMercProfiles[ MercPtrs[ ubAssister ]->ubProfile ].records.usAssistsMercs++;
|
gMercProfiles[ ubAssister->ubProfile ].records.usAssistsMercs++;
|
||||||
else if ( MercPtrs[ ubAttacker ]->bTeam == MILITIA_TEAM )
|
else if ( ubAttacker->bTeam == MILITIA_TEAM )
|
||||||
gMercProfiles[ MercPtrs[ ubAssister ]->ubProfile ].records.usAssistsMilitia++;
|
gMercProfiles[ ubAssister->ubProfile ].records.usAssistsMilitia++;
|
||||||
else
|
else
|
||||||
gMercProfiles[ MercPtrs[ ubAssister ]->ubProfile ].records.usAssistsOthers++;
|
gMercProfiles[ ubAssister->ubProfile ].records.usAssistsOthers++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gMercProfiles[ MercPtrs[ ubAssister ]->ubProfile ].records.usAssistsOthers++;
|
gMercProfiles[ ubAssister->ubProfile ].records.usAssistsOthers++;
|
||||||
}
|
}
|
||||||
//gMercProfiles[ MercPtrs[ ubAssister ]->ubProfile ].usAssists++;
|
//gMercProfiles[ ubAssister->ubProfile ].usAssists++;
|
||||||
/////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////
|
||||||
}
|
}
|
||||||
else if ( MercPtrs[ ubAssister ]->bTeam == MILITIA_TEAM )
|
else if ( ubAssister->bTeam == MILITIA_TEAM )
|
||||||
{
|
{
|
||||||
// get an assist - 1 points
|
// get an assist - 1 points
|
||||||
MercPtrs[ubAssister]->ubMilitiaAssists += 1;
|
ubAssister->ubMilitiaAssists += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -16044,12 +16044,12 @@ BOOLEAN SOLDIERTYPE::SeemsLegit( UINT16 ubObserverID )
|
|||||||
if ( this->sSectorX == gWorldSectorX && this->sSectorY == gWorldSectorY && this->bSectorZ == gbWorldSectorZ )
|
if ( this->sSectorX == gWorldSectorX && this->sSectorY == gWorldSectorY && this->bSectorZ == gbWorldSectorZ )
|
||||||
{
|
{
|
||||||
// are we targeting a buddy of our observer?
|
// are we targeting a buddy of our observer?
|
||||||
if ( this->ubTargetID != NOBODY && MercPtrs[this->ubTargetID] && MercPtrs[this->ubTargetID]->bTeam == pSoldier->bTeam )
|
if ( this->ubTargetID < NOBODY && this->ubTargetID->bTeam == pSoldier->bTeam )
|
||||||
{
|
{
|
||||||
// if we are aiming at a soldier, others will notice our intent... not covert!
|
// if we are aiming at a soldier, others will notice our intent... not covert!
|
||||||
if ( WeaponReady( this ) )
|
if ( WeaponReady( this ) )
|
||||||
{
|
{
|
||||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szCovertTextStr[STR_COVERT_TARGETTING_SOLDIER], this->GetName(), MercPtrs[this->ubTargetID]->GetName() );
|
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szCovertTextStr[STR_COVERT_TARGETTING_SOLDIER], this->GetName(), this->ubTargetID->GetName() );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1406,7 +1406,7 @@ public:
|
|||||||
INT8 bBlockedByAnotherMercDirection;
|
INT8 bBlockedByAnotherMercDirection;
|
||||||
UINT16 usAttackingWeapon;
|
UINT16 usAttackingWeapon;
|
||||||
INT8 bWeaponMode;
|
INT8 bWeaponMode;
|
||||||
UINT16 ubTargetID;
|
SoldierID ubTargetID;
|
||||||
INT8 bAIScheduleProgress;
|
INT8 bAIScheduleProgress;
|
||||||
INT32 sOffWorldGridNo;
|
INT32 sOffWorldGridNo;
|
||||||
struct TAG_anitile *pAniTile;
|
struct TAG_anitile *pAniTile;
|
||||||
|
|||||||
@@ -1713,7 +1713,7 @@ SOLDIERTYPE *ChangeSoldierTeam( SOLDIERTYPE *pSoldier, UINT8 ubTeam )
|
|||||||
|
|
||||||
|
|
||||||
// Set insertion gridNo
|
// Set insertion gridNo
|
||||||
pNewSoldier->sInsertionGridNo = sOldGridNo;
|
pNewSoldier->sInsertionGridNo = sOldGridNo;
|
||||||
|
|
||||||
if ( gfPotentialTeamChangeDuringDeath )
|
if ( gfPotentialTeamChangeDuringDeath )
|
||||||
{
|
{
|
||||||
|
|||||||
+12
-12
@@ -2807,7 +2807,7 @@ BOOLEAN UseGunNCTH( SOLDIERTYPE *pSoldier , INT32 sTargetGridNo )
|
|||||||
// HEADROCK: Actually, it's 1 for the first shot. Works fine regardless though.
|
// HEADROCK: Actually, it's 1 for the first shot. Works fine regardless though.
|
||||||
// HEADROCK HAM 4: Extra experience gain now given when the target is hit. This part only gives basic points
|
// HEADROCK HAM 4: Extra experience gain now given when the target is hit. This part only gives basic points
|
||||||
// for the attack (FAILURE type).
|
// for the attack (FAILURE type).
|
||||||
if ( PTR_OURTEAM && pSoldier->ubTargetID != NOBODY && (!pSoldier->bDoBurst || pSoldier->bDoBurst == 2 ) && (gTacticalStatus.uiFlags & INCOMBAT ) && ( SoldierToSoldierBodyPartChanceToGetThrough( pSoldier, MercPtrs[ pSoldier->ubTargetID ], pSoldier->bAimShotLocation ) > 0 ) )
|
if ( PTR_OURTEAM && pSoldier->ubTargetID != NOBODY && (!pSoldier->bDoBurst || pSoldier->bDoBurst == 2 ) && (gTacticalStatus.uiFlags & INCOMBAT ) && ( SoldierToSoldierBodyPartChanceToGetThrough( pSoldier, pSoldier->ubTargetID, pSoldier->bAimShotLocation ) > 0 ) )
|
||||||
{
|
{
|
||||||
// add base pts for taking a shot, whether it hits or misses
|
// add base pts for taking a shot, whether it hits or misses
|
||||||
dExpGain = 2.0f;
|
dExpGain = 2.0f;
|
||||||
@@ -2818,11 +2818,11 @@ BOOLEAN UseGunNCTH( SOLDIERTYPE *pSoldier , INT32 sTargetGridNo )
|
|||||||
dExpGain = (dExpGain * 2) / 3;
|
dExpGain = (dExpGain * 2) / 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( MercPtrs[ pSoldier->ubTargetID ]->ubBodyType == COW || MercPtrs[ pSoldier->ubTargetID ]->ubBodyType == CROW )
|
if ( pSoldier->ubTargetID->ubBodyType == COW || pSoldier->ubTargetID->ubBodyType == CROW )
|
||||||
{
|
{
|
||||||
dExpGain /= 2;
|
dExpGain /= 2;
|
||||||
}
|
}
|
||||||
else if ( MercPtrs[ pSoldier->ubTargetID ]->flags.uiStatusFlags & SOLDIER_VEHICLE || AM_A_ROBOT( MercPtrs[ pSoldier->ubTargetID ] ) || TANK( MercPtrs[ pSoldier->ubTargetID ] ) )
|
else if ( pSoldier->ubTargetID->flags.uiStatusFlags & SOLDIER_VEHICLE || AM_A_ROBOT( pSoldier->ubTargetID ) || TANK( pSoldier->ubTargetID ) )
|
||||||
{
|
{
|
||||||
// no exp from shooting a vehicle that you can't damage and can't move!
|
// no exp from shooting a vehicle that you can't damage and can't move!
|
||||||
dExpGain = 0;
|
dExpGain = 0;
|
||||||
@@ -2856,11 +2856,11 @@ BOOLEAN UseGunNCTH( SOLDIERTYPE *pSoldier , INT32 sTargetGridNo )
|
|||||||
// add base pts for taking a shot, whether it hits or misses
|
// add base pts for taking a shot, whether it hits or misses
|
||||||
dExpGain = 5.0f;
|
dExpGain = 5.0f;
|
||||||
|
|
||||||
if ( MercPtrs[ pSoldier->ubTargetID ]->ubBodyType == COW || MercPtrs[ pSoldier->ubTargetID ]->ubBodyType == CROW )
|
if ( pSoldier->ubTargetID->ubBodyType == COW || pSoldier->ubTargetID->ubBodyType == CROW )
|
||||||
{
|
{
|
||||||
dExpGain /= 2;
|
dExpGain /= 2;
|
||||||
}
|
}
|
||||||
else if ( MercPtrs[ pSoldier->ubTargetID ]->flags.uiStatusFlags & SOLDIER_VEHICLE || AM_A_ROBOT( MercPtrs[ pSoldier->ubTargetID ] ) || TANK( MercPtrs[ pSoldier->ubTargetID ] ) )
|
else if ( pSoldier->ubTargetID->flags.uiStatusFlags & SOLDIER_VEHICLE || AM_A_ROBOT( pSoldier->ubTargetID ) || TANK( pSoldier->ubTargetID ) )
|
||||||
{
|
{
|
||||||
// no exp from shooting a vehicle that you can't damage and can't move!
|
// no exp from shooting a vehicle that you can't damage and can't move!
|
||||||
dExpGain = 0;
|
dExpGain = 0;
|
||||||
@@ -3535,7 +3535,7 @@ BOOLEAN UseGun( SOLDIERTYPE *pSoldier , INT32 sTargetGridNo )
|
|||||||
}
|
}
|
||||||
// NB bDoBurst will be 2 at this point for the first shot since it was incremented
|
// NB bDoBurst will be 2 at this point for the first shot since it was incremented
|
||||||
// above
|
// above
|
||||||
if ( PTR_OURTEAM && pSoldier->ubTargetID != NOBODY && (!pSoldier->bDoBurst || pSoldier->bDoBurst == 2 ) && (gTacticalStatus.uiFlags & INCOMBAT ) && ( SoldierToSoldierBodyPartChanceToGetThrough( pSoldier, MercPtrs[ pSoldier->ubTargetID ], pSoldier->bAimShotLocation ) > 0 ) )
|
if ( PTR_OURTEAM && pSoldier->ubTargetID != NOBODY && (!pSoldier->bDoBurst || pSoldier->bDoBurst == 2 ) && (gTacticalStatus.uiFlags & INCOMBAT ) && ( SoldierToSoldierBodyPartChanceToGetThrough( pSoldier, pSoldier->ubTargetID, pSoldier->bAimShotLocation ) > 0 ) )
|
||||||
{
|
{
|
||||||
if ( fGonnaHit )
|
if ( fGonnaHit )
|
||||||
{
|
{
|
||||||
@@ -3562,11 +3562,11 @@ BOOLEAN UseGun( SOLDIERTYPE *pSoldier , INT32 sTargetGridNo )
|
|||||||
usExpGain = (usExpGain * 2) / 3;
|
usExpGain = (usExpGain * 2) / 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( MercPtrs[ pSoldier->ubTargetID ]->ubBodyType == COW || MercPtrs[ pSoldier->ubTargetID ]->ubBodyType == CROW )
|
if ( pSoldier->ubTargetID->ubBodyType == COW || pSoldier->ubTargetID->ubBodyType == CROW )
|
||||||
{
|
{
|
||||||
usExpGain /= 2;
|
usExpGain /= 2;
|
||||||
}
|
}
|
||||||
else if ( MercPtrs[ pSoldier->ubTargetID ]->flags.uiStatusFlags & SOLDIER_VEHICLE || AM_A_ROBOT( MercPtrs[ pSoldier->ubTargetID ] ) || TANK( MercPtrs[ pSoldier->ubTargetID ] ) )
|
else if ( pSoldier->ubTargetID->flags.uiStatusFlags & SOLDIER_VEHICLE || AM_A_ROBOT( pSoldier->ubTargetID ) || TANK( pSoldier->ubTargetID ) )
|
||||||
{
|
{
|
||||||
// no exp from shooting a vehicle that you can't damage and can't move!
|
// no exp from shooting a vehicle that you can't damage and can't move!
|
||||||
usExpGain = 0;
|
usExpGain = 0;
|
||||||
@@ -3632,11 +3632,11 @@ BOOLEAN UseGun( SOLDIERTYPE *pSoldier , INT32 sTargetGridNo )
|
|||||||
// add base pts for taking a shot, whether it hits or misses
|
// add base pts for taking a shot, whether it hits or misses
|
||||||
usExpGain += 10;
|
usExpGain += 10;
|
||||||
|
|
||||||
if ( MercPtrs[ pSoldier->ubTargetID ]->ubBodyType == COW || MercPtrs[ pSoldier->ubTargetID ]->ubBodyType == CROW )
|
if ( pSoldier->ubTargetID->ubBodyType == COW || pSoldier->ubTargetID->ubBodyType == CROW )
|
||||||
{
|
{
|
||||||
usExpGain /= 2;
|
usExpGain /= 2;
|
||||||
}
|
}
|
||||||
else if ( MercPtrs[ pSoldier->ubTargetID ]->flags.uiStatusFlags & SOLDIER_VEHICLE || AM_A_ROBOT( MercPtrs[ pSoldier->ubTargetID ] ) || TANK( MercPtrs[ pSoldier->ubTargetID ] ) )
|
else if ( pSoldier->ubTargetID->flags.uiStatusFlags & SOLDIER_VEHICLE || AM_A_ROBOT( pSoldier->ubTargetID ) || TANK( pSoldier->ubTargetID ) )
|
||||||
{
|
{
|
||||||
// no exp from shooting a vehicle that you can't damage and can't move!
|
// no exp from shooting a vehicle that you can't damage and can't move!
|
||||||
usExpGain = 0;
|
usExpGain = 0;
|
||||||
@@ -4134,11 +4134,11 @@ BOOLEAN UseBlade( SOLDIERTYPE *pSoldier , INT32 sTargetGridNo )
|
|||||||
// add base pts for taking a shot, whether it hits or misses
|
// add base pts for taking a shot, whether it hits or misses
|
||||||
usExpGain += 10;
|
usExpGain += 10;
|
||||||
|
|
||||||
if ( MercPtrs[ pSoldier->ubTargetID ]->ubBodyType == COW || MercPtrs[ pSoldier->ubTargetID ]->ubBodyType == CROW )
|
if ( pSoldier->ubTargetID->ubBodyType == COW || pSoldier->ubTargetID->ubBodyType == CROW )
|
||||||
{
|
{
|
||||||
usExpGain /= 2;
|
usExpGain /= 2;
|
||||||
}
|
}
|
||||||
else if ( MercPtrs[ pSoldier->ubTargetID ]->flags.uiStatusFlags & SOLDIER_VEHICLE || AM_A_ROBOT( MercPtrs[ pSoldier->ubTargetID ] ) || TANK( MercPtrs[ pSoldier->ubTargetID ] ) )
|
else if ( pSoldier->ubTargetID->flags.uiStatusFlags & SOLDIER_VEHICLE || AM_A_ROBOT( pSoldier->ubTargetID ) || TANK( pSoldier->ubTargetID ) )
|
||||||
{
|
{
|
||||||
// no exp from shooting a vehicle that you can't damage and can't move!
|
// no exp from shooting a vehicle that you can't damage and can't move!
|
||||||
usExpGain = 0;
|
usExpGain = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user