From: Mario Date: Wed, 24 Aug 2016 10:42:03 +0000 (+1000) Subject: Clean up movetype setting, fixes .move_qcphysics X-Git-Tag: xonotic-v0.8.2~673 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4cb667661b5790b30f8340c04c084242dc85ea2f;p=xonotic%2Fxonotic-data.pk3dir.git Clean up movetype setting, fixes .move_qcphysics --- diff --git a/qcsrc/common/physics/movetypes/movetypes.qc b/qcsrc/common/physics/movetypes/movetypes.qc index 8ac17d883..729928bf5 100644 --- a/qcsrc/common/physics/movetypes/movetypes.qc +++ b/qcsrc/common/physics/movetypes/movetypes.qc @@ -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) diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 7d38c3ea4..ed2faee72 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -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; diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 5b63aa4e0..0f18ad06e 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -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;