From: Mario Date: Thu, 11 Dec 2014 01:12:04 +0000 (+1100) Subject: Make dead check common (don't really need it, as physics are disabled while dead) X-Git-Tag: xonotic-v0.8.1~38^2~85 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=061ec0638ce3f35e60624332b3a3ae0e89c1a3d2;p=xonotic%2Fxonotic-data.pk3dir.git Make dead check common (don't really need it, as physics are disabled while dead) --- diff --git a/qcsrc/server/mutators/mutator_dodging.qc b/qcsrc/server/mutators/mutator_dodging.qc index 7e4437b55..625768f7c 100644 --- a/qcsrc/server/mutators/mutator_dodging.qc +++ b/qcsrc/server/mutators/mutator_dodging.qc @@ -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;