+#if defined(CSQC)
+ #include "../../dpdefs/csprogsdefs.qc"
+ #include "../Defs.qc"
+ #include "../../common/constants.qh"
+ #include "../../warpzonelib/anglestransform.qh"
+ #include "../../common/util.qh"
+ #include "../../common/nades.qh"
+ #include "../../common/buffs.qh"
+ #include "../autocvars.qh"
+ #include "../../csqcmodellib/interpolate.qh"
+ #include "../movetypes.qh"
+ #include "../main.qh"
+ #include "../../csqcmodellib/cl_model.qh"
+ #include "projectile.qh"
+ #include "../../server/t_items.qh"
+#elif defined(MENUQC)
+#elif defined(SVQC)
+#endif
+
.vector iorigin1, iorigin2;
.float spawntime;
.vector trail_oldorigin;
}
.float alphamod;
-.float count; // set if clientside projectile
-.float cnt; // sound index
+.int count; // set if clientside projectile
+.int cnt; // sound index
.float gravity;
-.float snd_looping;
-.float silent;
+.int snd_looping;
+.bool silent;
void Projectile_ResetTrail(vector to)
{
// force the effect even for stationary firemine
if(self.cnt == PROJECTILE_FIREMINE)
if(from == to)
- from_z += 1;
+ from.z += 1;
if (self.traileffect)
{
}
}
-.float proj_time;
void Projectile_Draw()
{
vector rot;
vector trailorigin;
- float f;
- float drawn;
+ int f;
+ bool drawn;
float t;
float a;
- float dt = time - self.proj_time;
-
- self.proj_time = time;
- if(dt <= 0) { return; }
f = self.move_flags;
vector ang;
ang = self.angles;
- ang_x = -ang_x;
+ ang_x = -ang.x;
makevectors(ang);
a = 1 - (time - self.fade_time) * self.fade_rate;
self.drawmask = MASK_NORMAL;
}
-void loopsound(entity e, float ch, string samp, float vol, float attn)
+void loopsound(entity e, int ch, string samp, float vol, float attn)
{
if(self.silent)
return;
void Ent_Projectile()
{
- float f;
+ int f;
// projectile properties:
// kind (interpolated, or clientside)
self.count = (f & 0x80);
self.iflags = (self.iflags & IFLAG_INTERNALMASK) | IFLAG_AUTOANGLES | IFLAG_ANGLES | IFLAG_ORIGIN;
self.solid = SOLID_TRIGGER;
- self.proj_time = time;
//self.effects = EF_NOMODELFLAGS;
// this should make collisions with bmodels more exact, but it leads to
if(Nade_IDFromProjectile(self.cnt) != 0)
{
+ int nade_type = Nade_IDFromProjectile(self.cnt);
self.mins = '-16 -16 -16';
self.maxs = '16 16 16';
- self.colormod = Nade_Color(Nade_IDFromProjectile(self.cnt));
- self.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP | DPCONTENTS_BOTCLIP;
+ self.colormod = Nade_Color(nade_type);
self.move_movetype = MOVETYPE_BOUNCE;
self.move_touch = func_null;
self.scale = 1.5;
self.avelocity = randomvec() * 720;
-
- if(Nade_IDFromProjectile(self.cnt) == NADE_TYPE_TRANSLOCATE)
- self.solid = SOLID_TRIGGER;
+
+ if(nade_type == NADE_TYPE_TRANSLOCATE || nade_type == NADE_TYPE_SPAWN)
+ self.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_PLAYERCLIP | DPCONTENTS_BOTCLIP;
+ else
+ self.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY;
}
setsize(self, self.mins, self.maxs);