mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +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:
@@ -336,7 +336,7 @@ void DebugAI( INT8 bMsgType, SOLDIERTYPE *pSoldier, STR szOutput, bool doLog, IN
|
||||
strcat(msg, buf);
|
||||
}
|
||||
|
||||
if (bAction >= AI_ACTION_NONE && bAction <= AI_ACTION_LAST)
|
||||
if (bAction >= AI_ACTION_NONE && bAction < AI_ACTION_INVALID)
|
||||
{
|
||||
strcat(msg, " ");
|
||||
strcat(msg, szAction[bAction]);
|
||||
|
||||
Reference in New Issue
Block a user