* this.origin, this.angles
* this.weaponchild
* this.movedir, this.view_ofs, this.movedir_aligned
+ * this.spawnorigin (SVQC only)
* attachment stuff
* anim stuff
* to free:
if (this.weaponchild) delete(this.weaponchild);
this.weaponchild = NULL;
this.movedir = '0 0 0';
+#ifdef SVQC
this.spawnorigin = '0 0 0';
+#endif
this.oldorigin = '0 0 0';
this.anim_fire1 = '0 1 0.01';
this.anim_fire2 = '0 1 0.01';
this.movedir = '0 0 0';
}
}
+#ifdef SVQC
{
int idx = 0;
// v_ model attached to invisible h_ model
this.spawnorigin = this.movedir;
}
}
+#endif
if (v_shot_idx)
{
this.oldorigin = '0 0 0'; // use regular attachment
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;
+ this.view_ofs = this.movedir_aligned - v;
}
int compressed_shotorg = compressShotOrigin(this.movedir);
// make them match perfectly
#endif
this.movedir = decompressShotOrigin(compressed_shotorg);
+#ifdef SVQC
this.spawnorigin += this.view_ofs; // offset the casings origin by the same amount
+#endif
// check if an instant weapon switch occurred
setorigin(this, this.view_ofs);