mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Improved code to check if militia options are available.
Start radio animation when giving orders to militia. FindClosestClimbPointAvailableToAI: don't check roaming range when searching climb spot for AI. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8939 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+125
-798
File diff suppressed because it is too large
Load Diff
@@ -25991,3 +25991,25 @@ UINT16 SOLDIERTYPE::RetreatCounterValue(void)
|
|||||||
{
|
{
|
||||||
return usSkillCounter[SOLDIER_COUNTER_RETREAT];
|
return usSkillCounter[SOLDIER_COUNTER_RETREAT];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SOLDIERTYPE::StartRadioAnimation(void)
|
||||||
|
{
|
||||||
|
if (this->ubBodyType != REGMALE && this->ubBodyType != BIGMALE ||
|
||||||
|
Water(this->sGridNo, this->pathing.bLevel) ||
|
||||||
|
this->bVisible != TRUE)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (gAnimControl[this->usAnimState].ubEndHeight)
|
||||||
|
{
|
||||||
|
case ANIM_STAND:
|
||||||
|
this->EVENT_InitNewSoldierAnim(AI_RADIO, 0, FALSE);
|
||||||
|
break;
|
||||||
|
case ANIM_CROUCH:
|
||||||
|
this->EVENT_InitNewSoldierAnim(AI_CR_RADIO, 0, FALSE);
|
||||||
|
break;
|
||||||
|
case ANIM_PRONE:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1876,6 +1876,8 @@ public:
|
|||||||
void RetreatCounterStop(void);
|
void RetreatCounterStop(void);
|
||||||
UINT16 RetreatCounterValue(void);
|
UINT16 RetreatCounterValue(void);
|
||||||
|
|
||||||
|
void StartRadioAnimation(void);
|
||||||
|
|
||||||
// Flugente: prisoner system
|
// Flugente: prisoner system
|
||||||
BOOLEAN CanProcessPrisoners();
|
BOOLEAN CanProcessPrisoners();
|
||||||
UINT32 GetSurrenderStrength();
|
UINT32 GetSurrenderStrength();
|
||||||
|
|||||||
@@ -2697,7 +2697,7 @@ void CheckForChangingOrders(SOLDIERTYPE *pSoldier)
|
|||||||
// crank up ONGUARD to CLOSEPATROL, and CLOSEPATROL to FARPATROL
|
// crank up ONGUARD to CLOSEPATROL, and CLOSEPATROL to FARPATROL
|
||||||
pSoldier->aiData.bOrders++; // increase roaming range by 1 category
|
pSoldier->aiData.bOrders++; // increase roaming range by 1 category
|
||||||
}
|
}
|
||||||
else if ( pSoldier->bTeam == MILITIA_TEAM && pSoldier->aiData.bOrders != SNIPER )
|
else if ( pSoldier->bTeam == MILITIA_TEAM && pSoldier->aiData.bOrders != STATIONARY )
|
||||||
{
|
{
|
||||||
// go on alert!
|
// go on alert!
|
||||||
pSoldier->aiData.bOrders = SEEKENEMY;
|
pSoldier->aiData.bOrders = SEEKENEMY;
|
||||||
|
|||||||
+11
-2
@@ -1818,7 +1818,16 @@ INT32 ClosestUnDisguisedPC( SOLDIERTYPE *pSoldier, INT32 * psDistance )
|
|||||||
|
|
||||||
INT32 FindClosestClimbPointAvailableToAI( SOLDIERTYPE * pSoldier, INT32 sStartGridNo, INT32 sDesiredGridNo, BOOLEAN fClimbUp )
|
INT32 FindClosestClimbPointAvailableToAI( SOLDIERTYPE * pSoldier, INT32 sStartGridNo, INT32 sDesiredGridNo, BOOLEAN fClimbUp )
|
||||||
{
|
{
|
||||||
INT32 sGridNo;
|
// sevenfm: safety check
|
||||||
|
if (!pSoldier)
|
||||||
|
{
|
||||||
|
return NOWHERE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// sevenfm: don't check roaming range
|
||||||
|
return FindClosestClimbPoint(pSoldier, sStartGridNo, sDesiredGridNo, fClimbUp);
|
||||||
|
|
||||||
|
/*INT32 sGridNo;
|
||||||
INT32 sRoamingOrigin;
|
INT32 sRoamingOrigin;
|
||||||
INT16 sRoamingRange;
|
INT16 sRoamingRange;
|
||||||
|
|
||||||
@@ -1845,7 +1854,7 @@ INT32 FindClosestClimbPointAvailableToAI( SOLDIERTYPE * pSoldier, INT32 sStartGr
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
return( sGridNo );
|
return( sGridNo );
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOLEAN ClimbingNecessary( SOLDIERTYPE * pSoldier, INT32 sDestGridNo, INT8 bDestLevel )
|
BOOLEAN ClimbingNecessary( SOLDIERTYPE * pSoldier, INT32 sDestGridNo, INT8 bDestLevel )
|
||||||
|
|||||||
Reference in New Issue
Block a user