2016-06-04 15:24:23 +02:00
|
|
|
/***
|
|
|
|
*
|
|
|
|
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
|
|
|
|
*
|
|
|
|
* This product contains software technology licensed from Id
|
|
|
|
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
|
|
|
|
* All Rights Reserved.
|
|
|
|
*
|
|
|
|
* This source code contains proprietary and confidential information of
|
|
|
|
* Valve LLC and its suppliers. Access to this code is restricted to
|
|
|
|
* persons who have executed a written SDK license with Valve. Any access,
|
|
|
|
* use or distribution of this code by or to any unlicensed person is illegal.
|
|
|
|
*
|
|
|
|
****/
|
|
|
|
//=========================================================
|
|
|
|
// Default behaviors.
|
|
|
|
//=========================================================
|
|
|
|
#include "extdll.h"
|
|
|
|
#include "util.h"
|
|
|
|
#include "cbase.h"
|
|
|
|
#include "monsters.h"
|
|
|
|
#include "schedule.h"
|
|
|
|
#include "defaultai.h"
|
|
|
|
#include "soundent.h"
|
|
|
|
#include "nodes.h"
|
|
|
|
#include "scripted.h"
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
// Fail
|
|
|
|
//=========================================================
|
2016-07-31 15:48:50 +02:00
|
|
|
Task_t tlFail[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_STOP_MOVING, 0 },
|
|
|
|
{ TASK_SET_ACTIVITY, (float)ACT_IDLE },
|
|
|
|
{ TASK_WAIT, (float)2 },
|
|
|
|
{ TASK_WAIT_PVS, (float)0 },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Schedule_t slFail[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
|
|
|
{
|
|
|
|
tlFail,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlFail ),
|
2016-06-04 15:24:23 +02:00
|
|
|
bits_COND_CAN_ATTACK,
|
|
|
|
0,
|
|
|
|
"Fail"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
// Idle Schedules
|
|
|
|
//=========================================================
|
2016-07-31 15:48:50 +02:00
|
|
|
Task_t tlIdleStand1[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_STOP_MOVING, 0 },
|
|
|
|
{ TASK_SET_ACTIVITY, (float)ACT_IDLE },
|
|
|
|
{ TASK_WAIT, (float)5 }, // repick IDLESTAND every five seconds. gives us a chance to pick an active idle, fidget, etc.
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Schedule_t slIdleStand[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{
|
2016-06-04 15:24:23 +02:00
|
|
|
tlIdleStand1,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlIdleStand1 ),
|
|
|
|
bits_COND_NEW_ENEMY |
|
|
|
|
bits_COND_SEE_FEAR |
|
|
|
|
bits_COND_LIGHT_DAMAGE |
|
|
|
|
bits_COND_HEAVY_DAMAGE |
|
|
|
|
bits_COND_HEAR_SOUND |
|
|
|
|
bits_COND_SMELL_FOOD |
|
|
|
|
bits_COND_SMELL |
|
2016-06-04 15:24:23 +02:00
|
|
|
bits_COND_PROVOKED,
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
bits_SOUND_COMBAT |// sound flags
|
|
|
|
bits_SOUND_WORLD |
|
|
|
|
bits_SOUND_PLAYER |
|
|
|
|
bits_SOUND_DANGER |
|
2016-06-04 15:24:23 +02:00
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
bits_SOUND_MEAT |// scents
|
|
|
|
bits_SOUND_CARCASS |
|
2016-06-04 15:24:23 +02:00
|
|
|
bits_SOUND_GARBAGE,
|
|
|
|
"IdleStand"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Schedule_t slIdleTrigger[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{
|
2016-06-04 15:24:23 +02:00
|
|
|
tlIdleStand1,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlIdleStand1 ),
|
|
|
|
bits_COND_LIGHT_DAMAGE |
|
2016-06-04 15:24:23 +02:00
|
|
|
bits_COND_HEAVY_DAMAGE,
|
|
|
|
0,
|
|
|
|
"Idle Trigger"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Task_t tlIdleWalk1[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_WALK_PATH, (float)9999 },
|
|
|
|
{ TASK_WAIT_FOR_MOVEMENT, (float)0 },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Schedule_t slIdleWalk[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{
|
2016-06-04 15:24:23 +02:00
|
|
|
tlIdleWalk1,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlIdleWalk1 ),
|
|
|
|
bits_COND_NEW_ENEMY |
|
|
|
|
bits_COND_LIGHT_DAMAGE |
|
|
|
|
bits_COND_HEAVY_DAMAGE |
|
|
|
|
bits_COND_HEAR_SOUND |
|
|
|
|
bits_COND_SMELL_FOOD |
|
|
|
|
bits_COND_SMELL |
|
2016-06-04 15:24:23 +02:00
|
|
|
bits_COND_PROVOKED,
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
bits_SOUND_COMBAT |// sound flags
|
2016-06-04 15:24:23 +02:00
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
bits_SOUND_MEAT |// scents
|
|
|
|
bits_SOUND_CARCASS |
|
2016-06-04 15:24:23 +02:00
|
|
|
bits_SOUND_GARBAGE,
|
|
|
|
"Idle Walk"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
// Ambush - monster stands in place and waits for a new
|
|
|
|
// enemy, or chance to attack an existing enemy.
|
|
|
|
//=========================================================
|
2016-07-31 15:48:50 +02:00
|
|
|
Task_t tlAmbush[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_STOP_MOVING, 0 },
|
|
|
|
{ TASK_SET_ACTIVITY, (float)ACT_IDLE },
|
|
|
|
{ TASK_WAIT_INDEFINITE, (float)0 },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Schedule_t slAmbush[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{
|
2016-06-04 15:24:23 +02:00
|
|
|
tlAmbush,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlAmbush ),
|
|
|
|
bits_COND_NEW_ENEMY |
|
|
|
|
bits_COND_LIGHT_DAMAGE |
|
|
|
|
bits_COND_HEAVY_DAMAGE |
|
2016-06-04 15:24:23 +02:00
|
|
|
bits_COND_PROVOKED,
|
|
|
|
0,
|
|
|
|
"Ambush"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
// ActiveIdle schedule - !!!BUGBUG - if this schedule doesn't
|
|
|
|
// complete on its own, the monster's HintNode will not be
|
|
|
|
// cleared, and the rest of the monster's group will avoid
|
|
|
|
// that node because they think the group member that was
|
|
|
|
// previously interrupted is still using that node to active
|
|
|
|
// idle.
|
|
|
|
///=========================================================
|
|
|
|
Task_t tlActiveIdle[] =
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_FIND_HINTNODE, (float)0 },
|
|
|
|
{ TASK_GET_PATH_TO_HINTNODE, (float)0 },
|
|
|
|
{ TASK_STORE_LASTPOSITION, (float)0 },
|
|
|
|
{ TASK_WALK_PATH, (float)0 },
|
|
|
|
{ TASK_WAIT_FOR_MOVEMENT, (float)0 },
|
|
|
|
{ TASK_FACE_HINTNODE, (float)0 },
|
|
|
|
{ TASK_PLAY_ACTIVE_IDLE, (float)0 },
|
|
|
|
{ TASK_GET_PATH_TO_LASTPOSITION, (float)0 },
|
|
|
|
{ TASK_WALK_PATH, (float)0 },
|
|
|
|
{ TASK_WAIT_FOR_MOVEMENT, (float)0 },
|
|
|
|
{ TASK_CLEAR_LASTPOSITION, (float)0 },
|
|
|
|
{ TASK_CLEAR_HINTNODE, (float)0 },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
Schedule_t slActiveIdle[] =
|
|
|
|
{
|
|
|
|
{
|
|
|
|
tlActiveIdle,
|
|
|
|
ARRAYSIZE( tlActiveIdle ),
|
2016-07-31 15:48:50 +02:00
|
|
|
bits_COND_NEW_ENEMY |
|
|
|
|
bits_COND_LIGHT_DAMAGE |
|
|
|
|
bits_COND_HEAVY_DAMAGE |
|
|
|
|
bits_COND_PROVOKED |
|
2016-06-04 15:24:23 +02:00
|
|
|
bits_COND_HEAR_SOUND,
|
2016-07-31 15:48:50 +02:00
|
|
|
bits_SOUND_COMBAT |
|
|
|
|
bits_SOUND_WORLD |
|
|
|
|
bits_SOUND_PLAYER |
|
2016-06-04 15:24:23 +02:00
|
|
|
bits_SOUND_DANGER,
|
|
|
|
"Active Idle"
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
// Wake Schedules
|
|
|
|
//=========================================================
|
|
|
|
Task_t tlWakeAngry1[] =
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_STOP_MOVING, 0 },
|
|
|
|
{ TASK_SET_ACTIVITY, (float)ACT_IDLE },
|
|
|
|
{ TASK_SOUND_WAKE, (float)0 },
|
|
|
|
{ TASK_FACE_IDEAL, (float)0 },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
Schedule_t slWakeAngry[] =
|
|
|
|
{
|
|
|
|
{
|
|
|
|
tlWakeAngry1,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlWakeAngry1 ),
|
2016-06-04 15:24:23 +02:00
|
|
|
0,
|
|
|
|
0,
|
|
|
|
"Wake Angry"
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
// AlertFace Schedules
|
|
|
|
//=========================================================
|
2016-07-31 15:48:50 +02:00
|
|
|
Task_t tlAlertFace1[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_STOP_MOVING, 0 },
|
|
|
|
{ TASK_SET_ACTIVITY, (float)ACT_IDLE },
|
|
|
|
{ TASK_FACE_IDEAL, (float)0 },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Schedule_t slAlertFace[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{
|
2016-06-04 15:24:23 +02:00
|
|
|
tlAlertFace1,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlAlertFace1 ),
|
|
|
|
bits_COND_NEW_ENEMY |
|
|
|
|
bits_COND_SEE_FEAR |
|
|
|
|
bits_COND_LIGHT_DAMAGE |
|
|
|
|
bits_COND_HEAVY_DAMAGE |
|
2016-06-04 15:24:23 +02:00
|
|
|
bits_COND_PROVOKED,
|
|
|
|
0,
|
|
|
|
"Alert Face"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
// AlertSmallFlinch Schedule - shot, but didn't see attacker,
|
|
|
|
// flinch then face
|
|
|
|
//=========================================================
|
2016-07-31 15:48:50 +02:00
|
|
|
Task_t tlAlertSmallFlinch[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_STOP_MOVING, 0 },
|
|
|
|
{ TASK_REMEMBER, (float)bits_MEMORY_FLINCHED },
|
|
|
|
{ TASK_SMALL_FLINCH, (float)0 },
|
|
|
|
{ TASK_SET_SCHEDULE, (float)SCHED_ALERT_FACE },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Schedule_t slAlertSmallFlinch[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{
|
2016-06-04 15:24:23 +02:00
|
|
|
tlAlertSmallFlinch,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlAlertSmallFlinch ),
|
2016-06-04 15:24:23 +02:00
|
|
|
0,
|
|
|
|
0,
|
|
|
|
"Alert Small Flinch"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
// AlertIdle Schedules
|
|
|
|
//=========================================================
|
2016-07-31 15:48:50 +02:00
|
|
|
Task_t tlAlertStand1[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_STOP_MOVING, 0 },
|
|
|
|
{ TASK_SET_ACTIVITY, (float)ACT_IDLE },
|
|
|
|
{ TASK_WAIT, (float)20 },
|
|
|
|
{ TASK_SUGGEST_STATE, (float)MONSTERSTATE_IDLE },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Schedule_t slAlertStand[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{
|
2016-06-04 15:24:23 +02:00
|
|
|
tlAlertStand1,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlAlertStand1 ),
|
|
|
|
bits_COND_NEW_ENEMY |
|
|
|
|
bits_COND_SEE_ENEMY |
|
|
|
|
bits_COND_SEE_FEAR |
|
|
|
|
bits_COND_LIGHT_DAMAGE |
|
|
|
|
bits_COND_HEAVY_DAMAGE |
|
|
|
|
bits_COND_PROVOKED |
|
|
|
|
bits_COND_SMELL |
|
|
|
|
bits_COND_SMELL_FOOD |
|
2016-06-04 15:24:23 +02:00
|
|
|
bits_COND_HEAR_SOUND,
|
2016-07-31 15:48:50 +02:00
|
|
|
bits_SOUND_COMBAT |// sound flags
|
|
|
|
bits_SOUND_WORLD |
|
|
|
|
bits_SOUND_PLAYER |
|
|
|
|
bits_SOUND_DANGER |
|
|
|
|
bits_SOUND_MEAT |// scent flags
|
|
|
|
bits_SOUND_CARCASS |
|
2016-06-04 15:24:23 +02:00
|
|
|
bits_SOUND_GARBAGE,
|
|
|
|
"Alert Stand"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
// InvestigateSound - sends a monster to the location of the
|
|
|
|
// sound that was just heard, to check things out.
|
|
|
|
//=========================================================
|
|
|
|
Task_t tlInvestigateSound[] =
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_STOP_MOVING, (float)0 },
|
|
|
|
{ TASK_STORE_LASTPOSITION, (float)0 },
|
|
|
|
{ TASK_GET_PATH_TO_BESTSOUND, (float)0 },
|
|
|
|
{ TASK_FACE_IDEAL, (float)0 },
|
|
|
|
{ TASK_WALK_PATH, (float)0 },
|
|
|
|
{ TASK_WAIT_FOR_MOVEMENT, (float)0 },
|
|
|
|
{ TASK_PLAY_SEQUENCE, (float)ACT_IDLE },
|
|
|
|
{ TASK_WAIT, (float)10 },
|
|
|
|
{ TASK_GET_PATH_TO_LASTPOSITION,(float)0 },
|
|
|
|
{ TASK_WALK_PATH, (float)0 },
|
|
|
|
{ TASK_WAIT_FOR_MOVEMENT, (float)0 },
|
|
|
|
{ TASK_CLEAR_LASTPOSITION, (float)0 },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Schedule_t slInvestigateSound[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{
|
2016-06-04 15:24:23 +02:00
|
|
|
tlInvestigateSound,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlInvestigateSound ),
|
|
|
|
bits_COND_NEW_ENEMY |
|
|
|
|
bits_COND_SEE_FEAR |
|
|
|
|
bits_COND_LIGHT_DAMAGE |
|
|
|
|
bits_COND_HEAVY_DAMAGE |
|
2016-06-04 15:24:23 +02:00
|
|
|
bits_COND_HEAR_SOUND,
|
|
|
|
bits_SOUND_DANGER,
|
|
|
|
"InvestigateSound"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
// CombatIdle Schedule
|
|
|
|
//=========================================================
|
2016-07-31 15:48:50 +02:00
|
|
|
Task_t tlCombatStand1[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_STOP_MOVING, 0 },
|
|
|
|
{ TASK_SET_ACTIVITY, (float)ACT_IDLE },
|
|
|
|
{ TASK_WAIT_INDEFINITE, (float)0 },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Schedule_t slCombatStand[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{
|
2016-06-04 15:24:23 +02:00
|
|
|
tlCombatStand1,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlCombatStand1 ),
|
|
|
|
bits_COND_NEW_ENEMY |
|
|
|
|
bits_COND_ENEMY_DEAD |
|
|
|
|
bits_COND_LIGHT_DAMAGE |
|
|
|
|
bits_COND_HEAVY_DAMAGE |
|
2016-06-04 15:24:23 +02:00
|
|
|
bits_COND_CAN_ATTACK,
|
|
|
|
0,
|
|
|
|
"Combat Stand"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
// CombatFace Schedule
|
|
|
|
//=========================================================
|
2016-07-31 15:48:50 +02:00
|
|
|
Task_t tlCombatFace1[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_STOP_MOVING, 0 },
|
|
|
|
{ TASK_SET_ACTIVITY, (float)ACT_IDLE },
|
|
|
|
{ TASK_FACE_ENEMY, (float)0 },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Schedule_t slCombatFace[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
|
|
|
{
|
|
|
|
tlCombatFace1,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlCombatFace1 ),
|
|
|
|
bits_COND_CAN_ATTACK |
|
|
|
|
bits_COND_NEW_ENEMY |
|
2016-06-04 15:24:23 +02:00
|
|
|
bits_COND_ENEMY_DEAD,
|
|
|
|
0,
|
|
|
|
"Combat Face"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
// Standoff schedule. Used in combat when a monster is
|
|
|
|
// hiding in cover or the enemy has moved out of sight.
|
|
|
|
// Should we look around in this schedule?
|
|
|
|
//=========================================================
|
2016-07-31 15:48:50 +02:00
|
|
|
Task_t tlStandoff[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_STOP_MOVING, (float)0 },
|
|
|
|
{ TASK_SET_ACTIVITY, (float)ACT_IDLE },
|
|
|
|
{ TASK_WAIT_FACE_ENEMY, (float)2 },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
Schedule_t slStandoff[] =
|
|
|
|
{
|
|
|
|
{
|
|
|
|
tlStandoff,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlStandoff ),
|
|
|
|
bits_COND_CAN_RANGE_ATTACK1 |
|
|
|
|
bits_COND_CAN_RANGE_ATTACK2 |
|
|
|
|
bits_COND_ENEMY_DEAD |
|
|
|
|
bits_COND_NEW_ENEMY |
|
2016-06-04 15:24:23 +02:00
|
|
|
bits_COND_HEAR_SOUND,
|
|
|
|
bits_SOUND_DANGER,
|
|
|
|
"Standoff"
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
// Arm weapon (draw gun)
|
|
|
|
//=========================================================
|
|
|
|
Task_t tlArmWeapon[] =
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_STOP_MOVING, 0 },
|
|
|
|
{ TASK_PLAY_SEQUENCE, (float)ACT_ARM }
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Schedule_t slArmWeapon[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
|
|
|
{
|
|
|
|
tlArmWeapon,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlArmWeapon ),
|
2016-06-04 15:24:23 +02:00
|
|
|
0,
|
|
|
|
0,
|
|
|
|
"Arm Weapon"
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
// reload schedule
|
|
|
|
//=========================================================
|
|
|
|
Task_t tlReload[] =
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_STOP_MOVING, 0 },
|
|
|
|
{ TASK_PLAY_SEQUENCE, float(ACT_RELOAD) },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Schedule_t slReload[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
|
|
|
{
|
|
|
|
tlReload,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlReload ),
|
2016-06-04 15:24:23 +02:00
|
|
|
bits_COND_HEAVY_DAMAGE,
|
|
|
|
0,
|
|
|
|
"Reload"
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
// Attack Schedules
|
|
|
|
//=========================================================
|
|
|
|
|
|
|
|
// primary range attack
|
2016-07-31 15:48:50 +02:00
|
|
|
Task_t tlRangeAttack1[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_STOP_MOVING, 0 },
|
|
|
|
{ TASK_FACE_ENEMY, (float)0 },
|
|
|
|
{ TASK_RANGE_ATTACK1, (float)0 },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Schedule_t slRangeAttack1[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{
|
2016-06-04 15:24:23 +02:00
|
|
|
tlRangeAttack1,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlRangeAttack1 ),
|
|
|
|
bits_COND_NEW_ENEMY |
|
|
|
|
bits_COND_ENEMY_DEAD |
|
|
|
|
bits_COND_LIGHT_DAMAGE |
|
|
|
|
bits_COND_HEAVY_DAMAGE |
|
|
|
|
bits_COND_ENEMY_OCCLUDED |
|
|
|
|
bits_COND_NO_AMMO_LOADED |
|
2016-06-04 15:24:23 +02:00
|
|
|
bits_COND_HEAR_SOUND,
|
|
|
|
bits_SOUND_DANGER,
|
|
|
|
"Range Attack1"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
// secondary range attack
|
2016-07-31 15:48:50 +02:00
|
|
|
Task_t tlRangeAttack2[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_STOP_MOVING, 0 },
|
|
|
|
{ TASK_FACE_ENEMY, (float)0 },
|
|
|
|
{ TASK_RANGE_ATTACK2, (float)0 },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Schedule_t slRangeAttack2[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{
|
2016-06-04 15:24:23 +02:00
|
|
|
tlRangeAttack2,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlRangeAttack2 ),
|
|
|
|
bits_COND_NEW_ENEMY |
|
|
|
|
bits_COND_ENEMY_DEAD |
|
|
|
|
bits_COND_LIGHT_DAMAGE |
|
|
|
|
bits_COND_HEAVY_DAMAGE |
|
|
|
|
bits_COND_ENEMY_OCCLUDED |
|
2016-06-04 15:24:23 +02:00
|
|
|
bits_COND_HEAR_SOUND,
|
|
|
|
bits_SOUND_DANGER,
|
|
|
|
"Range Attack2"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
// primary melee attack
|
2016-07-31 15:48:50 +02:00
|
|
|
Task_t tlPrimaryMeleeAttack1[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_STOP_MOVING, 0 },
|
|
|
|
{ TASK_FACE_ENEMY, (float)0 },
|
|
|
|
{ TASK_MELEE_ATTACK1, (float)0 },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Schedule_t slPrimaryMeleeAttack[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{
|
2016-06-04 15:24:23 +02:00
|
|
|
tlPrimaryMeleeAttack1,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlPrimaryMeleeAttack1 ),
|
|
|
|
bits_COND_NEW_ENEMY |
|
|
|
|
bits_COND_ENEMY_DEAD |
|
|
|
|
bits_COND_LIGHT_DAMAGE |
|
|
|
|
bits_COND_HEAVY_DAMAGE |
|
2016-06-04 15:24:23 +02:00
|
|
|
bits_COND_ENEMY_OCCLUDED,
|
|
|
|
0,
|
|
|
|
"Primary Melee Attack"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
// secondary melee attack
|
2016-07-31 15:48:50 +02:00
|
|
|
Task_t tlSecondaryMeleeAttack1[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_STOP_MOVING, 0 },
|
|
|
|
{ TASK_FACE_ENEMY, (float)0 },
|
|
|
|
{ TASK_MELEE_ATTACK2, (float)0},
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Schedule_t slSecondaryMeleeAttack[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{
|
2016-06-04 15:24:23 +02:00
|
|
|
tlSecondaryMeleeAttack1,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlSecondaryMeleeAttack1 ),
|
|
|
|
bits_COND_NEW_ENEMY |
|
|
|
|
bits_COND_ENEMY_DEAD |
|
|
|
|
bits_COND_LIGHT_DAMAGE |
|
|
|
|
bits_COND_HEAVY_DAMAGE |
|
2016-06-04 15:24:23 +02:00
|
|
|
bits_COND_ENEMY_OCCLUDED,
|
|
|
|
0,
|
|
|
|
"Secondary Melee Attack"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
// special attack1
|
2016-07-31 15:48:50 +02:00
|
|
|
Task_t tlSpecialAttack1[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_STOP_MOVING, 0 },
|
|
|
|
{ TASK_FACE_ENEMY, (float)0 },
|
|
|
|
{ TASK_SPECIAL_ATTACK1, (float)0 },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Schedule_t slSpecialAttack1[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{
|
2016-06-04 15:24:23 +02:00
|
|
|
tlSpecialAttack1,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlSpecialAttack1 ),
|
|
|
|
bits_COND_NEW_ENEMY |
|
|
|
|
bits_COND_ENEMY_DEAD |
|
|
|
|
bits_COND_LIGHT_DAMAGE |
|
|
|
|
bits_COND_HEAVY_DAMAGE |
|
|
|
|
bits_COND_ENEMY_OCCLUDED |
|
|
|
|
bits_COND_NO_AMMO_LOADED |
|
2016-06-04 15:24:23 +02:00
|
|
|
bits_COND_HEAR_SOUND,
|
|
|
|
bits_SOUND_DANGER,
|
|
|
|
"Special Attack1"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
// special attack2
|
2016-07-31 15:48:50 +02:00
|
|
|
Task_t tlSpecialAttack2[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_STOP_MOVING, 0 },
|
|
|
|
{ TASK_FACE_ENEMY, (float)0 },
|
|
|
|
{ TASK_SPECIAL_ATTACK2, (float)0 },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Schedule_t slSpecialAttack2[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{
|
2016-06-04 15:24:23 +02:00
|
|
|
tlSpecialAttack2,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlSpecialAttack2 ),
|
|
|
|
bits_COND_NEW_ENEMY |
|
|
|
|
bits_COND_ENEMY_DEAD |
|
|
|
|
bits_COND_LIGHT_DAMAGE |
|
|
|
|
bits_COND_HEAVY_DAMAGE |
|
|
|
|
bits_COND_ENEMY_OCCLUDED |
|
|
|
|
bits_COND_NO_AMMO_LOADED |
|
2016-06-04 15:24:23 +02:00
|
|
|
bits_COND_HEAR_SOUND,
|
|
|
|
bits_SOUND_DANGER,
|
|
|
|
"Special Attack2"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
// Chase enemy schedule
|
2016-07-31 15:48:50 +02:00
|
|
|
Task_t tlChaseEnemy1[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_SET_FAIL_SCHEDULE, (float)SCHED_CHASE_ENEMY_FAILED },
|
|
|
|
{ TASK_GET_PATH_TO_ENEMY, (float)0 },
|
|
|
|
{ TASK_RUN_PATH, (float)0 },
|
|
|
|
{ TASK_WAIT_FOR_MOVEMENT, (float)0 },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
Schedule_t slChaseEnemy[] =
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{
|
2016-06-04 15:24:23 +02:00
|
|
|
tlChaseEnemy1,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlChaseEnemy1 ),
|
|
|
|
bits_COND_NEW_ENEMY |
|
|
|
|
bits_COND_CAN_RANGE_ATTACK1 |
|
|
|
|
bits_COND_CAN_MELEE_ATTACK1 |
|
|
|
|
bits_COND_CAN_RANGE_ATTACK2 |
|
|
|
|
bits_COND_CAN_MELEE_ATTACK2 |
|
|
|
|
bits_COND_TASK_FAILED |
|
2016-06-04 15:24:23 +02:00
|
|
|
bits_COND_HEAR_SOUND,
|
|
|
|
bits_SOUND_DANGER,
|
|
|
|
"Chase Enemy"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// Chase enemy failure schedule
|
2016-07-31 15:48:50 +02:00
|
|
|
Task_t tlChaseEnemyFailed[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_STOP_MOVING, (float)0 },
|
|
|
|
{ TASK_WAIT, (float)0.2 },
|
|
|
|
{ TASK_FIND_COVER_FROM_ENEMY, (float)0 },
|
|
|
|
{ TASK_RUN_PATH, (float)0 },
|
|
|
|
{ TASK_WAIT_FOR_MOVEMENT, (float)0 },
|
|
|
|
{ TASK_REMEMBER, (float)bits_MEMORY_INCOVER },
|
|
|
|
//{ TASK_TURN_LEFT, (float)179 },
|
|
|
|
{ TASK_FACE_ENEMY, (float)0 },
|
|
|
|
{ TASK_WAIT, (float)1 },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Schedule_t slChaseEnemyFailed[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{
|
2016-06-04 15:24:23 +02:00
|
|
|
tlChaseEnemyFailed,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlChaseEnemyFailed ),
|
|
|
|
bits_COND_NEW_ENEMY |
|
|
|
|
bits_COND_CAN_RANGE_ATTACK1 |
|
|
|
|
bits_COND_CAN_MELEE_ATTACK1 |
|
|
|
|
bits_COND_CAN_RANGE_ATTACK2 |
|
|
|
|
bits_COND_CAN_MELEE_ATTACK2 |
|
2016-06-04 15:24:23 +02:00
|
|
|
bits_COND_HEAR_SOUND,
|
|
|
|
bits_SOUND_DANGER,
|
|
|
|
"tlChaseEnemyFailed"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
// small flinch, played when minor damage is taken.
|
|
|
|
//=========================================================
|
|
|
|
Task_t tlSmallFlinch[] =
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_REMEMBER, (float)bits_MEMORY_FLINCHED },
|
|
|
|
{ TASK_STOP_MOVING, 0 },
|
|
|
|
{ TASK_SMALL_FLINCH, 0 },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
Schedule_t slSmallFlinch[] =
|
|
|
|
{
|
|
|
|
{
|
|
|
|
tlSmallFlinch,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlSmallFlinch ),
|
2016-06-04 15:24:23 +02:00
|
|
|
0,
|
|
|
|
0,
|
|
|
|
"Small Flinch"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
// Die!
|
|
|
|
//=========================================================
|
|
|
|
Task_t tlDie1[] =
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_STOP_MOVING, 0 },
|
|
|
|
{ TASK_SOUND_DIE, (float)0 },
|
|
|
|
{ TASK_DIE, (float)0 },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
Schedule_t slDie[] =
|
|
|
|
{
|
|
|
|
{
|
|
|
|
tlDie1,
|
|
|
|
ARRAYSIZE( tlDie1 ),
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
"Die"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
// Victory Dance
|
|
|
|
//=========================================================
|
|
|
|
Task_t tlVictoryDance[] =
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_STOP_MOVING, 0 },
|
|
|
|
{ TASK_PLAY_SEQUENCE, (float)ACT_VICTORY_DANCE },
|
|
|
|
{ TASK_WAIT, (float)0 },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
Schedule_t slVictoryDance[] =
|
|
|
|
{
|
|
|
|
{
|
|
|
|
tlVictoryDance,
|
|
|
|
ARRAYSIZE( tlVictoryDance ),
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
"Victory Dance"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
// BarnacleVictimGrab - barnacle tongue just hit the monster,
|
|
|
|
// so play a hit animation, then play a cycling pull animation
|
|
|
|
// as the creature is hoisting the monster.
|
|
|
|
//=========================================================
|
2016-07-31 15:48:50 +02:00
|
|
|
Task_t tlBarnacleVictimGrab[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_STOP_MOVING, 0 },
|
|
|
|
{ TASK_PLAY_SEQUENCE, (float)ACT_BARNACLE_HIT },
|
|
|
|
{ TASK_SET_ACTIVITY, (float)ACT_BARNACLE_PULL },
|
|
|
|
{ TASK_WAIT_INDEFINITE, (float)0 },// just cycle barnacle pull anim while barnacle hoists.
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
Schedule_t slBarnacleVictimGrab[] =
|
|
|
|
{
|
|
|
|
{
|
|
|
|
tlBarnacleVictimGrab,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlBarnacleVictimGrab ),
|
2016-06-04 15:24:23 +02:00
|
|
|
0,
|
|
|
|
0,
|
|
|
|
"Barnacle Victim"
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
// BarnacleVictimChomp - barnacle has pulled the prey to its
|
|
|
|
// mouth. Victim should play the BARNCLE_CHOMP animation
|
|
|
|
// once, then loop the BARNACLE_CHEW animation indefinitely
|
|
|
|
//=========================================================
|
2016-07-31 15:48:50 +02:00
|
|
|
Task_t tlBarnacleVictimChomp[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_STOP_MOVING, 0 },
|
|
|
|
{ TASK_PLAY_SEQUENCE, (float)ACT_BARNACLE_CHOMP },
|
|
|
|
{ TASK_SET_ACTIVITY, (float)ACT_BARNACLE_CHEW },
|
|
|
|
{ TASK_WAIT_INDEFINITE, (float)0 },// just cycle barnacle pull anim while barnacle hoists.
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
Schedule_t slBarnacleVictimChomp[] =
|
|
|
|
{
|
|
|
|
{
|
|
|
|
tlBarnacleVictimChomp,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlBarnacleVictimChomp ),
|
2016-06-04 15:24:23 +02:00
|
|
|
0,
|
|
|
|
0,
|
|
|
|
"Barnacle Chomp"
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
// Universal Error Schedule
|
|
|
|
Task_t tlError[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_STOP_MOVING, 0 },
|
|
|
|
{ TASK_WAIT_INDEFINITE, (float)0 },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Schedule_t slError[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{
|
2016-06-04 15:24:23 +02:00
|
|
|
tlError,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlError ),
|
2016-06-04 15:24:23 +02:00
|
|
|
0,
|
|
|
|
0,
|
|
|
|
"Error"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Task_t tlScriptedWalk[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_WALK_TO_TARGET, (float)TARGET_MOVE_SCRIPTED },
|
|
|
|
{ TASK_WAIT_FOR_MOVEMENT, (float)0 },
|
|
|
|
{ TASK_PLANT_ON_SCRIPT, (float)0 },
|
|
|
|
{ TASK_FACE_SCRIPT, (float)0 },
|
|
|
|
{ TASK_FACE_IDEAL, (float)0 },
|
|
|
|
{ TASK_ENABLE_SCRIPT, (float)0 },
|
|
|
|
{ TASK_WAIT_FOR_SCRIPT, (float)0 },
|
|
|
|
{ TASK_PLAY_SCRIPT, (float)0 },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
Schedule_t slWalkToScript[] =
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{
|
2016-06-04 15:24:23 +02:00
|
|
|
tlScriptedWalk,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlScriptedWalk ),
|
2016-06-04 15:24:23 +02:00
|
|
|
SCRIPT_BREAK_CONDITIONS,
|
|
|
|
0,
|
|
|
|
"WalkToScript"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Task_t tlScriptedRun[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_RUN_TO_TARGET, (float)TARGET_MOVE_SCRIPTED },
|
|
|
|
{ TASK_WAIT_FOR_MOVEMENT,(float)0 },
|
|
|
|
{ TASK_PLANT_ON_SCRIPT, (float)0 },
|
|
|
|
{ TASK_FACE_SCRIPT, (float)0 },
|
|
|
|
{ TASK_FACE_IDEAL, (float)0 },
|
|
|
|
{ TASK_ENABLE_SCRIPT, (float)0 },
|
|
|
|
{ TASK_WAIT_FOR_SCRIPT, (float)0 },
|
|
|
|
{ TASK_PLAY_SCRIPT, (float)0 },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
Schedule_t slRunToScript[] =
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{
|
2016-06-04 15:24:23 +02:00
|
|
|
tlScriptedRun,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlScriptedRun ),
|
2016-06-04 15:24:23 +02:00
|
|
|
SCRIPT_BREAK_CONDITIONS,
|
|
|
|
0,
|
|
|
|
"RunToScript"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Task_t tlScriptedWait[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_STOP_MOVING, 0 },
|
|
|
|
{ TASK_WAIT_FOR_SCRIPT, (float)0 },
|
|
|
|
{ TASK_PLAY_SCRIPT, (float)0 },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
Schedule_t slWaitScript[] =
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{
|
2016-06-04 15:24:23 +02:00
|
|
|
tlScriptedWait,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlScriptedWait ),
|
2016-06-04 15:24:23 +02:00
|
|
|
SCRIPT_BREAK_CONDITIONS,
|
|
|
|
0,
|
|
|
|
"WaitForScript"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Task_t tlScriptedFace[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_STOP_MOVING, 0 },
|
|
|
|
{ TASK_FACE_SCRIPT, (float)0 },
|
|
|
|
{ TASK_FACE_IDEAL, (float)0 },
|
|
|
|
{ TASK_WAIT_FOR_SCRIPT, (float)0 },
|
|
|
|
{ TASK_PLAY_SCRIPT, (float)0 },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
Schedule_t slFaceScript[] =
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{
|
2016-06-04 15:24:23 +02:00
|
|
|
tlScriptedFace,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlScriptedFace ),
|
2016-06-04 15:24:23 +02:00
|
|
|
SCRIPT_BREAK_CONDITIONS,
|
|
|
|
0,
|
|
|
|
"FaceScript"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
// Cower - this is what is usually done when attempts
|
|
|
|
// to escape danger fail.
|
|
|
|
//=========================================================
|
2016-07-31 15:48:50 +02:00
|
|
|
Task_t tlCower[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_STOP_MOVING, 0 },
|
|
|
|
{ TASK_PLAY_SEQUENCE, (float)ACT_COWER },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Schedule_t slCower[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
|
|
|
{
|
|
|
|
tlCower,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlCower ),
|
2016-06-04 15:24:23 +02:00
|
|
|
0,
|
|
|
|
0,
|
|
|
|
"Cower"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
// move away from where you're currently standing.
|
|
|
|
//=========================================================
|
2016-07-31 15:48:50 +02:00
|
|
|
Task_t tlTakeCoverFromOrigin[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_STOP_MOVING, (float)0 },
|
|
|
|
{ TASK_FIND_COVER_FROM_ORIGIN, (float)0 },
|
|
|
|
{ TASK_RUN_PATH, (float)0 },
|
|
|
|
{ TASK_WAIT_FOR_MOVEMENT, (float)0 },
|
|
|
|
{ TASK_REMEMBER, (float)bits_MEMORY_INCOVER },
|
|
|
|
{ TASK_TURN_LEFT, (float)179 },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Schedule_t slTakeCoverFromOrigin[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{
|
2016-06-04 15:24:23 +02:00
|
|
|
tlTakeCoverFromOrigin,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlTakeCoverFromOrigin ),
|
2016-06-04 15:24:23 +02:00
|
|
|
bits_COND_NEW_ENEMY,
|
|
|
|
0,
|
|
|
|
"TakeCoverFromOrigin"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
// hide from the loudest sound source
|
|
|
|
//=========================================================
|
2016-07-31 15:48:50 +02:00
|
|
|
Task_t tlTakeCoverFromBestSound[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_STOP_MOVING, (float)0 },
|
|
|
|
{ TASK_FIND_COVER_FROM_BEST_SOUND, (float)0 },
|
|
|
|
{ TASK_RUN_PATH, (float)0 },
|
|
|
|
{ TASK_WAIT_FOR_MOVEMENT, (float)0 },
|
|
|
|
{ TASK_REMEMBER, (float)bits_MEMORY_INCOVER },
|
|
|
|
{ TASK_TURN_LEFT, (float)179 },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Schedule_t slTakeCoverFromBestSound[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{
|
2016-06-04 15:24:23 +02:00
|
|
|
tlTakeCoverFromBestSound,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlTakeCoverFromBestSound ),
|
2016-06-04 15:24:23 +02:00
|
|
|
bits_COND_NEW_ENEMY,
|
|
|
|
0,
|
|
|
|
"TakeCoverFromBestSound"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
// Take cover from enemy! Tries lateral cover before node
|
|
|
|
// cover!
|
|
|
|
//=========================================================
|
2016-07-31 15:48:50 +02:00
|
|
|
Task_t tlTakeCoverFromEnemy[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{ TASK_STOP_MOVING, (float)0 },
|
|
|
|
{ TASK_WAIT, (float)0.2 },
|
|
|
|
{ TASK_FIND_COVER_FROM_ENEMY, (float)0 },
|
|
|
|
{ TASK_RUN_PATH, (float)0 },
|
|
|
|
{ TASK_WAIT_FOR_MOVEMENT, (float)0 },
|
|
|
|
{ TASK_REMEMBER, (float)bits_MEMORY_INCOVER },
|
|
|
|
//{ TASK_TURN_LEFT, (float)179 },
|
|
|
|
{ TASK_FACE_ENEMY, (float)0 },
|
|
|
|
{ TASK_WAIT, (float)1 },
|
2016-06-04 15:24:23 +02:00
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Schedule_t slTakeCoverFromEnemy[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
{
|
2016-06-04 15:24:23 +02:00
|
|
|
tlTakeCoverFromEnemy,
|
2016-07-31 15:48:50 +02:00
|
|
|
ARRAYSIZE( tlTakeCoverFromEnemy ),
|
2016-06-04 15:24:23 +02:00
|
|
|
bits_COND_NEW_ENEMY,
|
|
|
|
0,
|
|
|
|
"tlTakeCoverFromEnemy"
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Schedule_t *CBaseMonster::m_scheduleList[] =
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
|
|
|
slIdleStand,
|
|
|
|
slIdleTrigger,
|
|
|
|
slIdleWalk,
|
|
|
|
slAmbush,
|
|
|
|
slActiveIdle,
|
|
|
|
slWakeAngry,
|
|
|
|
slAlertFace,
|
|
|
|
slAlertSmallFlinch,
|
|
|
|
slAlertStand,
|
|
|
|
slInvestigateSound,
|
|
|
|
slCombatStand,
|
|
|
|
slCombatFace,
|
|
|
|
slStandoff,
|
|
|
|
slArmWeapon,
|
|
|
|
slReload,
|
|
|
|
slRangeAttack1,
|
|
|
|
slRangeAttack2,
|
|
|
|
slPrimaryMeleeAttack,
|
|
|
|
slSecondaryMeleeAttack,
|
|
|
|
slSpecialAttack1,
|
|
|
|
slSpecialAttack2,
|
|
|
|
slChaseEnemy,
|
|
|
|
slChaseEnemyFailed,
|
|
|
|
slSmallFlinch,
|
|
|
|
slDie,
|
|
|
|
slVictoryDance,
|
|
|
|
slBarnacleVictimGrab,
|
|
|
|
slBarnacleVictimChomp,
|
|
|
|
slError,
|
|
|
|
slWalkToScript,
|
|
|
|
slRunToScript,
|
|
|
|
slWaitScript,
|
|
|
|
slFaceScript,
|
|
|
|
slCower,
|
|
|
|
slTakeCoverFromOrigin,
|
|
|
|
slTakeCoverFromBestSound,
|
|
|
|
slTakeCoverFromEnemy,
|
|
|
|
slFail
|
|
|
|
};
|
|
|
|
|
|
|
|
Schedule_t *CBaseMonster::ScheduleFromName( const char *pName )
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return ScheduleInList( pName, m_scheduleList, ARRAYSIZE( m_scheduleList ) );
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
Schedule_t *CBaseMonster::ScheduleInList( const char *pName, Schedule_t **pList, int listCount )
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
|
|
|
int i;
|
2016-07-31 15:48:50 +02:00
|
|
|
|
|
|
|
if( !pName )
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
ALERT( at_console, "%s set to unnamed schedule!\n", STRING( pev->classname ) );
|
2016-06-04 15:24:23 +02:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
for( i = 0; i < listCount; i++ )
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
if( !pList[i]->pName )
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
|
|
|
ALERT( at_console, "Unnamed schedule!\n" );
|
|
|
|
continue;
|
|
|
|
}
|
2016-07-31 15:48:50 +02:00
|
|
|
if( stricmp( pName, pList[i]->pName ) == 0 )
|
2016-06-04 15:24:23 +02:00
|
|
|
return pList[i];
|
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
// GetScheduleOfType - returns a pointer to one of the
|
|
|
|
// monster's available schedules of the indicated type.
|
|
|
|
//=========================================================
|
2016-07-31 15:48:50 +02:00
|
|
|
Schedule_t* CBaseMonster::GetScheduleOfType( int Type )
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
//ALERT( at_console, "Sched Type:%d\n", Type );
|
|
|
|
switch( Type )
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
|
|
|
// This is the schedule for scripted sequences AND scripted AI
|
|
|
|
case SCHED_AISCRIPT:
|
|
|
|
{
|
|
|
|
ASSERT( m_pCine != NULL );
|
2016-07-31 15:48:50 +02:00
|
|
|
if( !m_pCine )
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
ALERT( at_aiconsole, "Script failed for %s\n", STRING( pev->classname ) );
|
2016-06-04 15:24:23 +02:00
|
|
|
CineCleanup();
|
|
|
|
return GetScheduleOfType( SCHED_IDLE_STAND );
|
|
|
|
}
|
2016-07-31 15:48:50 +02:00
|
|
|
//else
|
|
|
|
// ALERT( at_aiconsole, "Starting script %s for %s\n", STRING( m_pCine->m_iszPlay ), STRING( pev->classname ) );
|
2016-06-04 15:24:23 +02:00
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
switch( m_pCine->m_fMoveTo )
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
case 0:
|
|
|
|
case 4:
|
2016-06-04 15:24:23 +02:00
|
|
|
return slWaitScript;
|
2016-07-31 15:48:50 +02:00
|
|
|
case 1:
|
2016-06-04 15:24:23 +02:00
|
|
|
return slWalkToScript;
|
2016-07-31 15:48:50 +02:00
|
|
|
case 2:
|
2016-06-04 15:24:23 +02:00
|
|
|
return slRunToScript;
|
|
|
|
case 5:
|
|
|
|
return slFaceScript;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case SCHED_IDLE_STAND:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
if( RANDOM_LONG( 0, 14 ) == 0 && FCanActiveIdle() )
|
2016-06-04 15:24:23 +02:00
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slActiveIdle[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slIdleStand[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
case SCHED_IDLE_WALK:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slIdleWalk[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
case SCHED_WAIT_TRIGGER:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slIdleTrigger[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
case SCHED_WAKE_ANGRY:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slWakeAngry[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
case SCHED_ALERT_FACE:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slAlertFace[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
case SCHED_ALERT_STAND:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slAlertStand[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
case SCHED_COMBAT_STAND:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slCombatStand[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
case SCHED_COMBAT_FACE:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slCombatFace[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
case SCHED_CHASE_ENEMY:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slChaseEnemy[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
case SCHED_CHASE_ENEMY_FAILED:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slFail[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
case SCHED_SMALL_FLINCH:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slSmallFlinch[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
case SCHED_ALERT_SMALL_FLINCH:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slAlertSmallFlinch[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
case SCHED_RELOAD:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slReload[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
case SCHED_ARM_WEAPON:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slArmWeapon[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
case SCHED_STANDOFF:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slStandoff[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
case SCHED_RANGE_ATTACK1:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slRangeAttack1[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
case SCHED_RANGE_ATTACK2:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slRangeAttack2[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
case SCHED_MELEE_ATTACK1:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slPrimaryMeleeAttack[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
case SCHED_MELEE_ATTACK2:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slSecondaryMeleeAttack[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
case SCHED_SPECIAL_ATTACK1:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slSpecialAttack1[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
case SCHED_SPECIAL_ATTACK2:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slSpecialAttack2[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
case SCHED_TAKE_COVER_FROM_BEST_SOUND:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slTakeCoverFromBestSound[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
case SCHED_TAKE_COVER_FROM_ENEMY:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slTakeCoverFromEnemy[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
case SCHED_COWER:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slCower[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
case SCHED_AMBUSH:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slAmbush[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
case SCHED_BARNACLE_VICTIM_GRAB:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slBarnacleVictimGrab[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
case SCHED_BARNACLE_VICTIM_CHOMP:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slBarnacleVictimChomp[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
case SCHED_INVESTIGATE_SOUND:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slInvestigateSound[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
case SCHED_DIE:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slDie[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
case SCHED_TAKE_COVER_FROM_ORIGIN:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slTakeCoverFromOrigin[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
case SCHED_VICTORY_DANCE:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slVictoryDance[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
}
|
|
|
|
case SCHED_FAIL:
|
|
|
|
{
|
|
|
|
return slFail;
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
{
|
2016-07-31 15:48:50 +02:00
|
|
|
ALERT( at_console, "GetScheduleOfType()\nNo CASE for Schedule Type %d!\n", Type );
|
2016-06-04 15:24:23 +02:00
|
|
|
|
2016-07-31 15:48:50 +02:00
|
|
|
return &slIdleStand[0];
|
2016-06-04 15:24:23 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|