]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make dead check common (don't really need it, as physics are disabled while dead)
authorMario <zacjardine@y7mail.com>
Thu, 11 Dec 2014 01:12:04 +0000 (12:12 +1100)
committerMario <zacjardine@y7mail.com>
Thu, 11 Dec 2014 01:12:04 +0000 (12:12 +1100)
qcsrc/server/mutators/mutator_dodging.qc

index 7e4437b5535bb41954c78044fb3cdc1e74221444..625768f7cced279ce4f231804f0002df08056d6f 100644 (file)
@@ -55,6 +55,8 @@
 #define PHYS_FROZEN(s)                                         getstati(STAT_FROZEN)
 #define IS_ONGROUND(s)                                         (s.pmove_flags & PMF_ONGROUND)
 
+#define PHYS_DEAD(s)                                           s.csqcmodel_isdead
+
 #define PHYS_DODGING_FRAMETIME                         frametime
 #define PHYS_DODGING                                           getstati(STAT_DODGING)
 #define PHYS_DODGING_DELAY                                     getstatf(STAT_DODGING_DELAY)
@@ -79,6 +81,8 @@
 #define PHYS_FROZEN(s)                                         s.frozen
 #define IS_ONGROUND(s)                                         (s.flags & FL_ONGROUND)
 
+#define PHYS_DEAD(s)                                           s.deadflag != DEAD_NO
+
 #define PHYS_DODGING_FRAMETIME                         sys_frametime
 #define PHYS_DODGING                                           g_dodging
 #define PHYS_DODGING_DELAY                                     autocvar_sv_dodging_delay
@@ -350,10 +354,8 @@ void PM_dodging()
        if(PHYS_FROZEN(self))
                horiz_speed = PHYS_DODGING_HORIZ_SPEED_FROZEN;
 
-#ifdef SVQC
-    if (self.deadflag != DEAD_NO)
+    if(PHYS_DEAD(self))
         return;
-#endif
 
        new_velocity_gain = 0;
        clean_up_and_do_nothing = 0;