bool announcer_1min;
bool announcer_5min;
void Announcer_Countdown()
-{SELFPARAM();
+{
+ SELFPARAM();
float starttime = getstatf(STAT_GAMESTARTTIME);
float roundstarttime = getstatf(STAT_ROUNDSTARTTIME);
if(roundstarttime == -1)
{
Local_Notification(MSG_CENTER, CENTER_COUNTDOWN_ROUNDSTOP);
- remove(self);
+ remove(this);
return;
}
if(roundstarttime >= starttime)
{
Local_Notification(MSG_CENTER, CENTER_COUNTDOWN_BEGIN);
Local_Notification(MSG_MULTI, MULTI_COUNTDOWN_BEGIN);
- remove(self);
+ remove(this);
return;
}
else // countdown is still going
Local_Notification(MSG_ANNCE, Announcer_PickNumber(CNT_GAMESTART, countdown_rounded));
}
- self.nextthink = (starttime - (countdown - 1));
+ this.nextthink = (starttime - (countdown - 1));
}
}
#include "../../common/command/generic.qh"
-void DrawDebugModel()
-{SELFPARAM();
+void DrawDebugModel(entity this)
+{
if(time - floor(time) > 0.5)
{
PolyDrawModel(self);
.entity icon_realmodel;
-void cpicon_draw()
-{SELFPARAM();
- if(time < self.move_time) { return; }
+void cpicon_draw(entity this)
+{
+ if(time < this.move_time) { return; }
- if(self.cp_bob_dmg_z > 0)
- self.cp_bob_dmg_z = self.cp_bob_dmg_z - 3 * frametime;
+ if(this.cp_bob_dmg_z > 0)
+ this.cp_bob_dmg_z = this.cp_bob_dmg_z - 3 * frametime;
else
- self.cp_bob_dmg_z = 0;
- self.cp_bob_origin_z = 4 * PI * (1 - cos(self.cp_bob_spd));
- self.cp_bob_spd = self.cp_bob_spd + 1.875 * frametime;
- self.colormod = '1 1 1' * (2 - bound(0, (self.pain_finished - time) / 10, 1));
+ this.cp_bob_dmg_z = 0;
+ this.cp_bob_origin_z = 4 * PI * (1 - cos(this.cp_bob_spd));
+ this.cp_bob_spd = this.cp_bob_spd + 1.875 * frametime;
+ this.colormod = '1 1 1' * (2 - bound(0, (this.pain_finished - time) / 10, 1));
- if(!self.iscaptured) self.alpha = self.health / self.max_health;
+ if(!this.iscaptured) this.alpha = this.health / this.max_health;
- if(self.iscaptured)
+ if(this.iscaptured)
{
- if (self.punchangle_x > 0)
+ if (this.punchangle_x > 0)
{
- self.punchangle_x = self.punchangle_x - 60 * frametime;
- if (self.punchangle_x < 0)
- self.punchangle_x = 0;
+ this.punchangle_x = this.punchangle_x - 60 * frametime;
+ if (this.punchangle_x < 0)
+ this.punchangle_x = 0;
}
- else if (self.punchangle_x < 0)
+ else if (this.punchangle_x < 0)
{
- self.punchangle_x = self.punchangle_x + 60 * frametime;
- if (self.punchangle_x > 0)
- self.punchangle_x = 0;
+ this.punchangle_x = this.punchangle_x + 60 * frametime;
+ if (this.punchangle_x > 0)
+ this.punchangle_x = 0;
}
- if (self.punchangle_y > 0)
+ if (this.punchangle_y > 0)
{
- self.punchangle_y = self.punchangle_y - 60 * frametime;
- if (self.punchangle_y < 0)
- self.punchangle_y = 0;
+ this.punchangle_y = this.punchangle_y - 60 * frametime;
+ if (this.punchangle_y < 0)
+ this.punchangle_y = 0;
}
- else if (self.punchangle_y < 0)
+ else if (this.punchangle_y < 0)
{
- self.punchangle_y = self.punchangle_y + 60 * frametime;
- if (self.punchangle_y > 0)
- self.punchangle_y = 0;
+ this.punchangle_y = this.punchangle_y + 60 * frametime;
+ if (this.punchangle_y > 0)
+ this.punchangle_y = 0;
}
- if (self.punchangle_z > 0)
+ if (this.punchangle_z > 0)
{
- self.punchangle_z = self.punchangle_z - 60 * frametime;
- if (self.punchangle_z < 0)
- self.punchangle_z = 0;
+ this.punchangle_z = this.punchangle_z - 60 * frametime;
+ if (this.punchangle_z < 0)
+ this.punchangle_z = 0;
}
- else if (self.punchangle_z < 0)
+ else if (this.punchangle_z < 0)
{
- self.punchangle_z = self.punchangle_z + 60 * frametime;
- if (self.punchangle_z > 0)
- self.punchangle_z = 0;
+ this.punchangle_z = this.punchangle_z + 60 * frametime;
+ if (this.punchangle_z > 0)
+ this.punchangle_z = 0;
}
- self.angles_x = self.punchangle_x;
- self.angles_y = self.punchangle_y + self.move_angles_y;
- self.angles_z = self.punchangle_z;
- self.move_angles_y = self.move_angles_y + 45 * frametime;
+ this.angles_x = this.punchangle_x;
+ this.angles_y = this.punchangle_y + this.move_angles_y;
+ this.angles_z = this.punchangle_z;
+ this.move_angles_y = this.move_angles_y + 45 * frametime;
}
- setorigin(self, self.cp_origin + self.cp_bob_origin + self.cp_bob_dmg);
+ setorigin(this, this.cp_origin + this.cp_bob_origin + this.cp_bob_dmg);
}
-void cpicon_damage(float hp)
-{SELFPARAM();
- if(!self.iscaptured) { return; }
+void cpicon_damage(entity this, float hp)
+{
+ if(!this.iscaptured) { return; }
- if(hp < self.max_health * 0.25)
- setmodel(self, MDL_ONS_CP3);
- else if(hp < self.max_health * 0.50)
- setmodel(self, MDL_ONS_CP2);
- else if(hp < self.max_health * 0.75)
- setmodel(self, MDL_ONS_CP1);
- else if(hp <= self.max_health || hp >= self.max_health)
- setmodel(self, MDL_ONS_CP);
+ if(hp < this.max_health * 0.25)
+ setmodel(this, MDL_ONS_CP3);
+ else if(hp < this.max_health * 0.50)
+ setmodel(this, MDL_ONS_CP2);
+ else if(hp < this.max_health * 0.75)
+ setmodel(this, MDL_ONS_CP1);
+ else if(hp <= this.max_health || hp >= this.max_health)
+ setmodel(this, MDL_ONS_CP);
- self.punchangle = (2 * randomvec() - '1 1 1') * 45;
+ this.punchangle = (2 * randomvec() - '1 1 1') * 45;
- self.cp_bob_dmg_z = (2 * random() - 1) * 15;
- self.pain_finished = time + 1;
- self.colormod = '2 2 2';
+ this.cp_bob_dmg_z = (2 * random() - 1) * 15;
+ this.pain_finished = time + 1;
+ this.colormod = '2 2 2';
- setsize(self, CPICON_MIN, CPICON_MAX);
+ setsize(this, CPICON_MIN, CPICON_MAX);
}
-void cpicon_construct()
-{SELFPARAM();
- self.netname = "Control Point Icon";
+void cpicon_construct(entity this)
+{
+ this.netname = "Control Point Icon";
- setmodel(self, MDL_ONS_CP);
- setsize(self, CPICON_MIN, CPICON_MAX);
+ setmodel(this, MDL_ONS_CP);
+ setsize(this, CPICON_MIN, CPICON_MAX);
- if(self.icon_realmodel == world)
+ if(this.icon_realmodel == world)
{
- self.icon_realmodel = spawn();
- setmodel(self.icon_realmodel, MDL_Null);
- setorigin(self.icon_realmodel, self.origin);
- setsize(self.icon_realmodel, CPICON_MIN, CPICON_MAX);
- self.icon_realmodel.movetype = MOVETYPE_NOCLIP;
- self.icon_realmodel.solid = SOLID_NOT;
- self.icon_realmodel.move_origin = self.icon_realmodel.origin;
+ this.icon_realmodel = spawn();
+ setmodel(this.icon_realmodel, MDL_Null);
+ setorigin(this.icon_realmodel, this.origin);
+ setsize(this.icon_realmodel, CPICON_MIN, CPICON_MAX);
+ this.icon_realmodel.movetype = MOVETYPE_NOCLIP;
+ this.icon_realmodel.solid = SOLID_NOT;
+ this.icon_realmodel.move_origin = this.icon_realmodel.origin;
}
- if(self.iscaptured) { self.icon_realmodel.solid = SOLID_BBOX; }
-
- self.move_movetype = MOVETYPE_NOCLIP;
- self.solid = SOLID_NOT;
- self.movetype = MOVETYPE_NOCLIP;
- self.move_origin = self.origin;
- self.move_time = time;
- self.drawmask = MASK_NORMAL;
- self.alpha = 1;
- self.draw = cpicon_draw;
- self.cp_origin = self.origin;
- self.cp_bob_origin = '0 0 0.1';
- self.cp_bob_spd = 0;
+ if(this.iscaptured) { this.icon_realmodel.solid = SOLID_BBOX; }
+
+ this.move_movetype = MOVETYPE_NOCLIP;
+ this.solid = SOLID_NOT;
+ this.movetype = MOVETYPE_NOCLIP;
+ this.move_origin = this.origin;
+ this.move_time = time;
+ this.drawmask = MASK_NORMAL;
+ this.alpha = 1;
+ this.draw = cpicon_draw;
+ this.cp_origin = this.origin;
+ this.cp_bob_origin = '0 0 0.1';
+ this.cp_bob_spd = 0;
}
.vector glowmod;
-void cpicon_changeteam()
-{SELFPARAM();
- if(self.team)
+void cpicon_changeteam(entity this)
+{
+ if(this.team)
{
- self.glowmod = Team_ColorRGB(self.team - 1);
- self.teamradar_color = Team_ColorRGB(self.team - 1);
- self.colormap = 1024 + (self.team - 1) * 17;
+ this.glowmod = Team_ColorRGB(this.team - 1);
+ this.teamradar_color = Team_ColorRGB(this.team - 1);
+ this.colormap = 1024 + (this.team - 1) * 17;
}
else
{
- self.colormap = 1024;
- self.glowmod = '1 1 0';
- self.teamradar_color = '1 1 0';
+ this.colormap = 1024;
+ this.glowmod = '1 1 0';
+ this.teamradar_color = '1 1 0';
}
}
-void ent_cpicon()
-{SELFPARAM();
+void ent_cpicon(entity this)
+{
int sf = ReadByte();
if(sf & CPSF_SETUP)
{
- self.origin_x = ReadCoord();
- self.origin_y = ReadCoord();
- self.origin_z = ReadCoord();
- setorigin(self, self.origin);
-
- self.health = ReadByte();
- self.max_health = ReadByte();
- self.count = ReadByte();
- self.team = ReadByte();
- self.iscaptured = ReadByte();
-
- if(!self.count)
- self.count = (self.health - self.max_health) * frametime;
-
- cpicon_changeteam();
- cpicon_construct();
+ this.origin_x = ReadCoord();
+ this.origin_y = ReadCoord();
+ this.origin_z = ReadCoord();
+ setorigin(this, this.origin);
+
+ this.health = ReadByte();
+ this.max_health = ReadByte();
+ this.count = ReadByte();
+ this.team = ReadByte();
+ this.iscaptured = ReadByte();
+
+ if(!this.count)
+ this.count = (this.health - this.max_health) * frametime;
+
+ cpicon_changeteam(this);
+ cpicon_construct(this);
}
if(sf & CPSF_STATUS)
{
int _tmp = ReadByte();
- if(_tmp != self.team)
+ if(_tmp != this.team)
{
- self.team = _tmp;
- cpicon_changeteam();
+ this.team = _tmp;
+ cpicon_changeteam(this);
}
_tmp = ReadByte();
- if(_tmp != self.health)
- cpicon_damage(_tmp);
+ if(_tmp != this.health)
+ cpicon_damage(this, _tmp);
- self.health = _tmp;
+ this.health = _tmp;
}
}
const int CPSF_STATUS = 4;
const int CPSF_SETUP = 8;
-void ent_cpicon();
+void ent_cpicon(entity this);
#endif
self.effects = 0;
self.modelflags = 0;
if(self.csqcmodel_teleported)
- Projectile_ResetTrail(self.origin);
+ Projectile_ResetTrail(self, self.origin);
}
.int snd_looping;
void CSQCModel_Effects_Apply(void)
self.traileffect = tref;
if(self.drawmask)
- Projectile_DrawTrail(self.origin);
+ Projectile_DrawTrail(self, self.origin);
else
- Projectile_ResetTrail(self.origin);
+ Projectile_ResetTrail(self, self.origin);
if(self.csqcmodel_effects & CSQCMODEL_EF_RESPAWNGHOST)
self.renderflags |= RF_ADDITIVE;
.int count;
.float max_health;
-void ons_generator_ray_draw()
-{SELFPARAM();
+void ons_generator_ray_draw(entity this)
+{
if(time < self.move_time)
return;
e.draw = ons_generator_ray_draw;
}
-void generator_draw()
-{SELFPARAM();
+void generator_draw(entity this)
+{
if(time < self.move_time)
return;
Gib_Delete();
}
-void Gib_Draw()
-{SELFPARAM();
+void Gib_Draw(entity this)
+{
vector oldorg;
oldorg = self.origin;
void Gib_Touch();
-void Gib_Draw();
+void Gib_Draw(entity this);
void TossGib (string mdlname, vector safeorg, vector org, vector vconst, vector vrand, int specnum, bool destroyontouch, bool issilent);
}
class(Hook) .float teleport_time;
-void Draw_GrapplingHook()
-{SELFPARAM();
+void Draw_GrapplingHook(entity this)
+{
vector a, b, atrans;
string tex;
vector rgb;
class(Laser) .float scale; // scaling factor of the thickness
class(Laser) .float modelscale; // scaling factor of the dlight
-void Draw_Laser()
+void Draw_Laser(entity this)
{
if(!self.state)
return;
{
}
+void draw_null(entity this) { }
+
string forcefog;
void ConsoleCommand_macro_init();
void CSQC_Init(void)
}
}
-void Spawn_Draw(void)
-{SELFPARAM();
- pointparticles(self.cnt, self.origin + '0 0 28', '0 0 2', bound(0, frametime, 0.1));
+void Spawn_Draw(entity this)
+{
+ pointparticles(this.cnt, this.origin + '0 0 28', '0 0 2', bound(0, frametime, 0.1));
}
void Ent_ReadSpawnPoint(float is_new) // entity for spawnpoint
case ENT_CLIENT_AUXILIARYXHAIR: Net_AuXair2(bIsNewEntity); break;
case ENT_CLIENT_TURRET: ent_turret(); break;
case ENT_CLIENT_GENERATOR: ent_generator(); break;
- case ENT_CLIENT_CONTROLPOINT_ICON: ent_cpicon(); break;
+ case ENT_CLIENT_CONTROLPOINT_ICON: ent_cpicon(this); break;
case ENT_CLIENT_MODEL: CSQCModel_Read(bIsNewEntity); break;
case ENT_CLIENT_ITEM: ItemRead(bIsNewEntity); break;
case ENT_CLIENT_BUMBLE_RAYGUN: bumble_raygun_read(bIsNewEntity); break;
self.enttype = 0;
self.classname = "";
- self.draw = menu_sub_null;
+ self.draw = draw_null;
self.entremove = menu_sub_null;
// TODO possibly set more stuff to defaults
}
.float ready;
.float eliminated;
-.void(void) draw;
-.void(void) draw2d;
+.void(entity) draw;
+.void(entity) draw2d;
.void(void) entremove;
float drawframetime;
vector view_origin, view_forward, view_right, view_up;
.float scale;
.float alpha;
-void ModelEffect_Draw()
-{SELFPARAM();
+void ModelEffect_Draw(entity this)
+{
self.angles = self.angles + frametime * self.avelocity;
setorigin(self, self.origin + frametime * self.velocity);
self.scale = self.scale1 + (self.scale2 - self.scale1) * (time - self.teleport_time) / (self.lifetime + self.fadetime - self.teleport_time);
class(ModelEffect) .float teleport_time;
class(ModelEffect) .float scale1, scale2;
-void ModelEffect_Draw();
+void ModelEffect_Draw(entity this);
void Ent_ModelEffect(bool isNew);
#endif
class(PointParticles) .float absolute; // 1 = count per second is absolute, 2 = only spawn at toggle
class(PointParticles) .vector movedir; // trace direction
-void Draw_PointParticles();
+void Draw_PointParticles(entity this);
void Ent_PointParticles_Remove();
entity porto;
vector polyline[16];
-void Porto_Draw()
+void Porto_Draw(entity this)
{
vector p, dir, ang, q, nextdir;
float portal_number, portal1_idx;
*/
for(entity e = NULL; (e = nextent(e)); ) if (e.draw) {
- WITH(entity, self, e, e.draw());
+ WITH(entity, self, e, e.draw(e));
}
addentities(MASK_NORMAL | MASK_ENGINE | MASK_ENGINEVIEWMODELS);
// draw 2D entities
for (entity e = NULL; (e = nextent(e)); ) if (e.draw2d) {
- WITH(entity, self, e, e.draw2d());
+ WITH(entity, self, e, e.draw2d(e));
}
Draw_ShowNames_All();
self.drawmask = MASK_NORMAL;
}
-void Ent_Wall_Draw()
-{SELFPARAM();
+void Ent_Wall_Draw(entity this)
+{
float f;
var .vector fld;
.float fade_start, fade_end, fade_vertical_offset;
.float default_solid;
-void Ent_Wall_Draw();
+void Ent_Wall_Draw(entity this);
void Ent_Wall_Remove();
self.move_movetype = MOVETYPE_NONE;
}
-void Projectile_ResetTrail(vector to)
-{SELFPARAM();
- self.trail_oldorigin = to;
- self.trail_oldtime = time;
+void Projectile_ResetTrail(entity this, vector to)
+{
+ this.trail_oldorigin = to;
+ this.trail_oldtime = time;
}
-void Projectile_DrawTrail(vector to)
-{SELFPARAM();
- vector from;
- float t0;
-
- from = self.trail_oldorigin;
- t0 = self.trail_oldtime;
- self.trail_oldorigin = to;
- self.trail_oldtime = time;
+void Projectile_DrawTrail(entity this, vector to)
+{
+ vector from = this.trail_oldorigin;
+ // float t0 = this.trail_oldtime;
+ this.trail_oldorigin = to;
+ this.trail_oldtime = time;
// force the effect even for stationary firemine
- if(self.cnt == PROJECTILE_FIREMINE)
+ if(this.cnt == PROJECTILE_FIREMINE)
if(from == to)
from.z += 1;
- if (self.traileffect)
+ if (this.traileffect)
{
- particles_alphamin = particles_alphamax = particles_fade = sqrt(self.alpha);
- boxparticles(particleeffectnum(Effects[self.traileffect]), self, from, to, self.velocity, self.velocity, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE | PARTICLES_DRAWASTRAIL);
+ particles_alphamin = particles_alphamax = particles_fade = sqrt(this.alpha);
+ boxparticles(particleeffectnum(Effects[this.traileffect]), this, from, to, this.velocity, this.velocity, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE | PARTICLES_DRAWASTRAIL);
}
}
-void Projectile_Draw()
-{SELFPARAM();
+void Projectile_Draw(entity this)
+{
vector rot;
vector trailorigin;
int f;
trailorigin += v_up * 4;
if(drawn)
- Projectile_DrawTrail(trailorigin);
+ Projectile_DrawTrail(self, trailorigin);
else
- Projectile_ResetTrail(trailorigin);
+ Projectile_ResetTrail(self, trailorigin);
self.drawmask = 0;
if(self.count & 0x80)
{
tracebox(self.origin, self.mins, self.maxs, self.origin + self.velocity * 0.05, MOVE_NORMAL, self);
- Projectile_DrawTrail(trace_endpos);
+ Projectile_DrawTrail(self, trace_endpos);
}
}
void SUB_Stop();
-void Projectile_ResetTrail(vector to);
+void Projectile_ResetTrail(entity this, vector to);
-void Projectile_DrawTrail(vector to);
+void Projectile_DrawTrail(entity this, vector to);
-void Projectile_Draw();
+void Projectile_Draw(entity this);
void loopsound(entity e, int ch, string samp, float vol, float attn);
remove(self);
}
-void Casing_Draw()
-{SELFPARAM();
+void Casing_Draw(entity this)
+{
if (self.move_flags & FL_ONGROUND)
{
self.move_angles_x = 0;
ATTRIB(DamageText, m_armordamage, int, 0)
ATTRIB(DamageText, time_prev, float, time)
- void DamageText_draw() {
- SELFPARAM();
+ void DamageText_draw2d(DamageText this) {
float dt = time - this.time_prev;
this.time_prev = time;
setorigin(this, this.origin + dt * this.velocity);
drawcolorcodedstring2(pos, s, this.m_size * '1 1 0', this.m_color, this.alpha, DRAWFLAG_NORMAL);
}
}
- ATTRIB(DamageText, draw2d, void(), DamageText_draw)
+ ATTRIB(DamageText, draw2d, void(DamageText), DamageText_draw2d)
void DamageText_update(DamageText this, vector _origin, int _health, int _armor) {
this.m_damage = _health;
return rgb;
}
-void Draw_WaypointSprite()
-{SELFPARAM();
+void Draw_WaypointSprite(entity this)
+{
if (self.lifetime)
self.alpha = pow(bound(0, (self.fadetime - time) / self.lifetime, 1), waypointsprite_timealphaexponent);
else
void WaypointSprite_Load();
.float alpha;
-void Draw_WaypointSprite();
+void Draw_WaypointSprite(entity this);
#endif
#ifdef SVQC
#ifdef CSQC
.float ltime;
-void healer_draw()
-{SELFPARAM();
+void healer_draw(entity this)
+{
float dt = time - self.move_time;
self.move_time = time;
if(dt <= 0)
#elif defined(CSQC)
+void conveyor_draw(entity this) { WITH(entity, self, this, conveyor_think()); }
+
void conveyor_init()
{SELFPARAM();
- self.draw = conveyor_think;
+ self.draw = conveyor_draw;
self.drawmask = MASK_NORMAL;
self.movetype = MOVETYPE_NONE;
#elif defined(CSQC)
-void door_draw()
+void door_draw(entity this)
{
Movetype_Physics_NoMatchServer();
- trigger_draw_generic();
+ trigger_draw_generic(this);
}
void ent_door()
InitializeEntity(self, plat_delayedinit, INITPRIO_FINDTARGET);
}
#elif defined(CSQC)
-void plat_draw()
+void plat_draw(entity this)
{
Movetype_Physics_NoMatchServer();
//Movetype_Physics_MatchServer(autocvar_cl_projectiles_sloppy);
}
#elif defined(CSQC)
-void Draw_PointParticles()
-{SELFPARAM();
+void Draw_PointParticles(entity this)
+{
float n, i, fail;
vector p;
vector sz;
Net_LinkEntity(self, false, 0, rainsnow_SendEntity);
}
#elif defined(CSQC)
-void Draw_Rain()
-{SELFPARAM();
+void Draw_Rain(entity this)
+{
te_particlerain(self.origin + self.mins, self.origin + self.maxs, self.velocity, floor(self.count * drawframetime + random()), self.glow_color);
}
-void Draw_Snow()
-{SELFPARAM();
+void Draw_Snow(entity this)
+{
te_particlesnow(self.origin + self.mins, self.origin + self.maxs, self.velocity, floor(self.count * drawframetime + random()), self.glow_color);
}
// TODO make a reset function for this one
}
#elif defined(CSQC)
-void train_draw()
+void train_draw(entity this)
{
//Movetype_Physics_NoMatchServer();
Movetype_Physics_MatchServer(autocvar_cl_projectiles_sloppy);
class(Laser) .float scale; // scaling factor of the thickness
class(Laser) .float modelscale; // scaling factor of the dlight
-void Draw_Laser()
-{SELFPARAM();
+void Draw_Laser(entity this)
+{
if(!self.state)
return;
InterpolateOrigin_Do();
}
}
}
-void trigger_draw_generic()
-{SELFPARAM();
+void trigger_draw_generic(entity this)
+{
float dt = time - self.move_time;
self.move_time = time;
if(dt <= 0) { return; }
self.drawmask = MASK_NORMAL;
}
-void turret_draw()
-{SELFPARAM();
+void turret_draw(entity this)
+{
float dt;
dt = time - self.move_time;
}
-void turret_draw2d()
-{SELFPARAM();
+void turret_draw2d(entity this)
+{
if(self.netname == "")
return;
entity turret_gibtoss(string _model, vector _from, vector _to, vector _cmod, float _explode);
void turret_gibboom();
-void turret_gib_draw()
-{SELFPARAM();
+void turret_gib_draw(entity this)
+{
Movetype_Physics_MatchTicrate(autocvar_cl_gibs_ticrate, autocvar_cl_gibs_sloppy);
self.drawmask = MASK_NORMAL;
#endif // SVQC
#ifdef CSQC
-void ewheel_draw()
-{SELFPARAM();
+void ewheel_draw(entity this)
+{
float dt;
dt = time - self.move_time;
#include "../../../client/movelib.qh"
-void walker_draw()
-{SELFPARAM();
+void walker_draw(entity this)
+{
float dt;
dt = time - self.move_time;
_sound(e, ch, s0und, VOL_BASEVOICE, ATTEN_NONE);
}
-void AuxiliaryXhair_Draw2D()
-{SELFPARAM();
+void AuxiliaryXhair_Draw2D(entity this)
+{
if (scoreboard_showscores)
return;
void Net_VehicleSetup();
-void RaptorCBShellfragDraw();
+void RaptorCBShellfragDraw(entity this);
void RaptorCBShellfragToss(vector _org, vector _vel, vector _ang);
#define weapon2mode getstati(STAT_VEHICLESTAT_W2MODE)
#ifdef CSQC
-void bumble_raygun_draw();
+void bumble_raygun_draw(entity this);
void bumble_raygun_read(bool bIsNew)
{SELFPARAM();
}
}
-void bumble_raygun_draw()
-{SELFPARAM();
+void bumble_raygun_draw(entity this)
+{
float _len;
vector _dir;
vector _vtmp1, _vtmp2;
#ifdef CSQC
-void RaptorCBShellfragDraw()
-{SELFPARAM();
+void RaptorCBShellfragDraw(entity this)
+{
if(wasfreed(self))
return;
}
}
-void Draw_ArcBeam(void)
-{SELFPARAM();
+void Draw_ArcBeam(entity this)
+{
float dt = time - self.move_time;
self.move_time = time;
if(dt <= 0) { return; }
const float SW_MAXALPHA = 0.5;
const float SW_FADETIME = 0.4;
const float SW_DISTTOMIN = 200;
-void Draw_Shockwave()
-{SELFPARAM();
+void Draw_Shockwave(entity this)
+{
// fading/removal control
float a = bound(0, (SW_MAXALPHA - ((time - self.sw_time) / SW_FADETIME)), SW_MAXALPHA);
if(a < ALPHA_MIN_VISIBLE) { remove(self); }
#endif
#ifdef CSQC
-void ItemDraw()
-{SELFPARAM();
+void ItemDraw(entity self)
+{
if(self.gravity)
{
Movetype_Physics_MatchServer(autocvar_cl_projectiles_sloppy);
}
}
-void ItemDrawSimple()
-{SELFPARAM();
+void ItemDrawSimple(entity this)
+{
if(self.gravity)
{
Movetype_Physics_MatchServer(autocvar_cl_projectiles_sloppy);
.float spawntime;
.float gravity;
.vector colormod;
-void ItemDraw();
-void ItemDrawSimple();
+void ItemDraw(entity this);
+void ItemDrawSimple(entity this);
void ItemRead(float _IsNew);