29 #include "../../idlib/precompiled.h"
32 #include "../Game_local.h"
53 const idEventDef AI_LaunchProjectile(
"launchProjectile",
"s" );
167 const idEventDef AI_MoveToPositionDirect(
"moveToPositionDirect",
"v" );
168 const idEventDef AI_AvoidObstacles(
"avoidObstacles",
"d" );
169 const idEventDef AI_TriggerFX(
"triggerFX",
"ss" );
170 const idEventDef AI_StartEmitter(
"startEmitter",
"sss",
'e' );
171 const idEventDef AI_GetEmitter(
"getEmitter",
"s",
'e' );
172 const idEventDef AI_StopEmitter(
"stopEmitter",
"s" );
193 EVENT( AI_LaunchProjectile, idAI::Event_LaunchProjectile )
310 EVENT( AI_MoveToPositionDirect, idAI::Event_MoveToPositionDirect )
311 EVENT( AI_AvoidObstacles,
idAI::Event_AvoidObstacles )
312 EVENT( AI_TriggerFX,
idAI::Event_TriggerFX )
313 EVENT( AI_StartEmitter,
idAI::Event_StartEmitter )
314 EVENT( AI_GetEmitter,
idAI::Event_GetEmitter )
315 EVENT( AI_StopEmitter,
idAI::Event_StopEmitter )
354 if ( !ent || !ent->
IsType( idActor::Type ) ) {
358 actor =
static_cast<idActor *
>( ent );
363 if (
CanSee( actor, useFOV != 0 ) ) {
396 actor =
static_cast<idActor *
>( ent );
407 if ( ( dist < bestDist ) &&
CanSee( actor, useFOV != 0 ) ) {
438 if ( !ent || !ent->
IsType( idActor::Type ) ) {
442 actor =
static_cast<idActor *
>( ent );
448 targetEnt =
targets[
j ].GetEntity();
449 if ( !targetEnt || !targetEnt->
IsType( idCombatNode::Type ) ) {
473 float bestDistSquared;
480 if ( !team_mate->
IsType( idActor::Type ) ) {
484 actor =
static_cast<idActor *
>( team_mate );
497 if ( distSquared < bestDistSquared ) {
500 if ( ( areaNum != 0 ) &&
PathToGoal( path, areaNum, origin, enemyAreaNum, enemyPos ) ) {
502 bestDistSquared = distSquared;
521 float dist = ( pos - org ).LengthSqr();
539 }
else if ( !ent->
IsType( idActor::Type ) ) {
542 SetEnemy( static_cast<idActor *>( ent ) );
585 if ( !jointname || !jointname[ 0 ] ) {
617 gameLocal.
Warning(
"Entity '%s' not found for 'fireMissileAtTarget'", targetname );
654 if ( ( ( ownerBounds[1][0] - ownerBounds[0][0] ) > ( projBounds[1][0] - projBounds[0][0] ) ) &&
655 ( ( ownerBounds[1][1] - ownerBounds[0][1] ) > ( projBounds[1][1] - projBounds[0][1] ) ) &&
656 ( ( ownerBounds[1][2] - ownerBounds[0][2] ) > ( projBounds[1][2] - projBounds[0][2] ) ) ) {
657 if ( (ownerBounds - projBounds).RayIntersection( org,
viewAxis[ 0 ], distance ) ) {
658 start = org + distance *
viewAxis[ 0 ];
686 void idAI::Event_LaunchProjectile(
const char *entityDefName ) {
706 if ( !ent->
IsType( idProjectile::Type ) ) {
713 proj->
Create(
this, muzzle, axis[0] );
719 if ( (ownerBounds - projBounds).RayIntersection( muzzle,
viewAxis[ 0 ], distance ) ) {
720 start = muzzle + distance *
viewAxis[ 0 ];
768 if ( !jointname || !jointname[ 0 ] ) {
839 if ( hitEnt && hitEnt->
IsType( idActor::Type ) ) {
858 bool returnValue =
true;
865 for ( i = 0; i <
num; i++ ) {
866 cm = clipModels[
i ];
879 if ( spawnClearMoveables && ( hit->
IsType( idMoveable::Type ) || hit->
IsType( idBarrel::Type ) || hit->
IsType( idExplodingBarrel::Type ) ) ) {
885 push.
x = 10.f; push.
y = 10.f; push.
z = 15.f;
1238 bestDist = ( myPos - playerPos ).LengthSqr();
1241 targetEnt =
targets[
i ].GetEntity();
1242 if ( !targetEnt || !targetEnt->
IsType( idCombatNode::Type ) ) {
1249 dist = ( playerPos - org ).LengthSqr();
1250 if ( dist < bestDist ) {
1271 targetEnt =
targets[
i ].GetEntity();
1272 if ( !targetEnt || !targetEnt->
IsType( idCombatNode::Type ) ) {
1279 dist = ( myPos - org ).LengthSqr();
1280 if ( dist < bestDist ) {
1312 if ( !ent || !ent->
IsType( idCombatNode::Type ) ) {
1328 if ( use_current_enemy_location ) {
1369 if ( speed <= 0.0
f ) {
1377 if ( dist > 16.0
f ) {
1382 result =
PredictTrajectory( start, end, speed,
physicsObj.
GetGravity(),
physicsObj.
GetClipModel(),
MASK_MONSTERSOLID, max_height,
this, enemyEnt,
ai_debugMove.
GetBool() ? 4000 : 0, dir );
1412 delta -= gravityDir * ( gravityDir * delta );
1415 yaw = delta.
ToYaw();
1437 bool cansee =
CanSee( ent,
false );
1447 if ( target && !target->
IsType( idActor::Type ) ) {
1599 if ( tr.
fraction >= 1.0f || ( hit == enemyEnt ) ) {
1601 }
else if ( ( tr.
fraction < 1.0f ) && ( hit->
IsType( idAI::Type ) ) &&
1602 ( static_cast<idAI *>( hit )->team !=
team ) ) {
1650 axis = local_dir.
ToMat3();
1660 if ( ( ( ownerBounds[1][0] - ownerBounds[0][0] ) > ( projBounds[1][0] - projBounds[0][0] ) ) &&
1661 ( ( ownerBounds[1][1] - ownerBounds[0][1] ) > ( projBounds[1][1] - projBounds[0][1] ) ) &&
1662 ( ( ownerBounds[1][2] - ownerBounds[0][2] ) > ( projBounds[1][2] - projBounds[0][2] ) ) ) {
1663 if ( (ownerBounds - projBounds).RayIntersection( org,
viewAxis[ 0 ], distance ) ) {
1664 start = org + distance *
viewAxis[ 0 ];
1725 if ( ( ( ownerBounds[1][0] - ownerBounds[0][0] ) > ( projBounds[1][0] - projBounds[0][0] ) ) &&
1726 ( ( ownerBounds[1][1] - ownerBounds[0][1] ) > ( projBounds[1][1] - projBounds[0][1] ) ) &&
1727 ( ( ownerBounds[1][2] - ownerBounds[0][2] ) > ( projBounds[1][2] - projBounds[0][2] ) ) ) {
1728 if ( (ownerBounds - projBounds).RayIntersection( org,
viewAxis[ 0 ], distance ) ) {
1729 start = org + distance *
viewAxis[ 0 ];
1856 yaw = delta.
ToYaw();
1958 if ( shrivel_time <= 0.0
f ) {
2041 for ( i = 0; i <
particles.Num(); i++ ) {
2316 ent =
targets[ 0 ].GetEntity();
2334 if ( ( time >= 0.0
f ) && ( time < bestTime ) ) {
2361 ents[ num++ ] = ent;
2433 if ( ent ==
this ) {
2712 int numListedEntities;
2716 for( i = 0; i < numListedEntities; i++ ) {
2717 ent = entityList[
i ];
2718 if ( ent !=
this && !ent->
IsHidden() && ( ent->
health > 0 ) && ent->
IsType( idActor::Type ) ) {
2783 if ( !toAreaNum || !
PathToGoal( path, areaNum, org, toAreaNum, pos ) ) {
2826 if ( !
PathToGoal( path, areaNum, org, toAreaNum, pos ) ) {
2869 void idAI::Event_MoveToPositionDirect(
const idVec3 &pos ) {
2879 void idAI::Event_AvoidObstacles(
int ignore) {
2888 void idAI::Event_TriggerFX(
const char* joint,
const char* fx ) {
2889 TriggerFX(joint, fx);
2892 void idAI::Event_StartEmitter(
const char*
name,
const char* joint,
const char* particle ) {
2893 idEntity *ent = StartEmitter(name, joint, particle);
2897 void idAI::Event_GetEmitter(
const char*
name ) {
2901 void idAI::Event_StopEmitter(
const char* name ) {
const idEventDef AI_MoveOutOfRange("moveOutOfRange","ef")
static bool BeginMultiFrameEvent(idEntity *ent, const idEventDef *event)
virtual const idVec3 & GetOrigin(int id=0) const =0
bool GetAimDir(const idVec3 &firePos, idEntity *aimAtEnt, const idEntity *ignore, idVec3 &aimDir) const
idPlayer * GetLocalPlayer() const
const idEventDef AI_WaitMove("waitMove")
int ClipModelsTouchingBounds(const idBounds &bounds, int contentMask, idClipModel **clipModelList, int maxCount) const
const idVec3 & GetGravity(void) const
const idEventDef AI_SetFlySpeed("setFlySpeed","f")
idEntity * GetEntity(void) const
renderEntity_t renderEntity
bool TracePoint(trace_t &results, const idVec3 &start, const idVec3 &end, int contentMask, const idEntity *passEntity)
void Event_CreateMissile(const char *jointname)
bool TurnToward(float yaw)
void Event_GetMoveType(void)
void Event_FacingIdeal(void)
float GetFloat(const char *key, const char *defaultString="0") const
const idEventDef AI_EnableClip("enableClip")
void Event_StopThinking(void)
static const float INFINITY
idMat3 ToMat3(void) const
const idEventDef AI_MoveToEnemyHeight("moveToEnemyHeight")
bool GetJointTransform(jointHandle_t jointHandle, int currenttime, idVec3 &offset, idMat3 &axis)
virtual void GetAASLocation(idAAS *aas, idVec3 &pos, int &areaNum) const
const idEventDef AI_RandomPath("randomPath", NULL, 'e')
const idEventDef EV_SetOwner("setOwner","e")
void Event_GetClosestHiddenTarget(const char *type)
const idEventDef AI_AttackMelee("attackMelee","s", 'd')
int GetInt(const char *key, const char *defaultString="0") const
void void static idThread * CurrentThread(void)
assert(prefInfo.fullscreenBtn)
const idEventDef AI_GetJumpVelocity("getJumpVelocity","vff", 'v')
const idDict * FindEntityDefDict(const char *name, bool makeDefault=true) const
void Event_GetHealth(void)
virtual const idVec3 & GetGravityNormal(void) const =0
idLinkList< idEntity > activeEntities
int Cmp(const char *text) const
idClipModel * projectileClipModel
void Event_GetCombatNode(void)
bool MoveToAttackPosition(idEntity *ent, int attack_anim)
idMat3 mat3_identity(idVec3(1, 0, 0), idVec3(0, 1, 0), idVec3(0, 0, 1))
bool EntityInView(idActor *actor, const idVec3 &pos)
const idEventDef AI_FindActorsInBounds("findActorsInBounds","vv", 'e')
idLinkList< idActor > enemyNode
const idEventDef AI_GetEnemyPos("getEnemyPos", NULL, 'v')
idVec3 GetCenter(void) const
const idEventDef AI_FindEnemyInCombatNodes("findEnemyInCombatNodes", NULL, 'e')
bool GetFloorPos(float max_dist, idVec3 &floorpos) const
void Event_SetFlySpeed(float speed)
bool MoveToEntity(idEntity *ent)
void CheckObstacleAvoidance(const idVec3 &goalPos, idVec3 &newPos)
void Event_SlideTo(const idVec3 &pos, float time)
void Event_AllowHiddenMovement(int enable)
virtual void Launch(const idVec3 &start, const idVec3 &dir, const idVec3 &pushVelocity, const float timeSinceFire=0.0f, const float launchPower=1.0f, const float dmgPower=1.0f)
const idEventDef AI_ClosestReachableEnemyOfEntity("closestReachableEnemyOfEntity","E", 'e')
const idEventDef AI_GetEnemy("getEnemy", NULL, 'e')
void Event_Activate(idEntity *activator)
void Event_PushPointIntoAAS(const idVec3 &pos)
idEntityPtr< idActor > talkTarget
struct idEntity::entityFlags_s fl
void BindToJoint(idEntity *master, const char *jointname, bool orientated)
void FreeCurrentPVS(pvsHandle_t handle) const
void Event_AllowDamage(void)
void Bind(idEntity *master, bool orientated)
type * GetEntity(void) const
idEntityPtr< idEntity > focusEntity
const float AI_HEARING_RANGE
static void EndMultiFrameEvent(idEntity *ent, const idEventDef *event)
const idEventDef AI_AllowMovement("allowMovement","f")
const idEventDef AI_SlideTo("slideTo","vf")
bool SetSyncedAnimWeight(int num, float weight)
void Event_MoveToEntity(idEntity *ent)
const idEventDef EV_Activate("activate","e")
const idEventDef AI_MuzzleFlash("muzzleFlash","s")
void Event_DisableAFPush(void)
idEntity * GetBindMaster(void) const
void SetEnemy(idActor *newEnemy)
const idEventDef AI_EnemyRange2D("enemyRange2D", NULL, 'f')
void void void void void Error(const char *fmt,...) const id_attribute((format(printf
void Event_TurnTo(float angle)
bool IsType(const idTypeInfo &c) const
void Event_EnemyPositionValid(void)
const idEventDef AI_StopRagdoll("stopRagdoll")
void Event_ChargeAttack(const char *damageDef)
void CreateProjectileClipModel(void) const
const idEventDef AI_CanReachEnemy("canReachEnemy", NULL, 'd')
idEntityPtr< idActor > enemy
static idPathCorner * RandomPath(const idEntity *source, const idEntity *ignore)
const idMat3 & GetAxis(void) const
idEntity * FindEntity(const char *name) const
idList< idEntityPtr< idEntity > > targets
const idEventDef AI_Wander("wander")
void DirectDamage(const char *meleeDefName, idEntity *ent)
idLinkList< idActor > enemyList
const idEventDef AI_SetMoveType("setMoveType","d")
const idEventDef AI_SetEnemy("setEnemy","E")
void Event_ClearFlyOffset(void)
const idEventDef AI_CanBecomeSolid("canBecomeSolid", NULL, 'f')
void UpdateEnemyPosition(void)
void Event_AttackMissile(const char *jointname)
void SetEnemyPosition(void)
const idEventDef AI_MeleeAttackToJoint("meleeAttackToJoint","ss", 'd')
void RadiusDamage(const idVec3 &origin, idEntity *inflictor, idEntity *attacker, idEntity *ignoreDamage, idEntity *ignorePush, const char *damageDefName, float dmgPower=1.0f)
void Event_TestMeleeAttack(void)
void Event_KickObstacles(idEntity *kickEnt, float force)
jointHandle_t GetJointHandle(const char *name) const
moveCommand_t moveCommand
void Event_EnableClip(void)
void Event_TravelDistanceToPoint(const idVec3 &pos)
void void void void DWarning(const char *fmt,...) const id_attribute((format(printf
const idEventDef AI_NumSmokeEmitters("numSmokeEmitters", NULL, 'd')
void Event_RealKill(void)
void Event_TravelDistanceToEntity(idEntity *ent)
void Event_TestAnimMoveTowardEnemy(const char *animname)
void Event_LaunchMissile(const idVec3 &muzzle, const idAngles &ang)
virtual const idVec3 & GetLinearVelocity(int id=0) const =0
void Event_PredictEnemyPos(float time)
void Activate(idEntity *activator)
const idEventDef AI_TravelDistanceToPoint("travelDistanceToPoint","v", 'f')
void Event_SetEnemy(idEntity *ent)
const idEventDef AI_LookAtEntity("lookAt","Ef")
bool SlideToPosition(const idVec3 &pos, float time)
const idEventDef AI_CanHitEnemyFromJoint("canHitEnemyFromJoint","s", 'd')
const idEventDef AI_SetTurnRate("setTurnRate","f")
void Event_TestAnimMove(const char *animname)
const idEventDef AI_TravelDistanceBetweenEntities("travelDistanceBetweenEntities","ee", 'f')
static bool PredictPath(const idEntity *ent, const idAAS *aas, const idVec3 &start, const idVec3 &velocity, int totalTime, int frameTime, int stopEvent, predictedPath_t &path)
virtual void SetLinearVelocity(const idVec3 &newLinearVelocity, int id=0)=0
void Event_ThrowMoveable(void)
const idEventDef AI_CanReachEntity("canReachEntity","E", 'd')
GLuint GLuint GLsizei GLenum type
static void ReturnVector(idVec3 const &vec)
idVec3 lastVisibleEnemyPos
void Event_CanReachEntity(idEntity *ent)
const idEventDef AI_PredictEnemyPos("predictEnemyPos","f", 'v')
const idEventDef AI_SetHealth("setHealth","f")
void Create(idEntity *owner, const idVec3 &start, const idVec3 &dir)
void Event_SetHealth(float newHealth)
bool IsDisabled(void) const
void Event_EnableGravity(void)
const idEventDef AI_SetJointMod("setBoneMod","d")
idProjectile * CreateProjectile(const idVec3 &pos, const idVec3 &dir)
const idDict * projectileDef
const char * GetClassname(void) const
const idEventDef AI_GetObstacle("getObstacle", NULL, 'e')
const idEventDef AI_ChargeAttack("chargeAttack","s")
void Event_SetTalkTarget(idEntity *target)
idActor * GetAlertEntity(void)
void Event_CanHitEnemyFromAnim(const char *animname)
const idEventDef AI_GetRandomTarget("getRandomTarget","s", 'e')
bool PathToGoal(aasPath_t &path, int areaNum, const idVec3 &origin, int goalAreaNum, const idVec3 &goalOrigin) const
const idVec3 & TotalMovementDelta(int animnum) const
bool MoveToPosition(const idVec3 &pos)
#define MASK_MONSTERSOLID
idVec3 lastReachableEnemyPos
bool EntityCanSeePos(idActor *actor, const idVec3 &actorOrigin, const idVec3 &pos)
const idEventDef AI_BecomeRagdoll("becomeRagdoll", NULL, 'd')
const idEventDef AI_MoveStatus("moveStatus", NULL, 'd')
const idEventDef AI_LookAtEnemy("lookAtEnemy","f")
const idEventDef AI_BeginAttack("attackBegin","s")
const int SHADERPARM_MD5_SKINSCALE
const idVec3 & GetOrigin(int id=0) const
idScriptBool AI_ENEMY_VISIBLE
void Event_MoveToCover(void)
bool EnemyPositionValid(void) const
const idEventDef AI_EnemyRange("enemyRange", NULL, 'f')
const idEventDef AI_EnableAFPush("enableAFPush")
const idVec2 & ToVec2(void) const
#define EVENT(event, function)
void SetContents(int contents, int id=-1)
void Event_EnemyInCombatCone(idEntity *ent, int use_current_enemy_location)
void Event_ClosestReachableEnemyOfEntity(idEntity *team_mate)
void Event_FindEnemy(int useFOV)
int EntitiesTouchingBounds(const idBounds &bounds, int contentMask, idEntity **entityList, int maxCount) const
void Event_GetEnemyPos(void)
const idEventDef AI_TestAnimAttack("testAnimAttack","s", 'd')
const idEventDef AI_ClearBurn("clearBurn")
const idEventDef AI_FindEnemy("findEnemy","d", 'e')
virtual void Killed(idEntity *inflictor, idEntity *attacker, int damage, const idVec3 &dir, int location)
const idEventDef AI_RadiusDamageFromJoint("radiusDamageFromJoint","ss")
bool IsHidden(void) const
void Event_SetFlyOffset(int offset)
void KickObstacles(const idVec3 &dir, float force, idEntity *alwaysKick)
void Event_CanBecomeSolid(void)
void Event_MoveToEnemy(void)
void void void Warning(const char *fmt,...) const id_attribute((format(printf
bool CanSee(idEntity *ent, bool useFOV) const
const idEventDef AI_DirectDamage("directDamage","es")
pvsHandle_t SetupCurrentPVS(const idVec3 &source, const pvsType_t type=PVS_NORMAL) const
GLsizei GLsizei GLcharARB * source
idClipModel * GetClipModel(int id=0) const
void Event_GetEnemy(void)
void Event_EndAttack(void)
virtual bool OnLadder(void) const
const idEventDef AI_TravelDistanceToEntity("travelDistanceToEntity","e", 'f')
void Event_SetMoveType(int moveType)
void Event_BecomeSolid(void)
void Event_TestChargeAttack(void)
void TriggerWeaponEffects(const idVec3 &muzzle)
idVec3 GetEyePosition(void) const
void Event_RestoreMove(void)
const idEventDef AI_StopThinking("stopThinking")
bool MoveToCover(idEntity *entity, const idVec3 &pos)
float TravelDistance(const idVec3 &start, const idVec3 &end) const
void Event_GetJumpVelocity(const idVec3 &pos, float speed, float max_height)
const idEventDef AI_GetTalkTarget("getTalkTarget", NULL, 'e')
void Event_IgnoreDamage(void)
const idEventDef AI_GetEnemyEyePos("getEnemyEyePos", NULL, 'v')
void Event_WakeOnFlashlight(int enable)
int GetAnim(int channel, const char *name)
idPhysics * GetPhysics(void) const
virtual void DebugLine(const idVec4 &color, const idVec3 &start, const idVec3 &end, const int lifetime=0, const bool depthTest=false)=0
const idEventDef AI_GetTurnRate("getTurnRate", NULL, 'f')
const idEventDef AI_TestMoveToPosition("testMoveToPosition","v", 'd')
idProjectile * LaunchProjectile(const char *jointname, idEntity *target, bool clampToAttackCone)
const char * GetString(const char *key, const char *defaultString="") const
bool SpawnEntityDef(const idDict &args, idEntity **ent=NULL, bool setDefaults=true)
bool InCurrentPVS(const pvsHandle_t handle, const idVec3 &target) const
const idEventDef AI_RestoreMove("restoreMove")
void Event_FindActorsInBounds(const idVec3 &mins, const idVec3 &maxs)
const idEventDef AI_EnableGravity("enableGravity")
idVec3 vec3_origin(0.0f, 0.0f, 0.0f)
void Event_EnemyRange(void)
int PointReachableAreaNum(const idVec3 &pos, const float boundsScale=2.0f) const
const idEventDef AI_DisableAFPush("disableAFPush")
void DoneProcessing(void)
void SetPhysics(idPhysics *phys)
idEntityPtr< idEntity > obstacle
void Event_LookAtEntity(idEntity *ent, float duration)
const idEventDef AI_SaveMove("saveMove")
bool TestMelee(void) const
void Event_EnemyRange2D(void)
void Event_MoveStatus(void)
static float Fabs(float f)
const idEventDef AI_JumpFrame("<jumpframe>")
const idEventDef AI_CreateMissile("createMissile","s", 'e')
const idEventDef AI_CanReachPosition("canReachPosition","v", 'd')
void Event_SetTalkState(int state)
const idEventDef AI_EndAttack("attackEnd")
void Event_TestAnimAttack(const char *animname)
const idEventDef AI_RealKill("<kill>")
bool GetBool(const char *key, const char *defaultString="0") const
void Event_TestMoveToPosition(const idVec3 &position)
const idBounds & GetBounds(void) const
idAnimBlend * CurrentAnim(int channelNum)
void Event_BeginAttack(const char *name)
void Event_LocateEnemy(void)
int ReactionTo(const idEntity *ent)
void Event_GetReachableEntityPosition(idEntity *ent)
const idEventDef AI_StopMove("stopMove")
void Event_AnimTurn(float angles)
bool GetMovePos(idVec3 &seekPos)
const int SHADERPARM_TIME_OF_DEATH
idEntity * GetNextTeamEntity(void) const
void Event_WaitAction(const char *waitForState)
void Event_FaceEnemy(void)
void Event_EntityInAttackCone(idEntity *ent)
const idEventDef AI_TestAnimMoveTowardEnemy("testAnimMoveTowardEnemy","s", 'd')
static void ReturnFloat(float value)
const idEntity * blockingEntity
const idEventDef AI_AttackMissile("attackMissile","s", 'e')
void Event_GetEnemyEyePos(void)
const idEventDef AI_TurnToEntity("turnToEntity","E")
void Event_SetAngles(idAngles const &ang)
const idEventDef AI_TurnTo("turnTo","f")
void Event_CanReachEnemy(void)
void Event_DirectDamage(idEntity *damageTarget, const char *damageDefName)
const char * WaitState(void) const
void Event_DisableGravity(void)
void BeginAttack(const char *name)
const idEventDef AI_FaceEnemy("faceEnemy")
void Event_SetJointMod(int allowJointMod)
const idEventDef AI_AllowHiddenMovement("allowHiddenMovement","d")
const idEventDef AI_ThrowAF("throwAF")
float NormalizeFast(void)
bool MoveOutOfRange(idEntity *entity, float range)
void Event_MuzzleFlash(const char *jointname)
idBounds Rotate(const idMat3 &rotation) const
#define MASK_SHOT_RENDERMODEL
bool FaceEntity(idEntity *ent)
const idEventDef AI_ThrowMoveable("throwMoveable")
void Event_SaveMove(void)
float LengthSqr(void) const
const idEventDef AI_FireMissileAtTarget("fireMissileAtTarget","ss", 'e')
bool DirectMoveToPosition(const idVec3 &pos)
const idBounds & GetAbsBounds(int id=-1) const
void Event_HeardSound(int ignore_team)
void Event_NumSmokeEmitters(void)
const idEventDef AI_GetCombatNode("getCombatNode", NULL, 'e')
idBounds Expand(const float d) const
const idEventDef AI_FaceEntity("faceEntity","E")
bool InPlayerPVS(idEntity *ent) const
void Event_Shrivel(float shirvel_time)
const idEventDef AI_EnemyInCombatCone("enemyInCombatCone","Ed", 'd')
void Event_MoveOutOfRange(idEntity *entity, float range)
void Event_MoveToEnemyHeight(void)
const idEventDef AI_CanHitEnemy("canHitEnemy", NULL, 'd')
void Event_MeleeAttackToJoint(const char *jointname, const char *meleeDefName)
void Event_DisableClip(void)
virtual idClipModel * GetClipModel(int id=0) const =0
void Event_CanHitEnemyFromJoint(const char *jointname)
void ProjectVector(const idVec3 &src, idVec3 &dst) const
void Event_TravelDistanceBetweenEntities(idEntity *source, idEntity *dest)
void Event_GetAngles(void)
void Event_GetTalkTarget(void)
const idEventDef AI_Shrivel("shrivel","f")
const idEventDef AI_MoveToEnemy("moveToEnemy")
const idEventDef AI_SetFlyOffset("setFlyOffset","d")
const idEventDef AI_HeardSound("heardSound","d", 'e')
int ClipContents(const idClipModel *model) const
void Event_TurnToPos(const idVec3 &pos)
idEntity * entities[MAX_GENTITIES]
bool IsLoaded(void) const
void Event_Touch(idEntity *other, trace_t *trace)
const idEventDef AI_WakeOnFlashlight("wakeOnFlashlight","d")
void Event_FaceEntity(idEntity *ent)
void Event_EnableAFPush(void)
void Event_GetTurnRate(void)
const idEventDef AI_GetReachableEntityPosition("getReachableEntityPosition","e", 'v')
idEntity * GetTraceEntity(const trace_t &trace) const
void Event_TurnToEntity(idEntity *ent)
const idEventDef AI_KickObstacles("kickObstacles","Ef")
void GetMuzzle(const char *jointname, idVec3 &muzzle, idMat3 &axis)
const idEventDef AI_TriggerParticles("triggerParticles","s")
void SetClipMask(int mask, int id=-1)
idVec3 lastVisibleEnemyEyeOffset
static bool PredictTrajectory(const idVec3 &firePos, const idVec3 &target, float projectileSpeed, const idVec3 &projGravity, const idClipModel *clip, int clipmask, float max_height, const idEntity *ignore, const idEntity *targetEntity, int drawtime, idVec3 &aimDir)
void Event_TriggerParticles(const char *jointName)
const idEventDef AI_MoveToCover("moveToCover")
idPhysics_Monster physicsObj
void Event_JumpFrame(void)
void Event_GetCurrentYaw(void)
void Event_SetTurnRate(float rate)
void SetWaitState(const char *_waitstate)
const idEventDef AI_GetMoveType("getMoveType", NULL, 'd')
void Event_BecomeRagdoll(void)
const idEventDef AI_FacingIdeal("facingIdeal", NULL, 'd')
bool MoveDone(void) const
#define ATTACK_ON_ACTIVATE
idMat3 ToMat3(void) const
void Event_FindEnemyInCombatNodes(void)
const idEventDef AI_TestMeleeAttack("testMeleeAttack", NULL, 'd')
const idEventDef AI_IgnoreDamage("ignoreDamage")
bool IntersectsBounds(const idBounds &a) const
virtual const idBounds & GetAbsBounds(int id=-1) const =0
const idEventDef AI_GetHealth("getHealth", NULL, 'f')
idCVar ai_debugMove("ai_debugMove","0", CVAR_GAME|CVAR_BOOL,"draws movement information for monsters")
void Event_AttackMelee(const char *meleeDefName)
const idEventDef AI_SetSmokeVisibility("setSmokeVisibility","dd")
const idEventDef AI_Burn("burn")
void Event_RandomPath(void)
static float AngleNormalize180(float angle)
bool GetJointWorldTransform(jointHandle_t jointHandle, int currentTime, idVec3 &offset, idMat3 &axis)
const idEventDef AI_TurnToPos("turnToPos","v")
void SpawnParticles(const char *keyName)
#define CLASS_DECLARATION(nameofsuperclass, nameofclass)
void Event_CanSeeEntity(idEntity *ent)
const char * GetName(void) const
void Event_SetSmokeVisibility(int num, int on)
void Event_GetObstacle(void)
static void ReturnEntity(idEntity *ent)
float LengthFast(void) const
const char * c_str(void) const
const idEventDef AI_AnimTurn("animTurn","f")
void Event_FireMissileAtTarget(const char *jointname, const char *targetname)
void Event_ClearEnemy(void)
const idEventDef AI_CanHitEnemyFromAnim("canHitEnemyFromAnim","s", 'd')
bool MoveToEnemyHeight(void)
const idEventDef AI_CanSeeEntity("canSee","E", 'd')
void Event_WaitMove(void)
void BecomeActive(int flags)
void Event_StopMove(void)
void TranslationEntities(trace_t &results, const idVec3 &start, const idVec3 &end, const idClipModel *mdl, const idMat3 &trmAxis, int contentMask, const idEntity *passEntity)
const int ANIMCHANNEL_TORSO
void Event_CanHitEnemy(void)
const int * GetPVSAreas(void)
#define MASK_SHOT_BOUNDINGBOX
void Event_BecomeNonSolid(void)
const idEventDef AI_TravelDistanceBetweenPoints("travelDistanceBetweenPoints","vv", 'f')
idEntityPtr< idProjectile > projectile
const idEventDef AI_EnemyPositionValid("enemyPositionValid", NULL, 'd')
const idEventDef AI_DisableGravity("disableGravity")
const idMat3 & GetGravityAxis(void) const
const idEventDef AI_LocateEnemy("locateEnemy")
const int ANIMCHANNEL_LEGS
bool AttackMelee(const char *meleeDefName)
virtual void PushPointIntoAreaNum(int areaNum, idVec3 &origin) const =0
const idEventDef AI_SetTalkTarget("setTalkTarget","E")
virtual void DebugBounds(const idVec4 &color, const idBounds &bounds, const idVec3 &org=vec3_origin, const int lifetime=0)=0
const idEventDef AI_BecomeSolid("becomeSolid")
idList< idVec3 > missileLaunchOffset
const char * GetEntityDefName(void) const
void Event_GetTurnDelta(void)
idRenderWorld * gameRenderWorld
void Event_LookAtEnemy(float duration)
void Event_AllowMovement(float flag)
void StopMove(moveStatus_t status)
bool Translation(trace_t &results, const idVec3 &start, const idVec3 &end, const idClipModel *mdl, const idMat3 &trmAxis, int contentMask, const idEntity *passEntity)
void Event_CanReachPosition(const idVec3 &pos)
const idEventDef AI_AllowDamage("allowDamage")
bool PostEventMS(const idEventDef *ev, int time)
void Event_GetRandomTarget(const char *type)
const idEventDef AI_GetTurnDelta("getTurnDelta", NULL, 'f')
const idEventDef AI_SetTalkState("setTalkState","d")
const idEventDef AI_DisableClip("disableClip")
const idEventDef AI_Kill("kill")
void Event_MoveToAttackPosition(idEntity *entity, const char *attack_anim)
const idEventDef EV_SetAngles("setAngles","v")
const idEventDef AI_PushPointIntoAAS("pushPointIntoAAS","v", 'v')
const idEventDef EV_Touch("<touch>","et")
idList< particleEmitter_t > particles
void Event_MoveToPosition(const idVec3 &pos)
void Event_StopRagdoll(void)
const idEventDef AI_GetCurrentYaw("getCurrentYaw", NULL, 'f')
const idEventDef AI_LaunchMissile("launchMissile","vv", 'e')
float shaderParms[MAX_ENTITY_SHADER_PARMS]
const idEventDef AI_MoveToPosition("moveToPosition","v")
const idBounds & GetBounds(int id=-1) const
idEntityPtr< idEntity > goalEntity
void BecomeInactive(int flags)
const idEventDef AI_ClearEnemy("clearEnemy")
static void ReturnInt(int value)
const idEventDef AI_TestAnimMove("testAnimMove","s", 'd')
void Event_FindEnemyAI(int useFOV)
const idEventDef AI_GetClosestHiddenTarget("getClosestHiddenTarget","s", 'e')
void TriggerParticles(const char *jointName)
const idEventDef AI_WaitAction("waitAction","s")
idLinkList< idEntity > activeNode
const idEventDef AI_EntityInAttackCone("entityInAttackCone","E", 'd')
const idEventDef AI_TestChargeAttack("testChargeAttack", NULL, 'f')
const idEventDef AI_MoveToAttackPosition("moveToAttackPosition","es")
const idEventDef EV_GetAngles("getAngles", NULL, 'v')
bool IsRenderModel(void) const
const idEventDef AI_FindEnemyAI("findEnemyAI","d", 'e')
const idEventDef AI_ClearFlyOffset("clearFlyOffset")
void Event_ClearBurn(void)
void Event_TravelDistanceBetweenPoints(const idVec3 &source, const idVec3 &dest)
const idEventDef EV_BecomeNonSolid("becomeNonSolid")
void Event_RadiusDamageFromJoint(const char *jointname, const char *damageDefName)
const idEventDef AI_MoveToEntity("moveToEntity","e")
const idEventDef AI_PreBurn("preBurn")