From 405a14b7f0d9daa68166eb8616a6f96538164ef9 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 7 Mar 2017 22:56:34 +1000 Subject: [PATCH] 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 --- .gitlab-ci.yml | 1 - qcsrc/server/g_world.qc | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) 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; -- 2.39.2