From: Mario Date: Tue, 24 Jan 2017 14:40:17 +0000 (+1000) Subject: Fix being able to push boulders through walls X-Git-Tag: xonotic-v0.8.2~200^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=21d32b4da1515a870e04d92b2f1a0983d4297a09;p=xonotic%2Fxonotic-data.pk3dir.git Fix being able to push boulders through walls --- diff --git a/qcsrc/common/minigames/minigame/bd.qc b/qcsrc/common/minigames/minigame/bd.qc index d4e1eebe8..904b7772e 100644 --- a/qcsrc/common/minigames/minigame/bd.qc +++ b/qcsrc/common/minigames/minigame/bd.qc @@ -289,11 +289,26 @@ bool bd_move_dozer(entity minigame, entity dozer) ty += dir.y; testpos = minigame_tile_buildname(tx, ty); + if(!bd_valid_tile(testpos)) + return false; entity testhit = bd_find_piece(minigame, testpos, false); - - if(!bd_valid_tile(testpos) || testhit) + if(testhit) return false; + entity controller = bd_find_controller(minigame, minigame_tile_letter(testpos)); + int tnum = minigame_tile_number(testpos); + switch(controller.bd_tiletypes[tnum]) + { + case BD_TILE_BRICK8: + case BD_TILE_BRICK7: + case BD_TILE_BRICK6: + case BD_TILE_BRICK5: + case BD_TILE_BRICK4: + case BD_TILE_BRICK3: + case BD_TILE_BRICK2: + case BD_TILE_BRICK1: return false; + } + if(hit.netname) { strunzone(hit.netname); } hit.netname = strzone(testpos); minigame_server_sendflags(hit,MINIG_SF_UPDATE);