mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Use SoldierID
This commit is contained in:
@@ -2001,14 +2001,14 @@ UINT8 GetFittingInterjectorProfile( UINT8 usEvent, UINT8 usProfileVictim, UINT8
|
||||
if ( usEvent >= OPINIONEVENT_MAX )
|
||||
return NO_PROFILE;
|
||||
|
||||
INT16 idVictim = GetSoldierIDFromMercID( usProfileVictim );
|
||||
INT16 idCause = GetSoldierIDFromMercID( usProfileCause );
|
||||
SoldierID idVictim = GetSoldierIDFromMercID( usProfileVictim );
|
||||
SoldierID idCause = GetSoldierIDFromMercID( usProfileCause );
|
||||
|
||||
if ( idVictim < 0 || idCause < 0 )
|
||||
if ( idVictim == NOBODY || idCause == NOBODY )
|
||||
return NO_PROFILE;
|
||||
|
||||
SOLDIERTYPE* pSoldierVictim = MercPtrs[idVictim];
|
||||
SOLDIERTYPE* pSoldierCause = MercPtrs[idCause];
|
||||
SOLDIERTYPE* pSoldierVictim = idVictim;
|
||||
SOLDIERTYPE* pSoldierCause = idCause;
|
||||
|
||||
if ( !pSoldierVictim || !pSoldierCause )
|
||||
return NO_PROFILE;
|
||||
|
||||
@@ -24251,7 +24251,7 @@ BOOLEAN SOLDIERTYPE::CanStartDrag(void)
|
||||
for (UINT32 cnt = gTacticalStatus.Team[OUR_TEAM].bFirstID; cnt <= gTacticalStatus.Team[CIV_TEAM].bLastID; ++cnt)
|
||||
{
|
||||
if (cnt != this->ubID &&
|
||||
MercPtrs[cnt] &&
|
||||
cnt != NOBODY &&
|
||||
MercPtrs[cnt]->sGridNo == sNewGridNo &&
|
||||
this->CanDragPerson(cnt))
|
||||
{
|
||||
@@ -24494,31 +24494,32 @@ UINT8 GetSquadleadersCountInVicinity( SOLDIERTYPE * pSoldier, BOOLEAN fWithHighe
|
||||
// loop through all soldiers around
|
||||
for ( cnt = gTacticalStatus.Team[pSoldier->bTeam].bFirstID; cnt <= gTacticalStatus.Team[pSoldier->bTeam].bLastID; cnt++ )
|
||||
{
|
||||
SOLDIERTYPE *pSquadLeader = MercPtrs[cnt];
|
||||
// Get active conscious soldier
|
||||
if ( MercPtrs[cnt] != pSoldier && MercPtrs[cnt]->bActive && //MercPtrs[ cnt ]->aiData.bShock < 20 &&
|
||||
MercPtrs[cnt]->stats.bLife >= OKLIFE && HAS_SKILL_TRAIT( MercPtrs[cnt], SQUADLEADER_NT ) )
|
||||
if ( pSquadLeader != pSoldier && pSquadLeader->bActive && //MercPtrs[ cnt ]->aiData.bShock < 20 &&
|
||||
pSquadLeader->stats.bLife >= OKLIFE && HAS_SKILL_TRAIT( pSquadLeader, SQUADLEADER_NT ) )
|
||||
{
|
||||
// check if within distance
|
||||
// if both have extended ear, the distance is bigger and they don't need to sea each other
|
||||
// note that enemy always get the bonus if within distance, regardless of extended ears
|
||||
// Flugente: moved around arguments for speed reason
|
||||
if ( fDontCheckDistance ||
|
||||
(PythSpacesAway( pSoldier->sGridNo, MercPtrs[cnt]->sGridNo ) <= gSkillTraitValues.usSLRadiusNormal) ||
|
||||
(PythSpacesAway( pSoldier->sGridNo, pSquadLeader->sGridNo ) <= gSkillTraitValues.usSLRadiusNormal) ||
|
||||
//((SoldierToVirtualSoldierLineOfSightTest( MercPtrs[ cnt ], pSoldier->sGridNo, pSoldier->pathing.bLevel, ANIM_STAND, TRUE, CALC_FROM_ALL_DIRS ) ||
|
||||
//SoldierToVirtualSoldierLineOfSightTest( pSoldier, MercPtrs[ cnt ]->sGridNo, MercPtrs[ cnt ]->pathing.bLevel, ANIM_STAND, TRUE, CALC_FROM_ALL_DIRS ) ) &&
|
||||
((pSoldier->bTeam == ENEMY_TEAM || (HasExtendedEarOn( pSoldier ) && HasExtendedEarOn( MercPtrs[cnt] ))) && PythSpacesAway( pSoldier->sGridNo, MercPtrs[cnt]->sGridNo ) <= gSkillTraitValues.usSLRadiusExtendedEar)
|
||||
((pSoldier->bTeam == ENEMY_TEAM || (HasExtendedEarOn( pSoldier ) && HasExtendedEarOn( pSquadLeader ))) && PythSpacesAway( pSoldier->sGridNo, pSquadLeader->sGridNo ) <= gSkillTraitValues.usSLRadiusExtendedEar)
|
||||
)
|
||||
{
|
||||
// If checking for higher level SL
|
||||
// also count in already aquired level increses from other SLs
|
||||
if ( fWithHigherLevel )
|
||||
{
|
||||
if ( MercPtrs[cnt]->stats.bExpLevel > (pSoldier->stats.bExpLevel + (ubNumberSL*gSkillTraitValues.ubSLEffectiveLevelInRadius)) )
|
||||
ubNumberSL += min( (max( 0, (MercPtrs[cnt]->stats.bExpLevel - (pSoldier->stats.bExpLevel + (ubNumberSL*gSkillTraitValues.ubSLEffectiveLevelInRadius))) )), (NUM_SKILL_TRAITS( MercPtrs[cnt], SQUADLEADER_NT )) );
|
||||
if ( pSquadLeader->stats.bExpLevel > (pSoldier->stats.bExpLevel + (ubNumberSL*gSkillTraitValues.ubSLEffectiveLevelInRadius)) )
|
||||
ubNumberSL += min( (max( 0, (pSquadLeader->stats.bExpLevel - (pSoldier->stats.bExpLevel + (ubNumberSL*gSkillTraitValues.ubSLEffectiveLevelInRadius))) )), (NUM_SKILL_TRAITS( pSquadLeader, SQUADLEADER_NT )) );
|
||||
}
|
||||
else
|
||||
{
|
||||
ubNumberSL += NUM_SKILL_TRAITS( MercPtrs[cnt], SQUADLEADER_NT );
|
||||
ubNumberSL += NUM_SKILL_TRAITS( pSquadLeader, SQUADLEADER_NT );
|
||||
}
|
||||
|
||||
if ( ubNumberSL >= gSkillTraitValues.ubSLMaxBonuses )
|
||||
@@ -24532,29 +24533,30 @@ UINT8 GetSquadleadersCountInVicinity( SOLDIERTYPE * pSoldier, BOOLEAN fWithHighe
|
||||
{
|
||||
for ( cnt = gTacticalStatus.Team[OUR_TEAM].bFirstID; cnt <= gTacticalStatus.Team[OUR_TEAM].bLastID; ++cnt )
|
||||
{
|
||||
SOLDIERTYPE *pSquadLeader = MercPtrs[cnt];
|
||||
// Get active conscious soldier
|
||||
if ( MercPtrs[cnt] != pSoldier && MercPtrs[cnt]->bActive && //MercPtrs[ cnt ]->aiData.bShock < 20 &&
|
||||
MercPtrs[cnt]->stats.bLife >= OKLIFE && HAS_SKILL_TRAIT( MercPtrs[cnt], SQUADLEADER_NT ) )
|
||||
if ( pSquadLeader != pSoldier && pSquadLeader->bActive && //MercPtrs[ cnt ]->aiData.bShock < 20 &&
|
||||
pSquadLeader->stats.bLife >= OKLIFE && HAS_SKILL_TRAIT( pSquadLeader, SQUADLEADER_NT ) )
|
||||
{
|
||||
// check if within distance
|
||||
// Flugente: moved around arguments for speed reason
|
||||
if ( fDontCheckDistance ||
|
||||
(PythSpacesAway( pSoldier->sGridNo, MercPtrs[cnt]->sGridNo ) <= gSkillTraitValues.usSLRadiusNormal) ||
|
||||
(PythSpacesAway( pSoldier->sGridNo, pSquadLeader->sGridNo ) <= gSkillTraitValues.usSLRadiusNormal) ||
|
||||
//((SoldierToVirtualSoldierLineOfSightTest( MercPtrs[ cnt ], pSoldier->sGridNo, pSoldier->pathing.bLevel, ANIM_STAND, TRUE, CALC_FROM_ALL_DIRS ) ||
|
||||
//SoldierToVirtualSoldierLineOfSightTest( pSoldier, MercPtrs[ cnt ]->sGridNo, MercPtrs[ cnt ]->pathing.bLevel, ANIM_STAND, TRUE, CALC_FROM_ALL_DIRS ) ) &&
|
||||
((HasExtendedEarOn( MercPtrs[cnt] ) && PythSpacesAway( pSoldier->sGridNo, MercPtrs[cnt]->sGridNo ) <= gSkillTraitValues.usSLRadiusExtendedEar))
|
||||
((HasExtendedEarOn( pSquadLeader ) && PythSpacesAway( pSoldier->sGridNo, pSquadLeader->sGridNo ) <= gSkillTraitValues.usSLRadiusExtendedEar))
|
||||
)
|
||||
{
|
||||
// If checking for higher level SL
|
||||
// also count in already aquired level increses from other SLs
|
||||
if ( fWithHigherLevel )
|
||||
{
|
||||
if ( MercPtrs[cnt]->stats.bExpLevel > (pSoldier->stats.bExpLevel + (ubNumberSL*gSkillTraitValues.ubSLEffectiveLevelInRadius)) )
|
||||
ubNumberSL += min( (max( 0, (MercPtrs[cnt]->stats.bExpLevel - (pSoldier->stats.bExpLevel + (ubNumberSL*gSkillTraitValues.ubSLEffectiveLevelInRadius))) )), (NUM_SKILL_TRAITS( MercPtrs[cnt], SQUADLEADER_NT )) );
|
||||
if ( pSquadLeader->stats.bExpLevel > (pSoldier->stats.bExpLevel + (ubNumberSL*gSkillTraitValues.ubSLEffectiveLevelInRadius)) )
|
||||
ubNumberSL += min( (max( 0, (pSquadLeader->stats.bExpLevel - (pSoldier->stats.bExpLevel + (ubNumberSL*gSkillTraitValues.ubSLEffectiveLevelInRadius))) )), (NUM_SKILL_TRAITS( pSquadLeader, SQUADLEADER_NT )) );
|
||||
}
|
||||
else
|
||||
{
|
||||
ubNumberSL += NUM_SKILL_TRAITS( MercPtrs[cnt], SQUADLEADER_NT );
|
||||
ubNumberSL += NUM_SKILL_TRAITS( pSquadLeader, SQUADLEADER_NT );
|
||||
}
|
||||
|
||||
if ( ubNumberSL >= gSkillTraitValues.ubSLMaxBonuses )
|
||||
|
||||
+11
-9
@@ -881,12 +881,14 @@ void HaltMoveForSoldierOutOfPoints(SOLDIERTYPE *pSoldier)
|
||||
}
|
||||
}
|
||||
|
||||
void SetCivilianDestination(UINT8 ubWho, INT32 sGridNo)
|
||||
void SetCivilianDestination(SoldierID ubWho, INT32 sGridNo)
|
||||
{
|
||||
SOLDIERTYPE *pSoldier;
|
||||
if ( ubWho == NOBODY )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
pSoldier = MercPtrs[ubWho];
|
||||
SOLDIERTYPE *pSoldier = ubWho;
|
||||
|
||||
/*
|
||||
// if we control the civilian
|
||||
@@ -896,12 +898,12 @@ void SetCivilianDestination(UINT8 ubWho, INT32 sGridNo)
|
||||
// if the destination is different from what he has now
|
||||
if (pSoldier->aiData.usActionData != sGridNo)
|
||||
{
|
||||
// store his new destination
|
||||
pSoldier->aiData.usActionData = sGridNo;
|
||||
// store his new destination
|
||||
pSoldier->aiData.usActionData = sGridNo;
|
||||
|
||||
// and cancel any movement in progress that he was still engaged in
|
||||
pSoldier->aiData.bAction = AI_ACTION_NONE;
|
||||
pSoldier->aiData.bActionInProgress = FALSE;
|
||||
// and cancel any movement in progress that he was still engaged in
|
||||
pSoldier->aiData.bAction = AI_ACTION_NONE;
|
||||
pSoldier->aiData.bActionInProgress = FALSE;
|
||||
}
|
||||
|
||||
// only set the underEscort flag once you give him a destination
|
||||
|
||||
+4
-4
@@ -904,12 +904,12 @@ UINT8 CalcDesireToTalk( UINT8 ubNPC, UINT8 ubMerc, INT8 bApproach )
|
||||
// SANDRO - bonus for communication with people for assertive people
|
||||
if ( gGameOptions.fNewTraitSystem && bApproach != APPROACH_THREATEN)
|
||||
{
|
||||
INT16 id = GetSoldierIDFromMercID( ubMerc );
|
||||
if ( id > -1 )
|
||||
SoldierID id = GetSoldierIDFromMercID( ubMerc );
|
||||
if ( id != NOBODY )
|
||||
{
|
||||
if ( DoesMercHavePersonality( MercPtrs[id], CHAR_TRAIT_ASSERTIVE ) )
|
||||
if ( DoesMercHavePersonality( id, CHAR_TRAIT_ASSERTIVE ) )
|
||||
iPersonalVal += 50;
|
||||
else if ( DoesMercHavePersonality( MercPtrs[id], CHAR_TRAIT_MALICIOUS ) )
|
||||
else if ( DoesMercHavePersonality( id, CHAR_TRAIT_MALICIOUS ) )
|
||||
iPersonalVal -= 50;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -252,7 +252,7 @@ INT16 RandomFriendWithin(SOLDIERTYPE *pSoldier);
|
||||
|
||||
INT16 RoamingRange(SOLDIERTYPE *pSoldier, INT32 *pFromGridNo);
|
||||
|
||||
void SetCivilianDestination(UINT8 ubWho, INT32 sGridNo);
|
||||
void SetCivilianDestination(SoldierID ubWho, INT32 sGridNo);
|
||||
void SetNewSituation( SOLDIERTYPE * pSoldier );
|
||||
|
||||
UINT8 SoldierDifficultyLevel( SOLDIERTYPE * pSoldier );
|
||||
|
||||
@@ -192,7 +192,7 @@ UINT16 FromSmokeTypeToWorldFlags( INT8 bType )
|
||||
|
||||
|
||||
|
||||
INT32 NewSmokeEffect( INT32 sGridNo, UINT16 usItem, INT8 bLevel, UINT16 ubOwner, BOOL fFromRemoteClient )
|
||||
INT32 NewSmokeEffect( INT32 sGridNo, UINT16 usItem, INT8 bLevel, SoldierID ubOwner, BOOL fFromRemoteClient )
|
||||
{
|
||||
SMOKEEFFECT *pSmoke;
|
||||
INT32 iSmokeIndex;
|
||||
@@ -222,7 +222,7 @@ INT32 NewSmokeEffect( INT32 sGridNo, UINT16 usItem, INT8 bLevel, UINT16 ubOwner,
|
||||
}
|
||||
#ifdef JA2BETAVERSION
|
||||
CHAR tmpMPDbgString[512];
|
||||
sprintf(tmpMPDbgString,"NewSmokeEffect ( sGridNo : %i , usItem : %i , ubOwner : %i , bLevel : %i , iSmokeEffectID : %i )\n",sGridNo, usItem , ubOwner , bLevel , iSmokeIndex );
|
||||
sprintf(tmpMPDbgString,"NewSmokeEffect ( sGridNo : %i , usItem : %i , ubOwner : %i , bLevel : %i , iSmokeEffectID : %i )\n",sGridNo, usItem , ubOwner.i , bLevel , iSmokeIndex );
|
||||
MPDebugMsg(tmpMPDbgString);
|
||||
gfMPDebugOutputRandoms = true;
|
||||
#endif
|
||||
|
||||
@@ -327,15 +327,15 @@ void InitTacticalPlacementGUI()
|
||||
giPlacements = 0;
|
||||
for( i = gTacticalStatus.Team[ OUR_TEAM ].bFirstID; i <= gTacticalStatus.Team[ OUR_TEAM ].bLastID; ++i )
|
||||
{
|
||||
|
||||
if( MercPtrs[ i ]->bActive && !MercPtrs[ i ]->flags.fBetweenSectors &&
|
||||
CurrentBattleSectorIs( MercPtrs[i]->sSectorX, MercPtrs[i]->sSectorY, MercPtrs[i]->bSectorZ ) &&
|
||||
!( MercPtrs[ i ]->flags.uiStatusFlags & ( SOLDIER_VEHICLE ) ) && // ATE Ignore vehicles
|
||||
MercPtrs[ i ]->bAssignment != ASSIGNMENT_POW &&
|
||||
MercPtrs[ i ]->bAssignment != ASSIGNMENT_MINIEVENT &&
|
||||
MercPtrs[ i ]->bAssignment != ASSIGNMENT_REBELCOMMAND &&
|
||||
!( MercPtrs[i]->usSoldierFlagMask2 & SOLDIER_CONCEALINSERTION ) &&
|
||||
MercPtrs[ i ]->bAssignment != IN_TRANSIT )
|
||||
SOLDIERTYPE *pSoldier = MercPtrs[i];
|
||||
if( pSoldier->bActive && !pSoldier->flags.fBetweenSectors &&
|
||||
CurrentBattleSectorIs( pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ ) &&
|
||||
!( pSoldier->flags.uiStatusFlags & ( SOLDIER_VEHICLE ) ) && // ATE Ignore vehicles
|
||||
pSoldier->bAssignment != ASSIGNMENT_POW &&
|
||||
pSoldier->bAssignment != ASSIGNMENT_MINIEVENT &&
|
||||
pSoldier->bAssignment != ASSIGNMENT_REBELCOMMAND &&
|
||||
!( pSoldier->usSoldierFlagMask2 & SOLDIER_CONCEALINSERTION ) &&
|
||||
pSoldier->bAssignment != IN_TRANSIT )
|
||||
{
|
||||
++giPlacements;
|
||||
}
|
||||
@@ -347,58 +347,59 @@ void InitTacticalPlacementGUI()
|
||||
giPlacements = 0;
|
||||
for( i = gTacticalStatus.Team[ OUR_TEAM ].bFirstID; i <= gTacticalStatus.Team[ OUR_TEAM ].bLastID; ++i )
|
||||
{
|
||||
if( MercPtrs[ i ]->bActive && MercPtrs[ i ]->stats.bLife && !MercPtrs[ i ]->flags.fBetweenSectors &&
|
||||
CurrentBattleSectorIs( MercPtrs[i]->sSectorX, MercPtrs[i]->sSectorY, MercPtrs[i]->bSectorZ ) &&
|
||||
MercPtrs[ i ]->bAssignment != ASSIGNMENT_POW &&
|
||||
MercPtrs[ i ]->bAssignment != ASSIGNMENT_MINIEVENT &&
|
||||
MercPtrs[ i ]->bAssignment != ASSIGNMENT_REBELCOMMAND &&
|
||||
!( MercPtrs[i]->usSoldierFlagMask2 & SOLDIER_CONCEALINSERTION ) &&
|
||||
MercPtrs[ i ]->bAssignment != IN_TRANSIT &&
|
||||
!( MercPtrs[ i ]->flags.uiStatusFlags & ( SOLDIER_VEHICLE ) ) ) // ATE Ignore vehicles
|
||||
SOLDIERTYPE *pSoldier = MercPtrs[i];
|
||||
if( pSoldier->bActive && pSoldier->stats.bLife && !pSoldier->flags.fBetweenSectors &&
|
||||
CurrentBattleSectorIs( pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ ) &&
|
||||
pSoldier->bAssignment != ASSIGNMENT_POW &&
|
||||
pSoldier->bAssignment != ASSIGNMENT_MINIEVENT &&
|
||||
pSoldier->bAssignment != ASSIGNMENT_REBELCOMMAND &&
|
||||
!( pSoldier->usSoldierFlagMask2 & SOLDIER_CONCEALINSERTION ) &&
|
||||
pSoldier->bAssignment != IN_TRANSIT &&
|
||||
!( pSoldier->flags.uiStatusFlags & ( SOLDIER_VEHICLE ) ) ) // ATE Ignore vehicles
|
||||
{
|
||||
// Flugente: if options allow it and we entered this sector - in combat - via helicopter, then allow us free selection of our entry point, and drop us from the helicopter
|
||||
if ( MercPtrs[ i ]->bTeam == gbPlayerNum && (gGameExternalOptions.ubSkyriderHotLZ == 1 || gGameExternalOptions.ubSkyriderHotLZ == 3) && MercPtrs[ i ]->usSoldierFlagMask & SOLDIER_AIRDROP )
|
||||
if ( pSoldier->bTeam == gbPlayerNum && (gGameExternalOptions.ubSkyriderHotLZ == 1 || gGameExternalOptions.ubSkyriderHotLZ == 3) && pSoldier->usSoldierFlagMask & SOLDIER_AIRDROP )
|
||||
{
|
||||
AddMercToHeli( MercPtrs[ i ]->ubID );
|
||||
AddMercToHeli( pSoldier->ubID );
|
||||
DisableButton(iTPButtons[SPREAD_BUTTON]);
|
||||
|
||||
gMercPlacement[ giPlacements ].ubStrategicInsertionCode = INSERTION_CODE_CHOPPER;
|
||||
MercPtrs[ i ]->ubStrategicInsertionCode = INSERTION_CODE_CHOPPER;
|
||||
pSoldier->ubStrategicInsertionCode = INSERTION_CODE_CHOPPER;
|
||||
gfCenter = TRUE;
|
||||
}
|
||||
|
||||
if ( GetEnemyEncounterCode() == ENEMY_AMBUSH_DEPLOYMENT_CODE )
|
||||
{
|
||||
gMercPlacement[giPlacements].ubStrategicInsertionCode = INSERTION_CODE_CENTER;
|
||||
MercPtrs[i]->ubStrategicInsertionCode = INSERTION_CODE_CENTER;
|
||||
pSoldier->ubStrategicInsertionCode = INSERTION_CODE_CENTER;
|
||||
gfCenter = TRUE;
|
||||
}
|
||||
|
||||
// WANNE - MP: Check if the desired insertion direction is valid on the map. If not, choose another entry direction!
|
||||
if (is_networked)
|
||||
{
|
||||
MercPtrs[ i ]->ubStrategicInsertionCode = GetValidInsertionDirectionForMP(MercPtrs[ i ]->ubStrategicInsertionCode);
|
||||
pSoldier->ubStrategicInsertionCode = GetValidInsertionDirectionForMP(pSoldier->ubStrategicInsertionCode);
|
||||
}
|
||||
// ATE: If we are in a vehicle - remove ourselves from it!
|
||||
//if ( MercPtrs[ i ]->flags.uiStatusFlags & ( SOLDIER_DRIVER | SOLDIER_PASSENGER ) )
|
||||
//if ( pSoldier->flags.uiStatusFlags & ( SOLDIER_DRIVER | SOLDIER_PASSENGER ) )
|
||||
//{
|
||||
// RemoveSoldierFromVehicle( MercPtrs[ i ], MercPtrs[ i ]->bVehicleID );
|
||||
// RemoveSoldierFromVehicle( pSoldier, pSoldier->bVehicleID );
|
||||
//}
|
||||
|
||||
if( MercPtrs[ i ]->ubStrategicInsertionCode == INSERTION_CODE_PRIMARY_EDGEINDEX ||
|
||||
MercPtrs[ i ]->ubStrategicInsertionCode == INSERTION_CODE_SECONDARY_EDGEINDEX )
|
||||
if( pSoldier->ubStrategicInsertionCode == INSERTION_CODE_PRIMARY_EDGEINDEX ||
|
||||
pSoldier->ubStrategicInsertionCode == INSERTION_CODE_SECONDARY_EDGEINDEX )
|
||||
{
|
||||
MercPtrs[ i ]->ubStrategicInsertionCode = (UINT8)MercPtrs[ i ]->usStrategicInsertionData;
|
||||
pSoldier->ubStrategicInsertionCode = (UINT8)pSoldier->usStrategicInsertionData;
|
||||
}
|
||||
gMercPlacement[ giPlacements ].pSoldier = MercPtrs[ i ];
|
||||
gMercPlacement[ giPlacements ].ubStrategicInsertionCode = MercPtrs[ i ]->ubStrategicInsertionCode;
|
||||
gMercPlacement[ giPlacements ].pSoldier = pSoldier;
|
||||
gMercPlacement[ giPlacements ].ubStrategicInsertionCode = pSoldier->ubStrategicInsertionCode;
|
||||
gMercPlacement[ giPlacements ].fPlaced = FALSE;
|
||||
|
||||
// WANNE: We always want to have edgepoints
|
||||
CheckForValidMapEdge( &MercPtrs[ i ]->ubStrategicInsertionCode );
|
||||
CheckForValidMapEdge( &pSoldier->ubStrategicInsertionCode );
|
||||
|
||||
// Flugente: campaign stats
|
||||
switch( MercPtrs[ i ]->ubStrategicInsertionCode )
|
||||
switch( pSoldier->ubStrategicInsertionCode )
|
||||
{
|
||||
case INSERTION_CODE_NORTH:
|
||||
gCurrentIncident.usIncidentFlags |= INCIDENT_ATTACKDIR_NORTH;
|
||||
@@ -415,7 +416,7 @@ void InitTacticalPlacementGUI()
|
||||
}
|
||||
|
||||
// WANNE - MP: Center
|
||||
if (is_networked && MercPtrs[ i ]->ubStrategicInsertionCode == INSERTION_CODE_CENTER)
|
||||
if (is_networked && pSoldier->ubStrategicInsertionCode == INSERTION_CODE_CENTER)
|
||||
{
|
||||
gfCenter = TRUE;
|
||||
}
|
||||
|
||||
+2
-2
@@ -237,9 +237,9 @@ void SearchForOtherMembersWithinPitRadiusAndMakeThemFall( INT32 sGridNo, INT16 s
|
||||
}
|
||||
}
|
||||
|
||||
void HandleFallIntoPitFromAnimation( UINT16 ubID )
|
||||
void HandleFallIntoPitFromAnimation( SoldierID ubID )
|
||||
{
|
||||
SOLDIERTYPE *pSoldier = MercPtrs[ ubID ];
|
||||
SOLDIERTYPE *pSoldier = ubID;
|
||||
EXITGRID ExitGrid;
|
||||
INT32 sPitGridNo;
|
||||
// OK, get exit grid...
|
||||
|
||||
+4
-2
@@ -1,6 +1,8 @@
|
||||
#ifndef __PITS_H
|
||||
#define __PITS_H
|
||||
|
||||
#include "overhead types.h"
|
||||
|
||||
void Add3X3Pit( INT32 iMapIndex );
|
||||
void Add5X5Pit( INT32 iMapIndex );
|
||||
void Remove3X3Pit( INT32 iMapIndex );
|
||||
@@ -14,7 +16,7 @@ void RemoveAllPits();
|
||||
extern BOOLEAN gfShowPits;
|
||||
extern BOOLEAN gfLoadPitsWithoutArming;
|
||||
|
||||
void HandleFallIntoPitFromAnimation( UINT16 ubID );
|
||||
void HandleFallIntoPitFromAnimation( SoldierID ubID );
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user