mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Use SoldierID
This commit is contained in:
+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 );
|
||||
|
||||
Reference in New Issue
Block a user