mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
Split DecideAction into several specialized DecideAction functions
* Removes the need to constantly check for fCivilian, ARMED_VEHICLE, ENEMY_ROBOT etc inside DecideAction * Move AI decision checks into their own functions, such as DecideActionRadioRedAlert * Add new entry to ActionType. AI_ACTION_INVALID signals that no valid action was found when a function returns, or no valid action is possible * Do a weighted random selection for choosing target under DecideActionBlackSoldier
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#include "Overhead.h"
|
||||
#include "random.h"
|
||||
#include "Points.h"
|
||||
|
||||
#include "ai.h"
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
|
||||
@@ -239,7 +239,7 @@ INT32 GetInterveningClimbingLocation( SOLDIERTYPE * pSoldier, INT32 sDestGridNo,
|
||||
UINT8 GetTraversalQuoteActionID( INT8 bDirection );
|
||||
INT32 GoAsFarAsPossibleTowards(SOLDIERTYPE *pSoldier, INT32 sDesGrid, INT8 bAction);
|
||||
|
||||
INT8 HeadForTheStairCase( SOLDIERTYPE * pSoldier );
|
||||
ActionType HeadForTheStairCase( SOLDIERTYPE * pSoldier );
|
||||
|
||||
BOOLEAN InSmoke(INT32 sGridNo, INT8 bLevel);
|
||||
BOOLEAN InGas( SOLDIERTYPE *pSoldier, INT32 sGridNo );
|
||||
|
||||
Reference in New Issue
Block a user