29 #include "../idlib/precompiled.h"
59 savefile->WriteInt( started );
60 savefile->WriteInt( nextTriggerTime );
61 savefile->WriteFX( fxEffect );
62 savefile->WriteString( systemName );
64 savefile->WriteInt( actions.Num() );
66 for ( i = 0; i < actions.Num(); i++ ) {
68 if ( actions[i].lightDefHandle >= 0 ) {
69 savefile->WriteBool(
true );
70 savefile->WriteRenderLight( actions[i].renderLight );
72 savefile->WriteBool(
false );
75 if ( actions[i].modelDefHandle >= 0 ) {
76 savefile->WriteBool(
true );
77 savefile->WriteRenderEntity( actions[i].renderEntity );
79 savefile->WriteBool(
false );
82 savefile->WriteFloat( actions[i].delay );
83 savefile->WriteInt( actions[i].
start );
84 savefile->WriteBool( actions[i].soundStarted );
85 savefile->WriteBool( actions[i].shakeStarted );
86 savefile->WriteBool( actions[i].decalDropped );
87 savefile->WriteBool( actions[i].launched );
109 for ( i = 0; i <
num; i++ ) {
253 laction.
start = time;
357 if ( laction.
start == -1 ) {
364 if ( laction.
delay ) {
374 float pct = (
float)( time - actualStart ) / (1000 * fxaction.
duration );
377 float totalDelay = 0.0f;
382 totalDelay = fxaction.
delay;
384 laction.
delay = totalDelay;
385 laction.
start = time;
399 if ( fxaction.
sibling == -1 ) {
400 useAction = &laction;
406 switch( fxaction.
type ) {
439 ApplyFade( fxaction, *useAction, time, actualStart );
518 ApplyFade( fxaction, *useAction, time, actualStart );
532 if ( !projectileDef ) {
536 if ( ent && ent->
IsType( idProjectile::Type ) ) {
555 shockDefName = fxaction.
data;
556 if ( !shockDefName.
Length() ) {
557 shockDefName =
"func_shockwave";
561 if ( !projectileDef ) {
665 if ( rest == 0.0
f ) {
701 if ( fxActionDelay != 0.0
f ) {
724 args.
Set(
"fx", fx );
737 nfx->
Bind( ent,
true );
762 int fx_index, start_time, max_lapse;
819 angle = spawnArgs.GetFloat(
"angle" );
820 idAngles a( 0, spawnArgs.GetFloat(
"angle" ), 0 );
821 activator->Teleport( GetPhysics()->GetOrigin(),
a,
NULL );
virtual const idVec3 & GetOrigin(int id=0) const =0
renderLight_t renderLight
renderEntity_t renderEntity
float GetFloat(const char *key, const char *defaultString="0") const
int GetInt(const char *key, const char *defaultString="0") const
bool PostEventSec(const idEventDef *ev, float time)
void WriteBindToSnapshot(idBitMsgDelta &msg) const
assert(prefInfo.fullscreenBtn)
virtual const idSoundShader * FindSound(const char *name, bool makeDefault=true)=0
const idDict * FindEntityDefDict(const char *name, bool makeDefault=true) const
virtual void FreeLightDef(qhandle_t lightHandle)=0
const idDeclFX * fxEffect
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)
struct idEntity::entityFlags_s fl
void BindToJoint(idEntity *master, const char *jointname, bool orientated)
void Bind(idEntity *master, bool orientated)
void SetNum(int newnum, bool resize=true)
const idEventDef EV_Activate("activate","e")
idEntity * GetBindMaster(void) const
virtual qhandle_t AddEntityDef(const renderEntity_t *re)=0
void SetAxis(const idMat3 &axis)
void void void void void Error(const char *fmt,...) const id_attribute((format(printf
void AssureSize(int newSize)
bool IsType(const idTypeInfo &c) const
int ClientRemapDecl(declType_t type, int index)
void Setup(const char *fx)
virtual void ReadFromSnapshot(const idBitMsgDelta &msg)
void ReadFX(const idDeclFX *&fx)
const char * GetName(void) const
void ReadBool(bool &value)
const int SHADERPARM_GREEN
void ApplyFade(const idFXSingleAction &fxaction, idFXLocalAction &laction, const int time, const int actualStart)
void Create(idEntity *owner, const idVec3 &start, const idVec3 &dir)
virtual qhandle_t AddLightDef(const renderLight_t *rlight)=0
virtual const idMaterial * FindMaterial(const char *name, bool makeDefault=true)=0
void Set(const char *key, const char *value)
void SetFloat(const char *key, float val)
void ReadRenderEntity(renderEntity_t &renderEntity)
#define EVENT(event, function)
float shaderParms[MAX_ENTITY_SHADER_PARMS]
const int SHADERPARM_TIMESCALE
idEntity * SpawnEntityType(const idTypeInfo &classdef, const idDict *args=NULL, bool bIsClientReadSnapshot=false)
void void void Warning(const char *fmt,...) const id_attribute((format(printf
bool StartSoundShader(const idSoundShader *shader, const s_channelType channel, int soundShaderFlags, bool broadcast, int *length)
const int SHADERPARM_BLUE
class idPlayerView playerView
int ServerRemapDecl(int clientNum, declType_t type, int index)
virtual void FreeEntityDef(qhandle_t entityHandle)=0
virtual void ReadFromSnapshot(const idBitMsgDelta &msg)=0
idPhysics * GetPhysics(void) const
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)
idVec3 vec3_origin(0.0f, 0.0f, 0.0f)
idSoundEmitter * referenceSound
void ReadRenderLight(renderLight_t &renderLight)
bool GetBool(const char *key, const char *defaultString="0") const
void DamageImpulse(idVec3 localKickDir, const idDict *damageDef)
virtual idRenderModel * FindModel(const char *modelName)=0
virtual const idDecl * FindType(declType_t type, const char *name, bool makeDefault=true)=0
void RadiusPush(const idVec3 &origin, const float radius, const float push, const idEntity *inflictor, const idEntity *ignore, float inflictorScale, const bool quake)
virtual const idMat3 & GetAxis(int id=0) const =0
void Event_Trigger(idEntity *activator)
virtual void UpdateEntityDef(qhandle_t entityHandle, const renderEntity_t *re)=0
const char * EffectName(void)
void SetBool(const char *key, bool val)
const int SHADERPARM_TIMEOFFSET
GLubyte GLubyte GLubyte a
virtual void UpdateLightDef(qhandle_t lightHandle, const renderLight_t *rlight)=0
virtual idBounds Bounds(const struct renderEntity_s *ent=NULL) const =0
virtual void Present(void)
const idEventDef EV_Fx_KillFx("_killfx")
idDeclManager * declManager
idPlayer * GetClientByNum(int current) const
idRenderModelManager * renderModelManager
idCVar g_skipFX("g_skipFX","0", CVAR_GAME|CVAR_BOOL,"")
idList< idFXLocalAction > actions
idList< idFXSingleAction > events
virtual const idDecl * DeclByIndex(declType_t type, int index, bool forceParse=true)=0
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)
#define CLASS_DECLARATION(nameofsuperclass, nameofclass)
void CleanUpSingleAction(const idFXSingleAction &fxaction, idFXLocalAction &laction)
const char * c_str(void) const
virtual void ClientPredictionThink(void)
void BecomeActive(int flags)
const idEventDef EV_Remove("<immediateremove>", NULL)
renderEntity_t renderEntity
const idEventDef EV_Fx_Action("_fxAction","e")
virtual void WriteToSnapshot(idBitMsgDelta &msg) const
void Restore(idRestoreGame *savefile)
idRenderWorld * gameRenderWorld
void ReadBindFromSnapshot(const idBitMsgDelta &msg)
static idEntityFx * StartFx(const char *fx, const idVec3 *useOrigin, const idMat3 *useAxis, idEntity *ent, bool bind)
bool PostEventMS(const idEventDef *ev, int time)
void SetOrigin(const idVec3 &org)
idSoundEmitter * referenceSound
const idMaterial * shader
float shaderParms[MAX_ENTITY_SHADER_PARMS]
void ReadString(idStr &string)
void BecomeInactive(int flags)