From: Mario Date: Sun, 22 Nov 2015 21:21:20 +0000 (+1000) Subject: Update bulldozer to use new assets by KingPimpCommander, also add a comment to make... X-Git-Tag: xonotic-v0.8.2~1641 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=bf024fa7de0073802df69532ec1600f711a3994e;p=xonotic%2Fxonotic-data.pk3dir.git Update bulldozer to use new assets by KingPimpCommander, also add a comment to make sure someone doesn't make the same mistake with impulses --- diff --git a/gfx/hud/default/minigames/bd/board.jpg b/gfx/hud/default/minigames/bd/board.jpg deleted file mode 100644 index dfe891442..000000000 Binary files a/gfx/hud/default/minigames/bd/board.jpg and /dev/null differ diff --git a/gfx/hud/default/minigames/bd/board.png b/gfx/hud/default/minigames/bd/board.png new file mode 100644 index 000000000..ed116d06b Binary files /dev/null and b/gfx/hud/default/minigames/bd/board.png differ diff --git a/gfx/hud/default/minigames/bd/boulder.png b/gfx/hud/default/minigames/bd/boulder.png new file mode 100644 index 000000000..d8c3aa069 Binary files /dev/null and b/gfx/hud/default/minigames/bd/boulder.png differ diff --git a/gfx/hud/default/minigames/bd/boulder.tga b/gfx/hud/default/minigames/bd/boulder.tga deleted file mode 100644 index 872e6ce31..000000000 Binary files a/gfx/hud/default/minigames/bd/boulder.tga and /dev/null differ diff --git a/gfx/hud/default/minigames/bd/boulder_target.png b/gfx/hud/default/minigames/bd/boulder_target.png new file mode 100644 index 000000000..941ebbb9e Binary files /dev/null and b/gfx/hud/default/minigames/bd/boulder_target.png differ diff --git a/gfx/hud/default/minigames/bd/brick1.jpg b/gfx/hud/default/minigames/bd/brick1.jpg deleted file mode 100644 index cb1eba61f..000000000 Binary files a/gfx/hud/default/minigames/bd/brick1.jpg and /dev/null differ diff --git a/gfx/hud/default/minigames/bd/brick1.png b/gfx/hud/default/minigames/bd/brick1.png new file mode 100644 index 000000000..2ff03e6d3 Binary files /dev/null and b/gfx/hud/default/minigames/bd/brick1.png differ diff --git a/gfx/hud/default/minigames/bd/brick2.png b/gfx/hud/default/minigames/bd/brick2.png new file mode 100644 index 000000000..2362647a0 Binary files /dev/null and b/gfx/hud/default/minigames/bd/brick2.png differ diff --git a/gfx/hud/default/minigames/bd/brick2.tga b/gfx/hud/default/minigames/bd/brick2.tga deleted file mode 100644 index f8a438581..000000000 Binary files a/gfx/hud/default/minigames/bd/brick2.tga and /dev/null differ diff --git a/gfx/hud/default/minigames/bd/brick3.jpg b/gfx/hud/default/minigames/bd/brick3.jpg deleted file mode 100644 index 3a6330c80..000000000 Binary files a/gfx/hud/default/minigames/bd/brick3.jpg and /dev/null differ diff --git a/gfx/hud/default/minigames/bd/brick3.png b/gfx/hud/default/minigames/bd/brick3.png new file mode 100644 index 000000000..afa9c93e6 Binary files /dev/null and b/gfx/hud/default/minigames/bd/brick3.png differ diff --git a/gfx/hud/default/minigames/bd/brick4.jpg b/gfx/hud/default/minigames/bd/brick4.jpg deleted file mode 100644 index 2b6c14f3e..000000000 Binary files a/gfx/hud/default/minigames/bd/brick4.jpg and /dev/null differ diff --git a/gfx/hud/default/minigames/bd/brick4.png b/gfx/hud/default/minigames/bd/brick4.png new file mode 100644 index 000000000..004739c37 Binary files /dev/null and b/gfx/hud/default/minigames/bd/brick4.png differ diff --git a/gfx/hud/default/minigames/bd/brick5.jpg b/gfx/hud/default/minigames/bd/brick5.jpg deleted file mode 100644 index 8867955fe..000000000 Binary files a/gfx/hud/default/minigames/bd/brick5.jpg and /dev/null differ diff --git a/gfx/hud/default/minigames/bd/brick5.png b/gfx/hud/default/minigames/bd/brick5.png new file mode 100644 index 000000000..be2f0cce3 Binary files /dev/null and b/gfx/hud/default/minigames/bd/brick5.png differ diff --git a/gfx/hud/default/minigames/bd/brick6.png b/gfx/hud/default/minigames/bd/brick6.png new file mode 100644 index 000000000..9a59f7276 Binary files /dev/null and b/gfx/hud/default/minigames/bd/brick6.png differ diff --git a/gfx/hud/default/minigames/bd/brick6.tga b/gfx/hud/default/minigames/bd/brick6.tga deleted file mode 100644 index 39ba0d1fc..000000000 Binary files a/gfx/hud/default/minigames/bd/brick6.tga and /dev/null differ diff --git a/gfx/hud/default/minigames/bd/brick7.jpg b/gfx/hud/default/minigames/bd/brick7.jpg deleted file mode 100644 index 2c0e6984d..000000000 Binary files a/gfx/hud/default/minigames/bd/brick7.jpg and /dev/null differ diff --git a/gfx/hud/default/minigames/bd/brick7.png b/gfx/hud/default/minigames/bd/brick7.png new file mode 100644 index 000000000..63e716331 Binary files /dev/null and b/gfx/hud/default/minigames/bd/brick7.png differ diff --git a/gfx/hud/default/minigames/bd/brick8.jpg b/gfx/hud/default/minigames/bd/brick8.jpg deleted file mode 100644 index f6d8607e5..000000000 Binary files a/gfx/hud/default/minigames/bd/brick8.jpg and /dev/null differ diff --git a/gfx/hud/default/minigames/bd/brick8.png b/gfx/hud/default/minigames/bd/brick8.png new file mode 100644 index 000000000..7153445d9 Binary files /dev/null and b/gfx/hud/default/minigames/bd/brick8.png differ diff --git a/gfx/hud/default/minigames/bd/delete.png b/gfx/hud/default/minigames/bd/delete.png new file mode 100644 index 000000000..19d9a8e49 Binary files /dev/null and b/gfx/hud/default/minigames/bd/delete.png differ diff --git a/gfx/hud/default/minigames/bd/delete.tga b/gfx/hud/default/minigames/bd/delete.tga deleted file mode 100644 index f69334ca1..000000000 Binary files a/gfx/hud/default/minigames/bd/delete.tga and /dev/null differ diff --git a/gfx/hud/default/minigames/bd/dozer.png b/gfx/hud/default/minigames/bd/dozer.png new file mode 100644 index 000000000..1457c7c82 Binary files /dev/null and b/gfx/hud/default/minigames/bd/dozer.png differ diff --git a/gfx/hud/default/minigames/bd/dozer.tga b/gfx/hud/default/minigames/bd/dozer.tga deleted file mode 100644 index b3a985aef..000000000 Binary files a/gfx/hud/default/minigames/bd/dozer.tga and /dev/null differ diff --git a/gfx/hud/default/minigames/bd/target.png b/gfx/hud/default/minigames/bd/target.png new file mode 100644 index 000000000..caf86701a Binary files /dev/null and b/gfx/hud/default/minigames/bd/target.png differ diff --git a/gfx/hud/default/minigames/bd/target.tga b/gfx/hud/default/minigames/bd/target.tga deleted file mode 100644 index 355332ef4..000000000 Binary files a/gfx/hud/default/minigames/bd/target.tga and /dev/null differ diff --git a/qcsrc/common/minigames/minigame/bd.qc b/qcsrc/common/minigames/minigame/bd.qc index 9867ed0ad..a311005b7 100644 --- a/qcsrc/common/minigames/minigame/bd.qc +++ b/qcsrc/common/minigames/minigame/bd.qc @@ -682,6 +682,9 @@ int bd_server_event(entity minigame, string event, ...) int bd_curr_tile; string bd_curr_pos; +.entity bd_enemy; +.bool bd_hide; + vector bd_boardpos; // HUD board position vector bd_boardsize;// HUD board size @@ -720,59 +723,42 @@ void bd_hud_board(vector pos, vector mySize) entity e; FOREACH_MINIGAME_ENTITY(e) { - if ( e.classname == "minigame_board_piece" && e.bd_tiletype != BD_TILE_TARGET && e.bd_tiletype != BD_TILE_DOZER ) - { - tile_pos = minigame_tile_pos(e.netname,BD_NUM_CNT,BD_LET_CNT); - tile_pos = minigame_hud_denormalize(tile_pos,pos,mySize); - - string thepiece = bd_get_tile_pic(e.bd_tiletype); - - minigame_drawpic_centered( tile_pos, - minigame_texture(thepiece), - tile_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL ); - } - - if ( e.classname == "minigame_board_piece" && e.bd_tiletype == BD_TILE_TARGET && e.bd_tiletype != BD_TILE_DOZER ) - { - tile_pos = minigame_tile_pos(e.netname,BD_NUM_CNT,BD_LET_CNT); - tile_pos = minigame_hud_denormalize(tile_pos,pos,mySize); - - minigame_drawpic_centered( tile_pos, - minigame_texture("bd/target"), - tile_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL ); - } - - if ( e.classname == "minigame_board_piece" && e.bd_tiletype != BD_TILE_TARGET && e.bd_tiletype == BD_TILE_DOZER ) + if(e.classname == "minigame_board_piece") { - tile_pos = minigame_tile_pos(e.netname,BD_NUM_CNT,BD_LET_CNT); - tile_pos = minigame_hud_denormalize(tile_pos,pos,mySize); - - vector thedir = e.bd_dir; - float theang = 0; - - if(thedir_y == -1) { theang = M_PI; } - if(thedir_x == 1) { theang = M_PI/2; } - if(thedir_x == -1) { theang = M_PI*3/2; } - - drawrotpic(tile_pos, theang, minigame_texture("bd/dozer"), - tile_size, tile_size/2, '1 1 1', - panel_fg_alpha, DRAWFLAG_NORMAL ); + if(e.bd_tiletype == BD_TILE_TARGET) + { + e.bd_enemy = world; + e.bd_enemy = bd_find_piece(active_minigame, e.netname, false); + } + else if(e.bd_tiletype == BD_TILE_BOULDER) + { + e.bd_hide = false; // reset either way + e.bd_hide = ((bd_find_piece(active_minigame, e.netname, true)) != world); + } } } - FOREACH_MINIGAME_ENTITY(e) { - if ( e.classname == "minigame_board_piece" && e.bd_tiletype == BD_TILE_TARGET ) + if ( e.classname == "minigame_board_piece" ) { - tile_pos = minigame_tile_pos(e.netname,BD_NUM_CNT,BD_LET_CNT); - tile_pos = minigame_hud_denormalize(tile_pos,pos,mySize); + if(e.bd_tiletype != BD_TILE_DOZER && !e.bd_hide) // hide boulders + { + tile_pos = minigame_tile_pos(e.netname,BD_NUM_CNT,BD_LET_CNT); + tile_pos = minigame_hud_denormalize(tile_pos,pos,mySize); + + string thepiece = bd_get_tile_pic(e.bd_tiletype); + + if(e.bd_enemy) + thepiece = "bd/boulder_target"; - minigame_drawpic_centered( tile_pos, - minigame_texture("bd/target"), - tile_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL ); + minigame_drawpic_centered( tile_pos, + minigame_texture(thepiece), + tile_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL ); + } } } + // draw dozers on top, always FOREACH_MINIGAME_ENTITY(e) { if ( e.classname == "minigame_board_piece" && e.bd_tiletype == BD_TILE_DOZER ) diff --git a/qcsrc/server/cl_impulse.qc b/qcsrc/server/cl_impulse.qc index 58f1a9bd3..ab5ad3b52 100644 --- a/qcsrc/server/cl_impulse.qc +++ b/qcsrc/server/cl_impulse.qc @@ -97,7 +97,7 @@ void ImpulseCommands () // weapon switching impulses if(self.deadflag == DEAD_NO) W_NextWeaponOnImpulse(imp); - //else + //else // don't retry, as this can break weaplast bind // self.impulse = imp; // retry in next frame } else if(imp >= 10 && imp <= 20) @@ -145,7 +145,7 @@ void ImpulseCommands () break; } } - //else + //else // don't retry, as this can break weaplast bind //self.impulse = imp; // retry in next frame } else if(imp == 21) @@ -162,7 +162,7 @@ void ImpulseCommands () m = (imp - (210 + i)); // <0 for prev, =0 for best, >0 for next W_CycleWeapon(self.(cvar_cl_weaponpriorities[i]), m); } - //else + //else // don't retry, as this can break weaplast bind //self.impulse = imp; // retry in next frame } else if(imp >= WEP_IMPULSE_BEGIN && imp <= WEP_IMPULSE_END) @@ -170,7 +170,7 @@ void ImpulseCommands () if(!self.vehicle) if(self.deadflag == DEAD_NO) W_SwitchWeapon (imp - WEP_IMPULSE_BEGIN + WEP_FIRST); - //else + //else // don't retry, as this can break weaplast bind //self.impulse = imp; // retry in next frame } // deploy waypoints