||
IS_DEAD(own)
||
+ STAT(FROZEN, own)
+ ||
game_stopped
||
!weapon_prepareattack_check(thiswep, own, weaponentity, this.beam_bursting, -1)
}
void Arc_Smoke(Weapon thiswep, entity actor, .entity weaponentity, int fire)
{
- // TODO: spamming this without checking any refires is asking for trouble!
+ // calculate a rough shot origin to show the effect from TODO: move this to the client side!
makevectors(actor.v_angle);
- W_SetupShot_Range(actor,weaponentity,false,0,SND_Null,0,0,0,thiswep.m_id); // TODO: probably doesn't need deathtype, since this is just a prefire effect
+ w_shotdir = v_forward;
+ vector md = actor.(weaponentity).movedir;
+ vector vecs = ((md.x > 0) ? md : '0 0 0');
+ vector dv = v_forward * vecs.x + v_right * -vecs.y + v_up * vecs.z;
+ w_shotorg = actor.origin + actor.view_ofs + dv;
+ //W_SetupShot_Range(actor,weaponentity,false,0,SND_Null,0,0,0,thiswep.m_id);
vector smoke_origin = w_shotorg + actor.velocity*frametime;
if ( actor.arc_overheat > time )
{
if(weapon_prepareattack(thiswep, actor, weaponentity, true, 0))
{
- if(!thiswep.wr_checkammo2(thiswep, actor, weaponentity))
+ if(!thiswep.wr_checkammo2(thiswep, actor, weaponentity))
if(!(actor.items & IT_UNLIMITED_AMMO))
{
W_SwitchWeapon_Force(actor, w_getbestweapon(actor, weaponentity), weaponentity);
// into a weapon system for client code.
// find where we are aiming
- vector myviewangle = ((autocvar_chase_active) ? warpzone_save_view_angles : view_angles);
+ vector myviewangle = view_angles;
+ if (autocvar_chase_active)
+ {
+ if (autocvar_cl_lockview)
+ myviewangle = eX * csqcplayer.v_angle.x + eY * csqcplayer.angles.y;
+ else
+ myviewangle = warpzone_save_view_angles;
+ }
vector forward, right, up;
MAKE_VECTORS(myviewangle, forward, right, up);
entity wepent = viewmodels[this.beam_slot];