+#include "util.qh"
+
+#ifdef SVQC
+
/*
* Update this.tur_shotorg by getting up2date bone info
* NOTICE this func overwrites the global v_forward, v_right and v_up vectors.
{
if(!this.tur_head)
{
- LOG_DEBUG("Call to turret_tag_fire_update with this.tur_head missing!\n");
+ LOG_DEBUG("Call to turret_tag_fire_update with this.tur_head missing!");
this.tur_shotorg = '0 0 0';
return false;
}
{
tracebox(start, smin, smax, end, false, this);
- // if it is world we can't hurt it so stop now
- if (trace_ent == world || trace_fraction == 1)
+ // if it is NULL we can't hurt it so stop now
+ if (trace_ent == NULL || trace_fraction == 1)
break;
if (trace_ent.solid == SOLID_BSP)
endpoint = trace_endpos;
// find all the entities the railgun hit and restore their solid state
- ent = findfloat(world, railgunhit, true);
+ ent = findfloat(NULL, railgunhit, true);
while (ent)
{
// restore their solid type
}
// find all the entities the railgun hit and hurt them
- ent = findfloat(world, railgunhit, true);
+ ent = findfloat(NULL, railgunhit, true);
while (ent)
{
// get the details we need to call the damage function
// apply the damage
if (ent.takedamage)
{
- Damage (ent, this, this, f_dmg, deathtype, hitloc, force);
+ Damage (ent, this, this, f_dmg, deathtype, DMG_NOWEP, hitloc, force);
ent.velocity = ent.velocity * f_velfactor;
//ent.alpha = 0.25 + random() * 0.75;
}
}
#ifdef TURRET_DEBUG
-void marker_think(entity this, )
+void marker_think(entity this)
{
if(this.cnt)
if(this.cnt < time)
entity err = new(error_marker);
setmodel(err, MDL_MARKER);
setorigin(err, where);
- err.movetype = MOVETYPE_NONE;
+ set_movetype(err, MOVETYPE_NONE);
setthink(err, marker_think);
err.nextthink = time;
err.skin = 0;
void mark_info(vector where,float lifetime)
{
- entity err = spawn(info_marker);
+ entity err = new(info_marker);
setmodel(err, MDL_MARKER);
setorigin(err, where);
- err.movetype = MOVETYPE_NONE;
+ set_movetype(err, MOVETYPE_NONE);
setthink(err, marker_think);
err.nextthink = time;
err.skin = 1;
entity mark_misc(vector where,float lifetime)
{
- entity err = spawn(mark_misc);
+ entity err = new(mark_misc);
setmodel(err, MDL_MARKER);
setorigin(err, where);
- err.movetype = MOVETYPE_NONE;
+ set_movetype(err, MOVETYPE_NONE);
setthink(err, marker_think);
err.nextthink = time;
err.skin = 3;
//setattachment(e,onwho,"");
setorigin(e, onwho.origin + '0 0 1');
e.alpha = 0.15;
- e.movetype = MOVETYPE_FLY;
+ set_movetype(e, MOVETYPE_FLY);
e.velocity = (v_color * 32); // + '0 0 1' * 64;
setorigin(e, onwho.origin + '0 0 1');
e.alpha = 0.15;
- e.movetype = MOVETYPE_FLY;
+ set_movetype(e, MOVETYPE_FLY);
e.velocity = (v_color * 32); // + '0 0 1' * 64;
e.avelocity_x = -128;
e.scale = (f_size/512);
setsize(e, '0 0 0', '0 0 0');
setorigin(e, where + '0 0 1');
- e.movetype = MOVETYPE_NONE;
+ set_movetype(e, MOVETYPE_NONE);
e.velocity = '0 0 0';
e.colormod = v_color;
SUB_SetFade(e,time,f_time);
}
#endif
+
+#endif