#include "_all.qh"
#include "controlpoint.qh"
-#include "csqcmodel_hooks.qh"
#include "damage.qh"
#include "effects.qh"
#include "generator.qh"
#include "../common/triggers/include.qh"
#include "../common/turrets/cl_turrets.qh"
-#include "../common/turrets/turrets.qh"
#include "../warpzonelib/client.qh"
// needs to be done so early because of the constants they create
static_init();
- CALL_ACCUMULATED_FUNCTION(RegisterTurrets);
CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes);
CALL_ACCUMULATED_FUNCTION(RegisterHUD_Panels);
- initialize_minigames();
-
// precaches
- precache_sound("misc/hit.wav");
- precache_sound("misc/typehit.wav");
- generator_precache();
Projectile_Precache();
- Hook_Precache();
- GibSplash_Precache();
Tuba_Precache();
- CSQCPlayer_Precache();
if(autocvar_cl_reticle)
{
}
if(autocvar_cl_spawn_event_sound)
{
- sound(self, CH_TRIGGER, "misc/spawn.wav", VOL_BASE, ATTEN_NORM);
+ sound(self, CH_TRIGGER, SND_SPAWN, VOL_BASE, ATTEN_NORM);
}
}
}
void Ent_ScoresInfo();
void CSQC_Ent_Update(float bIsNewEntity)
{SELFPARAM();
- float t;
- float savetime;
- t = ReadByte();
+ int t = ReadByte();
if(autocvar_developer_csqcentities)
LOG_INFOF("CSQC_Ent_Update(%d) with self=%i self.entnum=%d self.enttype=%d t=%d\n", bIsNewEntity, self, self.entnum, self.enttype, t);
// set up the "time" global for received entities to be correct for interpolation purposes
- savetime = time;
+ float savetime = time;
if(servertime)
{
time = servertime;
{
if(t != self.enttype || bIsNewEntity)
{
- //print("A CSQC entity changed its type!\n");
LOG_INFOF("A CSQC entity changed its type! (edict: %d, server: %d, type: %d -> %d)\n", num_for_edict(self), self.entnum, self.enttype, t);
Ent_Remove();
clearentity(self);
}
#endif
self.enttype = t;
+ bool done = false;
+ FOREACH(Linked, it.m_id == t, LAMBDA(
+ it.m_read(self, bIsNewEntity);
+ done = true;
+ break;
+ ));
+ if (!done)
switch(t)
{
case ENT_CLIENT_MUTATOR: {
case ENT_CLIENT_SPAWNPOINT: Ent_ReadSpawnPoint(bIsNewEntity); break;
case ENT_CLIENT_SPAWNEVENT: Ent_ReadSpawnEvent(bIsNewEntity); break;
case ENT_CLIENT_NOTIFICATION: Read_Notification(bIsNewEntity); break;
- case ENT_CLIENT_HEALING_ORB: ent_healer(); break;
case ENT_CLIENT_MINIGAME: ent_read_minigame(); break;
case ENT_CLIENT_VIEWLOC: ent_viewloc(); break;
case ENT_CLIENT_VIEWLOC_TRIGGER: ent_viewloc_trigger(); break;
if(self.snd_looping > 0)
{
- sound(self, self.snd_looping, "misc/null.wav", VOL_BASE, autocvar_g_jetpack_attenuation);
+ sound(self, self.snd_looping, SND_Null, VOL_BASE, autocvar_g_jetpack_attenuation);
self.snd_looping = 0;
}