-#include "_all.qh"
#include "anticheat.qh"
#include "g_hook.qh"
#include "../common/vehicles/all.qh"
#include "../common/weapons/all.qh"
-#include "../csqcmodellib/sv_model.qh"
+#include "../lib/csqcmodel/sv_model.qh"
-#include "../warpzonelib/common.qh"
-#include "../warpzonelib/server.qh"
+#include "../lib/warpzone/common.qh"
+#include "../lib/warpzone/server.qh"
.float lastground;
+.int state;
void CreatureFrame (void)
-{
- entity oldself;
+{SELFPARAM();
float dm;
- oldself = self;
- for(self = world; (self = findfloat(self, damagedbycontents, true)); )
+ for(entity e = world; (e = findfloat(e, damagedbycontents, true)); )
{
+ setself(e);
if (self.movetype == MOVETYPE_NOCLIP) { continue; }
float vehic = IS_VEHICLE(self);
if (self.watersound_finished < time)
{
self.watersound_finished = time + 0.5;
- sound (self, CH_PLAYER_SINGLE, "player/lava.wav", VOL_BASE, ATTEN_NORM);
+ sound (self, CH_PLAYER_SINGLE, SND_LAVA, VOL_BASE, ATTEN_NORM);
}
Damage (self, world, world, autocvar_g_balance_contents_playerdamage_lava * autocvar_g_balance_contents_damagerate * self.waterlevel, DEATH_LAVA, self.origin, '0 0 0');
}
if (self.watersound_finished < time)
{
self.watersound_finished = time + 0.5;
- sound (self, CH_PLAYER_SINGLE, "player/slime.wav", VOL_BASE, ATTEN_NORM);
+ sound (self, CH_PLAYER_SINGLE, SND_SLIME, VOL_BASE, ATTEN_NORM);
}
Damage (self, world, world, autocvar_g_balance_contents_playerdamage_slime * autocvar_g_balance_contents_damagerate * self.waterlevel, DEATH_SLIME, self.origin, '0 0 0');
}
self.oldvelocity = self.velocity;
}
- self = oldself;
+ setself(this);
}
float RedirectionThink();
void StartFrame (void)
-{
+{SELFPARAM();
execute_next_frame();
remove = remove_unsafely; // not during spawning!
}
#endif
- entity e;
- for(e = world; (e = findfloat(e, csqcprojectile_clientanimate, 1)); )
+ for(entity e = world; (e = findfloat(e, csqcprojectile_clientanimate, 1)); )
CSQCProjectile_Check(e);
if(RedirectionThink())
bot_serverframe();
- FOR_EACH_PLAYER(self)
- self.porto_forbidden = max(0, self.porto_forbidden - 1);
+ entity e;
+ FOR_EACH_PLAYER(e)
+ e.porto_forbidden = max(0, e.porto_forbidden - 1);
anticheat_startframe();
.string cvarfilter;
float DoesQ3ARemoveThisEntity();
void SV_OnEntityPreSpawnFunction()
-{
+{SELFPARAM();
if (self)
if (self.gametypefilter != "")
if (!isGametypeInFilter(MapInfo_LoadedGametype, teamplay, have_team_spawns, self.gametypefilter))