34 #include "../idlib/precompiled.h"
126 if ( player !=
NULL && player->
IsType( idPlayer::Type ) ) {
147 if ( !_player->
IsType( idPlayer::Type ) ) {
148 common->
Warning(
"idPlayerStart::Event_TeleportStage: entity is not an idPlayer\n" );
151 player =
static_cast<idPlayer*
>(_player);
192 SetTimeState ts( player->timeGroup );
224 if ( activator->
IsType( idPlayer::Type ) ) {
225 player =
static_cast<idPlayer*
>( activator );
241 msg.
Init( msgBuf,
sizeof( msgBuf ) );
270 savefile->WriteBool( stay_on );
366 if ( !ent->
IsType( idPathCorner::Type ) ) {
388 for( i = 0; i < source->
targets.
Num(); i++ ) {
389 ent = source->
targets[
i ].GetEntity();
390 if ( ent && ( ent != ignore ) && ent->
IsType( idPathCorner::Type ) ) {
403 return path[ which ];
531 }
else if ( forceState ) {
683 if ( ent1->GetPhysics() ) {
684 axis = ent1->GetPhysics()->GetAxis();
685 origin = ent1->GetPhysics()->GetOrigin();
686 start = origin + start * axis;
690 if ( ent2->GetPhysics() ) {
691 axis = ent2->GetPhysics()->GetAxis();
692 origin = ent2->GetPhysics()->GetOrigin();
693 end = origin + p2 * axis;
742 float Kstretch, damping, restLength;
782 BecomeInactive( TH_THINK );
784 BecomeActive( TH_THINK );
826 float explosion, implosion, randomTorque;
913 const idEventDef EV_SetAnimation(
"setAnimation",
"s" );
914 const idEventDef EV_GetAnimationLength(
"getAnimationLength",
NULL,
'f' );
928 EVENT( EV_SetAnimation, idAnimated::Event_SetAnimation )
1027 if ( !animname.
Length() ) {
1048 }
else if (
anim ) {
1076 return af.
Load(
this, fileName );
1121 const char *animname;
1292 const idDict * projectileDef;
1293 const char * projectilename;
1297 if ( !projectileDef ) {
1310 dir = targetPos - launchPos;
1314 if ( !ent || !ent->
IsType( idProjectile::Type ) ) {
1318 projectile->
Create(
this, launchPos, dir );
1321 if ( numshots > 0 ) {
1322 PostEventMS( &EV_LaunchMissilesUpdate,
FRAME2MS( framedelay ), launchjoint, targetjoint, numshots - 1, framedelay );
1332 const idDict * projectileDef;
1337 if ( !projectileDef ) {
1357 ProcessEvent( &EV_LaunchMissilesUpdate, launch, target, numshots - 1, framedelay );
1366 void idAnimated::Event_SetAnimation(
const char *animName ) {
1382 void idAnimated::Event_GetAnimationLength() {
1415 fadeFrom.Set( 1, 1, 1, 1 );
1416 fadeTo.Set( 1, 1, 1, 1 );
1470 if ( solid && !hidden ) {
1480 if ( model.
Find(
".prt" ) >= 0 ) {
1779 const char *splat =
NULL;
1781 for (
int i = 0;
i <
count;
i++ ) {
1783 if ( splat && *splat ) {
1856 if ( *smokeName !=
'\0' ) {
1864 }
else if (
smoke ) {
1932 text = spawnArgs.GetString(
"text" );
1933 playerOriented = spawnArgs.GetBool(
"playerOriented" );
1934 bool force = spawnArgs.GetBool(
"force" );
2076 b =
idBounds( spawnArgs.GetVector(
"origin" ) ).Expand( 16 );
2079 gameLocal.
Warning(
"LocationSeparator '%s' didn't contact a portal", spawnArgs.GetString(
"name" ) );
2105 gameLocal.
Warning(
"idVacuumEntity::Spawn: multiple idVacuumEntity in level" );
2109 idVec3 org = spawnArgs.GetVector(
"origin" );
2137 if ( !spawnArgs.GetString(
"location",
"", realName ) ) {
2138 spawnArgs.Set(
"location",
name );
2290 targetEnt =
targets[
i ].GetEntity();
2291 if ( targetEnt && targetEnt->
IsType( idBeam::Type ) ) {
2292 targetBeam =
static_cast<idBeam *
>( targetEnt );
2297 if ( !targetBeam ) {
2528 nextTriggerTime = 0;
2531 playerOriented =
false;
2604 if (
disabled && activator ==
this ) {
2609 if ( player ==
NULL ) {
2639 if (
wait > 0.0
f ) {
2660 if (
wait <= 0.0
f ) {
2924 if ( activator->
IsType( idPlayer::Type ) ) {
2925 player =
static_cast<idPlayer *
>( activator );
2933 if ( sound && *sound ) {
2982 fl.neverDormant =
false;
3035 for( i = 0; i <
num; i++ ) {
3038 for( i = 0; i <
num; i++ ) {
3085 if ( !activator || !activator->
IsType( idActor::Type ) ) {
3182 if ( time < 0.0
f ) {
3192 if ( ent->
IsType( idMoveable::Type ) ) {
3218 EVENT( EV_Activate, idShockwave::Event_Activate )
3226 idShockwave::idShockwave() {
3236 playerDamaged =
false;
3237 playerDamageSize = 0.0f;
3245 idShockwave::~idShockwave() {
3253 void idShockwave::Save(
idSaveGame *savefile )
const {
3276 savefile->
ReadInt( startTime );
3277 savefile->
ReadInt( duration );
3286 savefile->
ReadBool( playerDamaged );
3287 savefile->
ReadFloat( playerDamageSize );
3296 void idShockwave::Spawn() {
3298 spawnArgs.GetInt(
"duration",
"1000", duration );
3299 spawnArgs.GetFloat(
"startsize",
"8", startSize );
3300 spawnArgs.GetFloat(
"endsize",
"512", endSize );
3301 spawnArgs.GetFloat(
"magnitude",
"100", magnitude );
3303 spawnArgs.GetFloat(
"height",
"0",
height);
3304 spawnArgs.GetFloat(
"player_damage_size",
"20", playerDamageSize);
3306 if ( spawnArgs.GetBool(
"start_on" ) ) {
3307 ProcessEvent( &EV_Activate,
this );
3316 void idShockwave::Think() {
3324 endTime = startTime + duration;
3332 newSize = startSize + u * (endSize - startSize);
3339 int i, listedClipModels;
3342 pos = GetPhysics()->GetOrigin();
3352 end = pos +
idVec3( newSize, newSize, zVal );
3354 end = pos +
idVec3( -newSize, -newSize, -zVal );
3355 bounds.AddPoint( end );
3357 if(g_debugShockwave.GetBool()) {
3363 for ( i = 0; i < listedClipModels; i++ ) {
3364 clip = clipModelList[
i ];
3371 if ( !ent->
IsType( idMoveable::Type ) && !ent->
IsType( idAFEntity_Base::Type ) && !ent->
IsType( idPlayer::Type )) {
3376 idVec3 force = point - pos;
3380 if(ent->
IsType( idPlayer::Type )) {
3385 if ( dist <= newSize && dist > newSize-playerDamageSize ) {
3387 idStr damageDef = spawnArgs.GetString(
"def_player_damage",
"");
3388 if(damageDef.
Length() > 0 && !playerDamaged) {
3390 playerDamaged =
true;
3402 if ( dist <= newSize && dist > currentSize ) {
3406 if ( ent->
IsType( idAFEntity_Base::Type ) ) {
3426 currentSize = newSize;
3440 void idShockwave::Event_Activate(
idEntity *activator ) {
3444 playerDamaged =
false;
3460 EVENT( EV_Activate, idFuncMountedObject::Event_Activate )
3468 idFuncMountedObject::idFuncMountedObject() {
3470 scriptFunction =
NULL;
3471 mountedPlayer =
NULL;
3481 idFuncMountedObject::~idFuncMountedObject() {
3489 void idFuncMountedObject::Spawn(
void ) {
3491 spawnArgs.GetInt(
"harc",
"45", harc );
3492 spawnArgs.GetInt(
"varc",
"30", varc );
3495 idStr funcName = spawnArgs.GetString(
"call",
"" );
3496 if ( funcName.
Length() ) {
3498 if ( scriptFunction ==
NULL ) {
3499 gameLocal.
Warning(
"idFuncMountedObject '%s' at (%s) calls unknown function '%s'\n",
name.c_str(), GetPhysics()->GetOrigin().ToString(0), funcName.
c_str() );
3511 void idFuncMountedObject::Think(
void ) {
3521 void idFuncMountedObject::GetAngleRestrictions(
int &yaw_min,
int &yaw_max,
int &pitch ) {
3525 axis = GetPhysics()->GetAxis();
3528 yaw_min = angs.
yaw - harc;
3531 yaw_max = angs.
yaw + harc;
3542 void idFuncMountedObject::Event_Touch(
idEntity *other,
trace_t *trace ) {
3544 ProcessEvent( &EV_Activate, other );
3552 void idFuncMountedObject::Event_Activate(
idEntity *activator ) {
3553 if ( !isMounted && activator->
IsType( idPlayer::Type ) ) {
3556 mountedPlayer = client;
3574 mountedPlayer->
Bind(
this,
true );
3575 mountedPlayer->mountedObject =
this;
3579 if ( scriptFunction ) {
3580 mountthread =
new idThread( scriptFunction );
3599 idFuncMountedWeapon::idFuncMountedWeapon() {
3601 weaponLastFireTime = 0;
3602 weaponFireDelay = 0;
3606 idFuncMountedWeapon::~idFuncMountedWeapon() {
3610 void idFuncMountedWeapon::Spawn(
void ) {
3614 if ( !projectile ) {
3619 spawnArgs.GetFloat(
"firerate",
"3", firerate );
3620 weaponFireDelay = 1000.f / firerate;
3624 spawnArgs.GetString(
"snd_fire",
"", fireSound );
3630 void idFuncMountedWeapon::Think(
void ) {
3632 if ( isMounted && turret ) {
3633 idVec3 vec = mountedPlayer->viewAngles.ToForward();
3634 idAngles ang = mountedPlayer->GetLocalVector( vec ).ToAngles();
3636 turret->GetPhysics()->SetAxis( ang.
ToMat3() );
3637 turret->UpdateVisuals();
3648 if ( !ent || !ent->
IsType( idProjectile::Type ) ) {
3649 const char *projectileName = spawnArgs.GetString(
"def_projectile" );
3650 gameLocal.
Error(
"'%s' is not an idProjectile", projectileName );
3653 mountedPlayer->GetViewPos( muzzleOrigin, muzzleAxis );
3655 muzzleOrigin += ( muzzleAxis[0] * 128 );
3656 muzzleOrigin -= ( muzzleAxis[2] * 20 );
3658 dir = muzzleAxis[0];
3661 proj->
Create(
this, muzzleOrigin, dir );
3672 idFuncMountedObject::Think();
3675 void idFuncMountedWeapon::Event_PostSpawn(
void ) {
3677 if ( targets.Num() >= 1 ) {
3678 for (
int i=0; i < targets.Num(); i++ ) {
3679 if ( targets[i].GetEntity()->IsType( idStaticEntity::Type ) ) {
3680 turret = targets[
i].GetEntity();
3685 gameLocal.
Warning(
"idFuncMountedWeapon::Spawn: Please target one model for a turret\n" );
3704 EVENT( EV_Activate, idPortalSky::Event_Activate )
3712 idPortalSky::idPortalSky(
void ) {
3721 idPortalSky::~idPortalSky(
void ) {
3730 void idPortalSky::Spawn(
void ) {
3731 if ( !spawnArgs.GetBool(
"triggered" ) ) {
3741 void idPortalSky::Event_PostSpawn() {
3750 void idPortalSky::Event_Activate(
idEntity *activator ) {
virtual const idVec3 & GetOrigin(int id=0) const =0
void Save(idSaveGame *savefile) const
idPlayer * GetLocalPlayer() const
int ClipModelsTouchingBounds(const idBounds &bounds, int contentMask, idClipModel **clipModelList, int maxCount) const
idEntity * GetEntity(void) const
bool TouchTriggers(void) const
renderEntity_t renderEntity
bool TracePoint(trace_t &results, const idVec3 &start, const idVec3 &end, int contentMask, const idEntity *passEntity)
void SetPlayerOnly(bool set)
float GetFloat(const char *key, const char *defaultString="0") const
void Restore(idRestoreGame *savefile)
void Restore(idRestoreGame *savefile)
void Event_Activate(idEntity *activator)
bool GetJointTransform(jointHandle_t jointHandle, int currenttime, idVec3 &offset, idMat3 &axis)
void SetClipModel(idClipModel *clipModel)
void WriteString(const char *string)
bool EmitSmoke(const idDeclParticle *smoke, const int startTime, const float diversity, const idVec3 &origin, const idMat3 &axis, int timeGroup)
void SetCycleCount(int count)
int GetInt(const char *key, const char *defaultString="0") const
bool PostEventSec(const idEventDef *ev, float time)
virtual void InitTool(const toolFlag_t tool, const idDict *dict)=0
void WriteBindToSnapshot(idBitMsgDelta &msg) const
void Restore(idRestoreGame *savefile)
virtual const idSoundShader * FindSound(const char *name, bool makeDefault=true)=0
virtual void StateChanged(int time, bool redraw=false)=0
const idDict * FindEntityDefDict(const char *name, bool makeDefault=true) const
void ReadParticle(const idDeclParticle *&particle)
void Restore(idRestoreGame *savefile)
void Event_Explode(idEntity *activator)
const int SHADERPARM_DIVERSITY
void SetInfluenceLevel(int level)
virtual int GetClipMask(int id=-1) const =0
virtual void SetContents(int contents, int id=-1)=0
const idEventDef EV_PostSpawn("<postspawn>", NULL)
virtual void DebugArrow(const idVec4 &color, const idVec3 &start, const idVec3 &end, int size, const int lifetime=0)=0
const idMat3 & GetAxis(int id=0) const
void Restore(idRestoreGame *savefile)
void Event_LaunchMissilesUpdate(int launchjoint, int targetjoint, int numshots, int framedelay)
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)
void Printf(const char *fmt,...) const id_attribute((format(printf
void Event_Activate(idEntity *activator)
struct idEntity::entityFlags_s fl
void Event_MatchTarget(void)
void SetAngularExtrapolation(extrapolation_t type, int time, int duration, const idAngles &base, const idAngles &speed, const idAngles &baseSpeed)
void Event_TeleportStage(idEntity *player)
void Bind(idEntity *master, bool orientated)
type * GetEntity(void) const
virtual void WriteToSnapshot(idBitMsgDelta &msg) const
void DelayedStart(int delay)
const int MAX_EVENT_PARAM_SIZE
void SetBeamTarget(const idVec3 &origin)
virtual void SetClipBox(const idBounds &bounds, float density)
virtual bool ClientReceiveEvent(int event, int time, const idBitMsg &msg)
void Save(idSaveGame *savefile) const
idSmokeParticles * smokeParticles
const int SHADERPARM_BEAM_END_Z
void RandomTorque(float force)
void Restore(idRestoreGame *savefile)
void SetNum(int newnum, bool resize=true)
void Event_Footstep(void)
const idEventDef EV_Activate("activate","e")
void Uniform(const idVec3 &force)
void Save(idSaveGame *savefile) const
virtual void WriteToSnapshot(idBitMsgDelta &msg) const
GLenum GLenum GLenum GLenum GLenum scale
idMat3 Transpose(void) const
void void void void void Error(const char *fmt,...) const id_attribute((format(printf
const int ANIMCHANNEL_ALL
const idDeclParticle * smoke
idAngles GetAngles(const char *key, const char *defaultString=NULL) const
bool IsType(const idTypeInfo &c) const
void Set(const float x, const float y, const float z)
static idPathCorner * RandomPath(const idEntity *source, const idEntity *ignore)
void WriteVec4(const idVec4 &vec)
idEntity * FindEntity(const char *name) const
idList< idEntityPtr< idEntity > > targets
void SetApplyType(const forceFieldApplyType type)
bool ProcessEvent(const idEventDef *ev)
virtual int GetNumClipModels(void) const =0
void WriteBits(int value, int numBits)
const idEventDef EV_Player_ExitTeleporter("exitTeleporter")
#define AREACONTENTS_OBSTACLE
void SetGranularity(int newgranularity)
void Event_Activate(idEntity *activator)
void RadiusDamage(const idVec3 &origin, idEntity *inflictor, idEntity *attacker, idEntity *ignoreDamage, idEntity *ignorePush, const char *damageDefName, float dmgPower=1.0f)
virtual void ReadFromSnapshot(const idBitMsgDelta &msg)
jointHandle_t GetJointHandle(const char *name) const
void TeleportPlayer(idPlayer *player)
void Event_Activate(idEntity *activator)
void SetMaster(idBeam *masterbeam)
void ReadJoint(jointHandle_t &value)
void Event_Touch(idEntity *other, trace_t *trace)
void ReadBool(bool &value)
idAngles ang_zero(0.0f, 0.0f, 0.0f)
const char * GetLocation(void) const
const int SHADERPARM_BEAM_END_Y
void WriteStaticObject(const idClass &obj)
void Event_RestoreDamagable(void)
virtual void HandleNamedEvent(const char *eventName)=0
const int SHADERPARM_GREEN
void Save(idSaveGame *savefile) const
virtual void WriteToSnapshot(idBitMsgDelta &msg) const
void Event_Activate(idEntity *activator)
virtual void SetLinearVelocity(const idVec3 &newLinearVelocity, int id=0)=0
void Restore(idRestoreGame *savefile)
void SetInfluenceView(const char *mtr, const char *skinname, float radius, idEntity *ent)
void Create(idEntity *owner, const idVec3 &start, const idVec3 &dir)
void Event_Activate(idEntity *activator)
const idEventDef EV_Toggle("Toggle", NULL)
const int SHADERPARM_BEAM_END_X
idCVar ai_debugTrajectory("ai_debugTrajectory","0", CVAR_GAME|CVAR_BOOL,"draws trajectory tests for monsters")
float GetRadius(void) const
void Restore(idRestoreGame *savefile)
void Set(const char *key, const char *value)
int ReadBits(int numBits) const
const int SHADERPARM_BEAM_WIDTH
void Save(idSaveGame *savefile) const
void Restore(idRestoreGame *savefile)
void Restore(idRestoreGame *savefile)
void SetAnimator(idAnimator *a)
void WriteVec3(const idVec3 &vec)
bool HasChanged(void) const
void Event_RandomPath(void)
virtual void SetModel(const char *modelname)
idSoundWorld * gameSoundWorld
idPhysics_Parametric physicsObj
const int SHADERPARM_ALPHA
#define EVENT(event, function)
void SetAxis(const idMat3 &newAxis, int id=-1)
void Explosion(float force)
void Init(byte *data, int length)
bool Load(idEntity *ent, const char *fileName)
idClipModel * combatModel
void Killed(idEntity *inflictor, idEntity *attacker, int damage, const idVec3 &dir, int location)
void ShowEditingDialog(void)
void WriteJoint(const jointHandle_t value)
void WriteBool(const bool value)
idCVar developer("developer","0", CVAR_GAME|CVAR_BOOL,"")
void Event_ResetRadioHud(idEntity *activator)
void Flash(idVec4 color, int time)
void Save(idSaveGame *savefile) const
void SetClipModel(idClipModel *model, float density, int id=0, bool freeOld=true)
bool IsHidden(void) const
virtual void GetColor(idVec3 &out) const
const idEventDef EV_TeleportStage("<TeleportStage>","e")
void void void Warning(const char *fmt,...) const id_attribute((format(printf
GLsizei GLsizei GLcharARB * source
virtual const idBounds & GetBounds(int id=-1) const =0
bool StartSoundShader(const idSoundShader *shader, const s_channelType channel, int soundShaderFlags, bool broadcast, int *length)
const int SHADERPARM_BLUE
void SetPortalState(qhandle_t portal, int blockingBits)
void Save(idSaveGame *savefile) const
class idPlayerView playerView
virtual void AddForce(const int id, const idVec3 &point, const idVec3 &force)=0
void Save(idSaveGame *savefile) const
idVec3 GetEyePosition(void) const
void SetSelf(idEntity *e)
void WriteColorToSnapshot(idBitMsgDelta &msg) const
GLuint GLuint GLsizei count
void Event_AnimDone(int animIndex)
virtual float CurrentShakeAmplitudeForPosition(const int time, const idVec3 &listenerPosition)=0
void Event_Activate(idEntity *activator)
const idEventDef EV_FootstepLeft("leftFoot")
virtual void ReadFromSnapshot(const idBitMsgDelta &msg)=0
idCVar g_debugCinematic("g_debugCinematic","0", CVAR_GAME|CVAR_BOOL,"")
int PlayLength(void) const
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 int SHADERPARM_MODE
const char * GetString(const char *key, const char *defaultString="") const
bool SpawnEntityDef(const idDict &args, idEntity **ent=NULL, bool setDefaults=true)
void ReadFloat(float &value)
void Event_Activate(idEntity *activator)
bool StartSound(const char *soundName, const s_channelType channel, int soundShaderFlags, bool broadcast, int *length)
idVec3 vec3_origin(0.0f, 0.0f, 0.0f)
void SetOrigin(const idVec3 &newOrigin, int id=-1)
void SetPhysics(idPhysics *phys)
virtual void Damage(idEntity *inflictor, idEntity *attacker, const idVec3 &dir, const char *damageDefName, const float damageScale, const int location)
idEntityPtr< idBeam > master
void WriteFloat(const float value)
virtual float GetMass(int id=-1) const =0
bool GetBool(const char *key, const char *defaultString="0") const
idVec3 firstPersonViewOrigin
idEntityPtr< idActor > target
idAnimBlend * CurrentAnim(int channelNum)
virtual const idDecl * FindType(declType_t type, const char *name, bool makeDefault=true)=0
void Restore(idRestoreGame *savefile)
idVec3 GetVector(const char *key, const char *defaultString=NULL) const
void Restore(idRestoreGame *savefile)
virtual void Evaluate(int time)
void ServerSendEvent(int eventId, const idBitMsg *msg, bool saveEvent, int excludeClient) const
void Event_Activate(idEntity *activator)
void RadiusPush(const idVec3 &origin, const float radius, const float push, const idEntity *inflictor, const idEntity *ignore, float inflictorScale, const bool quake)
void Event_Activate(idEntity *activator)
virtual void FadeSoundClasses(const int soundClass, const float to, const float over)=0
void CancelEvents(const idEventDef *ev)
virtual void Teleport(const idVec3 &origin, const idAngles &angles, idEntity *destination)
const idAnim * GetAnim(int index) const
void Save(idSaveGame *savefile) const
void CycleAnim(int channelNum, int animnum, int currenttime, int blendtime)
void Save(idSaveGame *savefile) const
static void ReturnFloat(float value)
void ReadVec4(idVec4 &vec)
void Restore(idRestoreGame *savefile)
const idEventDef AI_RandomPath
void Event_BecomeBroken(idEntity *activator)
idEntityPtr< idEntity > activator
void ReadGUIFromSnapshot(const idBitMsgDelta &msg)
virtual const idMat3 & GetAxis(int id=0) const =0
virtual idAnimator * GetAnimator(void)
void Event_FindTargets(void)
float NormalizeFast(void)
void Event_Activate(idEntity *activator)
virtual void DrawText(const char *text, const idVec3 &origin, float scale, const idVec4 &color, const idMat3 &viewAxis, const int align=1, const int lifetime=0, bool depthTest=false)=0
int Find(const char c, int start=0, int end=-1) const
idBounds Rotate(const idMat3 &rotation) const
idLinkList< idEntity > spawnNode
void Save(idSaveGame *savefile) const
void Restore(idRestoreGame *savefile)
const idEventDef EV_Animated_Start("<start>")
const int SHADERPARM_TIMEOFFSET
void Restore(idRestoreGame *savefile)
void Restore(idRestoreGame *savefile)
const idEventDef EV_Footstep("footstep")
const idKeyValue * FindKey(const char *key) const
const char * Name(void) const
void SetMonsterOnly(bool set)
idLinkList< idEntity > spawnedEntities
void Implosion(float force)
void Event_StartRagdoll(void)
const idEventDef EV_LaunchMissilesUpdate("<launchMissiles>","dddd")
const idEventDef EV_RestoreDamagable("<RestoreDamagable>")
virtual void DisableClip(void)=0
virtual idClipModel * GetClipModel(int id=0) const =0
GLenum GLsizei GLsizei height
void Restore(idRestoreGame *savefile)
const char * ToString(int precision=2) const
void WriteInt(const int value)
virtual void Present(void)
idDeclManager * declManager
void RemoveNullTargets(void)
idEntity * entities[MAX_GENTITIES]
bool IsLoaded(void) const
virtual bool ClientReceiveEvent(int event, int time, const idBitMsg &msg)
virtual qhandle_t FindPortal(const idBounds &b) const =0
idEntity * GetTraceEntity(const trace_t &trace) const
int AnimLength(int animnum) const
void ReadStaticObject(idClass &obj)
void Save(idSaveGame *savefile) const
void Event_Activate(idEntity *activator)
void BecomeBroken(idEntity *activator)
idRenderModelManager * renderModelManager
void Restore(idRestoreGame *savefile)
void StartFromCurrentPose(int inheritVelocityTime)
void SetAASAreaState(const idBounds &bounds, const int areaContents, bool closed)
void Event_Activate(idEntity *activator)
void SetClipMask(int mask, int id=-1)
void Event_LinkSpring(void)
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 Restore(idRestoreGame *savefile)
static void DrawDebugInfo(void)
virtual void WriteToSnapshot(idBitMsgDelta &msg) const =0
void ProjectDecal(const idVec3 &origin, const idVec3 &dir, float depth, bool parallel, float size, const char *material, float angle=0)
void Lerp(const idVec4 &v1, const idVec4 &v2, const float l)
const idEventDef EV_FootstepRight("rightFoot")
const idEventDef EV_Splat("<Splat>")
void Save(idSaveGame *savefile) const
void Save(idSaveGame *savefile) const
idMat3 ToMat3(void) const
bool IntersectsBounds(const idBounds &a) const
virtual const idBounds & GetAbsBounds(int id=-1) const =0
void Event_TeleportPlayer(idEntity *activator)
virtual void SetColor(float red, float green, float blue)
void Event_Activate(idEntity *activator)
const char * RandomPrefix(const char *prefix, idRandom &random) const
static float AngleNormalize180(float angle)
void Save(idSaveGame *savefile) const
#define CLASS_DECLARATION(nameofsuperclass, nameofclass)
virtual void SetAngularVelocity(const idVec3 &newAngularVelocity, int id=0)=0
void Save(idSaveGame *savefile) const
GLsizei const GLcharARB const GLint * length
const char * GetName(void) const
virtual void SetClipModel(idClipModel *model, float density, int id=0, bool freeOld=true)=0
void UpdateAnimation(void)
void Save(idSaveGame *savefile) const
void ReadVec3(idVec3 &vec)
static void ReturnEntity(idEntity *ent)
class idUserInterface * gui[MAX_RENDERENTITY_GUI]
const char * c_str(void) const
void Clear(int channelNum, int currentTime, int cleartime)
void RestorePhysics(idPhysics *phys)
ID_INLINE int FRAME2MS(int framenum)
virtual void ReadFromSnapshot(const idBitMsgDelta &msg)
void BecomeActive(int flags)
idAngles ToAngles(void) const
virtual int GetPortalState(qhandle_t portal)=0
const idEventDef EV_Remove("<immediateremove>", NULL)
function_t * FindFunction(const char *name) const
void SetFrame(int channelNum, int animnum, int frame, int currenttime, int blendtime)
void ReadColorFromSnapshot(const idBitMsgDelta &msg)
virtual void Present(void)
float ReadFloat(void) const
virtual idRenderModel * CheckModel(const char *modelName)=0
void Restore(idRestoreGame *savefile)
virtual void DebugBounds(const idVec4 &color, const idBounds &bounds, const idVec3 &org=vec3_origin, const int lifetime=0)=0
void SetPrivateCameraView(idCamera *camView)
const idEventDef EV_ResetRadioHud("<resetradiohud>","e")
void WriteGUIToSnapshot(idBitMsgDelta &msg) const
idRenderWorld * gameRenderWorld
char * va(const char *fmt,...)
virtual int PointInArea(const idVec3 &point) const =0
virtual bool GetPhysicsToSoundTransform(idVec3 &origin, idMat3 &axis)
void Fade(const idVec4 &to, float fadeTime)
const idEventDef EV_AnimDone("<AnimDone>","d")
void ReadBindFromSnapshot(const idBitMsgDelta &msg)
void WriteBits(int value, int numBits)
const idEventDef EV_LaunchMissiles("launchMissiles","ssssdf")
bool PostEventMS(const idEventDef *ev, int time)
void SetPosition(idPhysics *physics1, int id1, const idVec3 &p1, idPhysics *physics2, int id2, const idVec3 &p2)
void Event_LaunchMissiles(const char *projectilename, const char *sound, const char *launchjoint, const char *targetjoint, int numshots, int framedelay)
virtual bool LoadAF(void)
void Event_Activate(idEntity *activator)
void EnableDamage(bool enable, float duration)
const idEventDef EV_Touch("<touch>","et")
void Event_Activate(idEntity *activator)
idEntityPtr< idBeam > target
bool IsActive(void) const
void WriteParticle(const idDeclParticle *particle)
void Save(idSaveGame *savefile) const
virtual const idVec3 & GetGravity(void) const =0
virtual void virtual void Warning(const char *fmt,...) id_attribute((format(printf
void Set(const float x, const float y, const float z, const float w)
float shaderParms[MAX_ENTITY_SHADER_PARMS]
void ReadString(idStr &string)
void BecomeInactive(int flags)
virtual void ReadFromSnapshot(const idBitMsgDelta &msg)
int ReadBits(int numBits) const
const idEventDef EV_StartRagdoll("startRagdoll")
void ActivateTargets(idEntity *activator) const
void StopSound(const s_channelType channel, bool broadcast)
idList< idVec3 > lastTargetPos
void InitSpring(float Kstretch, float Kcompress, float damping, float restLength)
#define AREACONTENTS_CLUSTERPORTAL
const idEventDef EV_FindTargets("<findTargets>", NULL)
const int SHADERPARM_PARTICLE_STOPTIME