From: Mario Date: Wed, 14 Oct 2015 22:58:32 +0000 (+1000) Subject: Little bit more cleanup X-Git-Tag: xonotic-v0.8.2~1817 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=cd87809f33bd8721362526e797bae16bd325faa5;p=xonotic%2Fxonotic-data.pk3dir.git Little bit more cleanup --- diff --git a/qcsrc/server/weapons/weaponsystem.qc b/qcsrc/server/weapons/weaponsystem.qc index 75a18e4f8..5957a75e0 100644 --- a/qcsrc/server/weapons/weaponsystem.qc +++ b/qcsrc/server/weapons/weaponsystem.qc @@ -26,7 +26,7 @@ vector shotorg_adjustfromclient(vector vecs, float y_is_right, float algn) return vecs; } -vector shotorg_adjust_values(vector vecs, float y_is_right, float visual, float algn) +vector shotorg_adjust_values(vector vecs, bool y_is_right, bool visual, int algn) { string s; @@ -53,9 +53,9 @@ vector shotorg_adjust_values(vector vecs, float y_is_right, float visual, float return vecs; } -vector shotorg_adjust(vector vecs, float y_is_right, float visual) -{SELFPARAM(); - return shotorg_adjust_values(vecs, y_is_right, visual, self.owner.cvar_cl_gunalign); +vector shotorg_adjust(vector vecs, bool y_is_right, bool visual, int algn) +{ + return shotorg_adjust_values(vecs, y_is_right, visual, algn); } .int state; @@ -289,8 +289,8 @@ void CL_WeaponEntity_SetModel(string name) { vector v0; v0 = self.movedir; - self.movedir = shotorg_adjust(v0, false, false); - self.view_ofs = shotorg_adjust(v0, false, true) - v0; + self.movedir = shotorg_adjust(v0, false, false, self.owner.cvar_cl_gunalign); + self.view_ofs = shotorg_adjust(v0, false, true, self.owner.cvar_cl_gunalign) - v0; } self.owner.stat_shotorg = compressShotOrigin(self.movedir); self.movedir = decompressShotOrigin(self.owner.stat_shotorg); // make them match perfectly diff --git a/qcsrc/server/weapons/weaponsystem.qh b/qcsrc/server/weapons/weaponsystem.qh index be64958c3..86d311195 100644 --- a/qcsrc/server/weapons/weaponsystem.qh +++ b/qcsrc/server/weapons/weaponsystem.qh @@ -14,9 +14,9 @@ const float WFRAME_FIRE2 = 1; const float WFRAME_IDLE = 2; const float WFRAME_RELOAD = 3; -vector shotorg_adjust(vector vecs, float y_is_right, float visual); +vector shotorg_adjust(vector vecs, bool y_is_right, bool visual, int algn); -vector shotorg_adjust_values(vector vecs, float y_is_right, float visual, float algn); +vector shotorg_adjust_values(vector vecs, bool y_is_right, bool visual, int algn); void CL_SpawnWeaponentity(entity e);