36 #include "../idlib/precompiled.h"
68 savefile->WriteFloat( angle );
69 savefile->WriteFloat( sweepAngle );
70 savefile->WriteInt( modelAxis );
71 savefile->WriteBool( flipAxis );
72 savefile->WriteFloat( scanDist );
73 savefile->WriteFloat( scanFov );
75 savefile->WriteFloat( sweepStart );
76 savefile->WriteFloat( sweepEnd );
77 savefile->WriteBool( negativeSweep );
78 savefile->WriteBool( sweeping );
79 savefile->WriteInt( alertMode );
80 savefile->WriteFloat( stopSweeping );
81 savefile->WriteFloat( scanFovCos );
83 savefile->WriteVec3( viewOffset );
85 savefile->WriteInt( pvsArea );
86 savefile->WriteStaticObject( physicsObj );
87 savefile->WriteTraceModel( trm );
133 if ( modelAxis < 0 || modelAxis > 2 ) {
160 if ( str.
Length() == 0 ) {
199 up = dir + up * radius;
204 right = dir + right * radius;
211 args.
Set(
"origin", (
GetPhysics()->GetOrigin() + lightOffset ).ToString() );
218 spotLight->
Bind(
this,
true );
229 float radius,
a,
s,
c, halfRadius;
232 idVec3 lastPoint, point, lastHalfPoint, halfPoint, center;
238 halfRadius = radius * 0.5f;
239 lastPoint = dir + up * radius;
242 lastHalfPoint = dir + up * halfRadius;
246 for ( i = 1; i < 12; i++ ) {
249 point = dir + right * s * radius + up * c * radius;
256 halfPoint = dir + right * s * halfRadius + up * c * halfRadius;
261 lastHalfPoint = halfPoint;
525 if ( fx[0] !=
'\0' ) {
550 if ( fx[0] !=
'\0' ) {
virtual const idVec3 & GetOrigin(int id=0) const =0
void Event_ReverseSweep(void)
void SetClipModel(idClipModel *model, float density, int id=0, bool freeOld=true)
renderEntity_t renderEntity
bool TracePoint(trace_t &results, const idVec3 &start, const idVec3 &end, int contentMask, const idEntity *passEntity)
float GetFloat(const char *key, const char *defaultString="0") const
virtual bool TrmFromModel(const char *modelName, idTraceModel &trm)=0
int GetInt(const char *key, const char *defaultString="0") const
bool PostEventSec(const idEventDef *ev, float time)
virtual renderView_t * GetRenderView()
virtual void SetContents(int contents, int id=-1)=0
struct idEntity::entityFlags_s fl
void FreeCurrentPVS(pvsHandle_t handle) const
void Bind(idEntity *master, bool orientated)
virtual qhandle_t AddEntityDef(const renderEntity_t *re)=0
void void void void void Error(const char *fmt,...) const id_attribute((format(printf
float SweepSpeed(void) const
void SetAngles(const idAngles &ang)
void Event_AddLight(void)
void SetAlertMode(int status)
void ReadBool(bool &value)
void ReadTraceModel(idTraceModel &trace)
idPhysics_RigidBody physicsObj
void Set(const char *key, const char *value)
void SetFloat(const char *key, float val)
virtual bool Pain(idEntity *inflictor, idEntity *attacker, int damage, const idVec3 &dir, int location)
static void SinCos(float a, float &s, float &c)
void Restore(idRestoreGame *savefile)
#define EVENT(event, function)
idCVar g_showEntityInfo("g_showEntityInfo","0", CVAR_GAME|CVAR_BOOL,"")
virtual renderView_t * GetRenderView()
bool IsHidden(void) const
idEntity * SpawnEntityType(const idTypeInfo &classdef, const idDict *args=NULL, bool bIsClientReadSnapshot=false)
pvsHandle_t SetupCurrentPVS(const idVec3 &source, const pvsType_t type=PVS_NORMAL) const
void SetSelf(idEntity *e)
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
idAngles ToAngles(void) const
const int SHADERPARM_MODE
const char * GetString(const char *key, const char *defaultString="") const
void ReadFloat(float &value)
bool InCurrentPVS(const pvsHandle_t handle, const idVec3 &target) const
bool StartSound(const char *soundName, const s_channelType channel, int soundShaderFlags, bool broadcast, int *length)
void SetPhysics(idPhysics *phys)
bool GetBool(const char *key, const char *defaultString="0") const
virtual void UpdateChangeableSpawnArgs(const idDict *source)
idVec3 GetVector(const char *key, const char *defaultString=NULL) const
void CancelEvents(const idEventDef *ev)
const idVec3 & GetGravity(void) const
void Event_ContinueSweep(void)
const idEventDef EV_SecurityCam_ReverseSweep("<reverseSweep>")
virtual const idMat3 & GetAxis(int id=0) const =0
virtual void UpdateEntityDef(qhandle_t entityHandle, const renderEntity_t *re)=0
void SetFriction(const float linear, const float angular, const float contact)
virtual void Present(void)
GLubyte GLubyte GLubyte a
void SetAxis(const idMat3 &newAxis, int id=-1)
const char * ToString(int precision=2) const
idEntity * entities[MAX_GENTITIES]
const idEventDef EV_SecurityCam_Alert("<alert>")
static const float TWO_PI
idEntity * GetTraceEntity(const trace_t &trace) const
void SetContents(int contents, int id=-1)
void ReadStaticObject(idClass &obj)
const idEventDef EV_SecurityCam_ContinueSweep("<continueSweep>")
void SetClipMask(int mask, int id=-1)
const idVec3 GetAxis(void) const
const idEventDef EV_SecurityCam_AddLight("<addLight>")
idMat3 ToMat3(void) const
#define CLASS_DECLARATION(nameofsuperclass, nameofclass)
void ReadVec3(idVec3 &vec)
const char * c_str(void) const
void BecomeActive(int flags)
idAngles ToAngles(void) const
const int * GetPVSAreas(void)
const idEventDef EV_SecurityCam_Pause("<pause>")
idVec3 EyeOffset(void) const
void SetGravity(const idVec3 &newGravity)
idRenderWorld * gameRenderWorld
static idEntityFx * StartFx(const char *fx, const idVec3 *useOrigin, const idMat3 *useAxis, idEntity *ent, bool bind)
bool PostEventMS(const idEventDef *ev, int time)
void SetBouncyness(const float b)
float shaderParms[MAX_ENTITY_SHADER_PARMS]
void BecomeInactive(int flags)
virtual void Killed(idEntity *inflictor, idEntity *attacker, int damage, const idVec3 &dir, int location)
void NormalVectors(idVec3 &left, idVec3 &down) const
struct renderView_s * remoteRenderView
idCollisionModelManager * collisionModelManager
void ActivateTargets(idEntity *activator) const
void StopSound(const s_channelType channel, bool broadcast)
virtual void SetClipMask(int mask, int id=-1)=0
int GetPVSArea(const idVec3 &point) const
void SetOrigin(const idVec3 &newOrigin, int id=-1)