#include "tracing.qh"
-#include "../_all.qh"
#include "accuracy.qh"
#include "common.qh"
#include "hitplot.qh"
+#include "weaponsystem.qh"
#include "../g_damage.qh"
#include "../g_subs.qh"
#include "../../common/weapons/all.qh"
-#include "../../warpzonelib/common.qh"
+#include "../../lib/warpzone/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.
W_HitPlotAnalysis(ent, v_forward, v_right, v_up);
- if(ent.weaponentity.movedir.x > 0)
- vecs = ent.weaponentity.movedir;
+ int slot = 0; // TODO: unhardcode
+ if(ent.weaponentity[slot].movedir.x > 0)
+ vecs = ent.weaponentity[slot].movedir;
else
vecs = '0 0 0';
if (snd != "")
{
- sound (ent, chan, snd, VOL_BASE, ATTN_NORM);
+ _sound (ent, chan, snd, VOL_BASE, ATTN_NORM);
W_PlayStrengthSound(ent);
}
// ====================
void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, float mindist, float maxdist, float halflifedist, float forcehalflifedist, int deathtype)
-{
+{SELFPARAM();
vector hitloc, force, endpoint, dir;
entity ent, endent;
float endq3surfaceflags;
if(f <= 0)
continue;
- snd = W_Sound(strcat("nexwhoosh", ftos(floor(random() * 3) + 1)));
+ snd = SND(NEXWHOOSH_RANDOM());
if(!pseudoprojectile)
pseudoprojectile = spawn(); // we need this so the sound uses the "entchannel4" volume
}
void fireBullet(vector start, vector dir, float spread, float max_solid_penetration, float damage, float force, float dtype, int tracereffects)
-{
+{SELFPARAM();
vector end;
dir = normalize(dir + randomvec() * spread);