From: Rudolf Polzer Date: Sun, 11 Jan 2015 15:01:18 +0000 (-0800) Subject: Rename anindecide_init to animdecide_load_if_needed (clearer). X-Git-Tag: xonotic-v0.8.0~11 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6e8b08336e386d10055a10b68621286d9ec437c2;p=xonotic%2Fxonotic-data.pk3dir.git Rename anindecide_init to animdecide_load_if_needed (clearer). --- diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index f29139e46..4cb416063 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -649,7 +649,7 @@ void CSQCModel_Hook_PreDraw(float isplayer) if(trace_startsolid || trace_fraction < 1) onground = 1; } - animdecide_init(self); + animdecide_load_if_needed(self); animdecide_setimplicitstate(self, onground); animdecide_setframes(self, doblend, anim_frame, anim_frame1time, anim_frame2, anim_frame2time); float sf = 0; diff --git a/qcsrc/common/animdecide.qc b/qcsrc/common/animdecide.qc index 32ffef248..d2b849f58 100644 --- a/qcsrc/common/animdecide.qc +++ b/qcsrc/common/animdecide.qc @@ -34,7 +34,7 @@ .vector anim_duckwalkbackleft; .float animdecide_modelindex; -void animdecide_init(entity e) +void animdecide_load_if_needed(entity e) { if(e.modelindex == e.animdecide_modelindex) return; diff --git a/qcsrc/common/animdecide.qh b/qcsrc/common/animdecide.qh index 105dac7c4..b9d5260e6 100644 --- a/qcsrc/common/animdecide.qh +++ b/qcsrc/common/animdecide.qh @@ -1,6 +1,7 @@ -// client side frame inferring -void animdecide_init(entity e); +// must be called at least once to initialize, or when modelindex is changed +void animdecide_load_if_needed(entity e); +// client side frame inferring void animdecide_setimplicitstate(entity e, float onground); void animdecide_setframes(entity e, float support_blending, .float fld_frame, .float fld_frame1time, .float fld_frame2, .float fld_frame2time); diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index 3ff7f9166..68239035f 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -91,7 +91,7 @@ void CopyBody(float keepvelocity) self.nextthink = time; self.think = CopyBody_Think; // "bake" the current animation frame for clones (they don't get clientside animation) - animdecide_init(self); + animdecide_load_if_needed(self); animdecide_setframes(self, FALSE, frame, frame1time, frame2, frame2time); self = oldself; @@ -111,7 +111,7 @@ float player_getspecies() void player_setupanimsformodel() { // load animation info - animdecide_init(self); + animdecide_load_if_needed(self); animdecide_setstate(self, 0, FALSE); }