]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Clean up movetype setting, fixes .move_qcphysics
authorMario <mario@smbclan.net>
Wed, 24 Aug 2016 10:42:03 +0000 (20:42 +1000)
committerMario <mario@smbclan.net>
Wed, 24 Aug 2016 10:42:03 +0000 (20:42 +1000)
qcsrc/common/physics/movetypes/movetypes.qc
qcsrc/server/client.qc
qcsrc/server/g_world.qc

index 8ac17d883b559449230adb05d0168b798a4571f4..729928bf5b14fff939f22547dc35165c076d841f 100644 (file)
@@ -19,9 +19,7 @@ void set_movetype(entity this, int mt)
        if (mt == MOVETYPE_PHYSICS || mt == MOVETYPE_PUSH || mt == MOVETYPE_FAKEPUSH) {
                this.move_qcphysics = false;
        }
-       if (!this.move_qcphysics) {
-               this.movetype = mt;
-       }
+       this.movetype = (this.move_qcphysics) ? MOVETYPE_NONE : mt;
 }
 #elif defined(CSQC)
 void set_movetype(entity this, int mt)
index 7d38c3ea44e2ad45455193926b41e2866e5c2bf9..ed2faee72dd7ed73e1ef21998c2703efc204f209 100644 (file)
@@ -2502,20 +2502,11 @@ void DrownPlayer(entity this)
 
 void Player_Physics(entity this)
 {
-       set_movetype(this, ((this.move_qcphysics) ? MOVETYPE_NONE : this.move_movetype));
+       set_movetype(this, this.move_movetype);
 
        if(!this.move_qcphysics)
                return;
 
-       int mt = this.move_movetype;
-
-       if(mt == MOVETYPE_PUSH || mt == MOVETYPE_FAKEPUSH || mt == MOVETYPE_PHYSICS)
-       {
-               this.move_qcphysics = false;
-               set_movetype(this, mt);
-               return;
-       }
-
        if(!frametime && !this.pm_frametime)
                return;
 
index 5b63aa4e0c99c3e52389d6c6bf9ae1826895aa8f..0f18ad06e85cef6452e3c8eb9bcbc748f7754a36 100644 (file)
@@ -2020,16 +2020,7 @@ void Physics_Frame()
                if(IS_CLIENT(it) || it.classname == "" || it.move_movetype == MOVETYPE_PUSH || it.move_movetype == MOVETYPE_FAKEPUSH || it.move_movetype == MOVETYPE_PHYSICS)
                        continue;
 
-               int mt = it.move_movetype;
-
-               if(mt == MOVETYPE_PUSH || mt == MOVETYPE_FAKEPUSH || mt == MOVETYPE_PHYSICS)
-               {
-                       it.move_qcphysics = false;
-                       set_movetype(it, mt);
-                       continue;
-               }
-
-               set_movetype(it, ((it.move_qcphysics) ? MOVETYPE_NONE : it.move_movetype));
+               set_movetype(it, it.move_movetype);
 
                if(it.move_movetype == MOVETYPE_NONE)
                        continue;