* writes:
* this.origin, this.angles
* this.weaponchild
- * this.movedir, this.view_ofs
+ * this.movedir, this.view_ofs, this.movedir_aligned
* attachment stuff
* anim stuff
* to free:
}
this.view_ofs = '0 0 0';
+ this.movedir_aligned = this.movedir;
if (this.movedir.x >= 0)
{
#endif
vector v = this.movedir;
this.movedir = shotorg_adjust(v, false, false, algn);
+ this.movedir_aligned = shotorg_adjust(v, false, true, algn);
this.view_ofs = shotorg_adjust(v, false, true, algn) - v;
}
int compressed_shotorg = compressShotOrigin(this.movedir);
if(!rlplayer)
rlplayer = csqcplayer; // fall back to the global
- vector md = wepent.movedir;
+ vector md = wepent.movedir_aligned;
vector vecs = ((md.x > 0) ? md : '0 0 0');
vector dv = right * -vecs.y + up * vecs.z;
vector org = rlplayer.origin + rlplayer.view_ofs + dv;
.vector spawnorigin; // for casings
+.vector movedir_aligned; // shot origin based on weapon alignment (unaffected by shootfromeye)
+
// weapon animation vectors:
.vector anim_fire1;
.vector anim_fire2;