-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include "../../dpdefs/progsdefs.qh"
- #include "../../dpdefs/dpextensions.qh"
- #include "../../warpzonelib/common.qh"
- #include "../../common/constants.qh"
- #include "../../common/util.qh"
- #include "../../common/weapons/weapons.qh"
- #include "tracing.qh"
- #include "../autocvars.qh"
- #include "../defs.qh"
- #include "../antilag.qh"
-#endif
+#include "tracing.qh"
+#include "../_all.qh"
+
+#include "accuracy.qh"
+#include "common.qh"
+#include "hitplot.qh"
+
+#include "../g_damage.qh"
+#include "../g_subs.qh"
+#include "../antilag.qh"
+
+#include "../../common/constants.qh"
+#include "../../common/util.qh"
+
+#include "../../common/weapons/all.qh"
+
+#include "../../warpzonelib/common.qh"
// this function calculates w_shotorg and w_shotdir based on the weapon model
// offset, trueaim and antilag, and won't put w_shotorg inside a wall.
float oldsolid;
vector vecs, dv;
oldsolid = ent.dphitcontentsmask;
- if(ent.weapon == WEP_RIFLE)
+ if(ent.weapon == WEP_RIFLE.m_id)
ent.dphitcontentsmask = DPCONTENTS_BODY | DPCONTENTS_CORPSE;
else
ent.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE;
if (trace_ent == ent.cursor_trace_ent)
w_shotdir = normalize(ent.cursor_trace_ent.origin - w_shotorg);
else
- print("antilag fail\n");
+ LOG_INFO("antilag fail\n");
}
}
}
float mspeed;
vector outvelocity;
- mvelocity = mvelocity * g_weaponspeedfactor;
+ mvelocity = mvelocity * W_WeaponSpeedFactor();
mdirection = normalize(mvelocity);
mspeed = vlen(mvelocity);
#if 0
mspercallsum += gettime(GETTIME_HIRES);
mspercallcount += 1;
- print("avg: ", ftos(mspercallcount / mspercallsum), " per sec\n");
+ LOG_INFO("avg: ", ftos(mspercallcount / mspercallsum), " per sec\n");
#endif
proj.velocity = W_CalculateProjectileVelocity(proj.owner.velocity, pSpeed * dir, forceAbsolute);
// Ballistics Tracing
// ====================
-void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, float mindist, float maxdist, float halflifedist, float forcehalflifedist, float deathtype)
+void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, float mindist, float maxdist, float halflifedist, float forcehalflifedist, int deathtype)
{
vector hitloc, force, endpoint, dir;
entity ent, endent;
//explosion = spawn();
// Find all non-hit players the beam passed close by
- if(deathtype == WEP_VAPORIZER || deathtype == WEP_VORTEX)
+ if(deathtype == WEP_VAPORIZER.m_id || deathtype == WEP_VORTEX.m_id)
{
FOR_EACH_REALCLIENT(msg_entity)
if(msg_entity != self)
if(f <= 0)
continue;
- snd = strcat("weapons/nexwhoosh", ftos(floor(random() * 3) + 1), ".wav");
+ snd = W_Sound(strcat("nexwhoosh", ftos(floor(random() * 3) + 1)));
if(!pseudoprojectile)
pseudoprojectile = spawn(); // we need this so the sound uses the "entchannel4" volume