From: Mario Date: Sat, 26 Sep 2015 08:56:55 +0000 (+1000) Subject: Minor optimization X-Git-Tag: xonotic-v0.8.2~1906^2~5 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1a448ef73bd68c3934dfa54ca7af3464803d3fac;p=xonotic%2Fxonotic-data.pk3dir.git Minor optimization --- diff --git a/qcsrc/common/minigames/minigame/snake.qc b/qcsrc/common/minigames/minigame/snake.qc index 493e7250c..bfdd642a8 100644 --- a/qcsrc/common/minigames/minigame/snake.qc +++ b/qcsrc/common/minigames/minigame/snake.qc @@ -160,16 +160,15 @@ void snake_move_body(entity minigame, bool ate_mouse) void snake_move_head(entity minigame) { entity head = minigame.snake_head; - - int myx = minigame_tile_letter(head.netname); - int myy = minigame_tile_number(head.netname); - string newpos; if(autocvar_sv_minigames_snake_wrap) newpos = minigame_relative_tile(head.netname, minigame.snake_dir_x, minigame.snake_dir_y, SNAKE_NUM_CNT, SNAKE_LET_CNT); else { + int myx = minigame_tile_letter(head.netname); + int myy = minigame_tile_number(head.netname); + myx += minigame.snake_dir_x; myy += minigame.snake_dir_y;