From: Mario Date: Tue, 7 Mar 2017 12:56:34 +0000 (+1000) Subject: As a minor speedup, inline the set_movetype function into the main physics loop ... X-Git-Tag: xonotic-v0.8.2~113 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=405a14b7f0d9daa68166eb8616a6f96538164ef9;p=xonotic%2Fxonotic-data.pk3dir.git As a minor speedup, inline the set_movetype function into the main physics loop (this is called on every impure entity, so less function calls the better) Also, fix CI script's reference to an invalid file --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a642354fa..87b1dd36d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,7 +28,6 @@ test_sv_game: - wget -O data/maps/stormkeep.mapinfo https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.mapinfo - wget -O data/maps/stormkeep.waypoints https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints - wget -O data/maps/stormkeep.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints.cache - - wget -O data/maps/stormkeep.waypoints.hardwired https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints.hardwired - make - EXPECT=361b1766b4fc23f28b7f3149050fdbb2 - HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 7502bdb9d..0b3783488 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -2033,7 +2033,9 @@ 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; - set_movetype(it, it.move_movetype); + //set_movetype(it, it.move_movetype); + // inline the set_movetype function, since this is called a lot + it.movetype = (it.move_qcphysics) ? MOVETYPE_NONE : it.move_movetype; if(it.move_movetype == MOVETYPE_NONE) continue;