]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Rename anindecide_init to animdecide_load_if_needed (clearer).
authorRudolf Polzer <divverent@xonotic.org>
Sun, 11 Jan 2015 15:01:18 +0000 (07:01 -0800)
committerRudolf Polzer <divverent@xonotic.org>
Sun, 11 Jan 2015 15:01:18 +0000 (07:01 -0800)
qcsrc/client/csqcmodel_hooks.qc
qcsrc/common/animdecide.qc
qcsrc/common/animdecide.qh
qcsrc/server/cl_player.qc

index f29139e46ebead4cfa10c20f5b8878adb8cdf771..4cb416063509daca3b6ad6b8b920dbf2ce0a7a53 100644 (file)
@@ -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;
index 32ffef248d540ce8b5f9c85101ec8e5ceef0b37b..d2b849f580e4832621dd5c16467dcbeb8cfb39cb 100644 (file)
@@ -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;
index 105dac7c47f2460a8710a54c87032a5b469eb1dd..b9d5260e6e7449e6cdf57b73cab455d65111241f 100644 (file)
@@ -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);
 
index 3ff7f9166ee05cd19d86fe4bbcf37cfc29f04b7c..68239035fe62c42f403c0b9852efa8fdb6b72363 100644 (file)
@@ -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);
 }