]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Update bulldozer to use new assets by KingPimpCommander, also add a comment to make...
authorMario <mario@smbclan.net>
Sun, 22 Nov 2015 21:21:20 +0000 (07:21 +1000)
committerMario <mario@smbclan.net>
Sun, 22 Nov 2015 21:21:39 +0000 (07:21 +1000)
29 files changed:
gfx/hud/default/minigames/bd/board.jpg [deleted file]
gfx/hud/default/minigames/bd/board.png [new file with mode: 0644]
gfx/hud/default/minigames/bd/boulder.png [new file with mode: 0644]
gfx/hud/default/minigames/bd/boulder.tga [deleted file]
gfx/hud/default/minigames/bd/boulder_target.png [new file with mode: 0644]
gfx/hud/default/minigames/bd/brick1.jpg [deleted file]
gfx/hud/default/minigames/bd/brick1.png [new file with mode: 0644]
gfx/hud/default/minigames/bd/brick2.png [new file with mode: 0644]
gfx/hud/default/minigames/bd/brick2.tga [deleted file]
gfx/hud/default/minigames/bd/brick3.jpg [deleted file]
gfx/hud/default/minigames/bd/brick3.png [new file with mode: 0644]
gfx/hud/default/minigames/bd/brick4.jpg [deleted file]
gfx/hud/default/minigames/bd/brick4.png [new file with mode: 0644]
gfx/hud/default/minigames/bd/brick5.jpg [deleted file]
gfx/hud/default/minigames/bd/brick5.png [new file with mode: 0644]
gfx/hud/default/minigames/bd/brick6.png [new file with mode: 0644]
gfx/hud/default/minigames/bd/brick6.tga [deleted file]
gfx/hud/default/minigames/bd/brick7.jpg [deleted file]
gfx/hud/default/minigames/bd/brick7.png [new file with mode: 0644]
gfx/hud/default/minigames/bd/brick8.jpg [deleted file]
gfx/hud/default/minigames/bd/brick8.png [new file with mode: 0644]
gfx/hud/default/minigames/bd/delete.png [new file with mode: 0644]
gfx/hud/default/minigames/bd/delete.tga [deleted file]
gfx/hud/default/minigames/bd/dozer.png [new file with mode: 0644]
gfx/hud/default/minigames/bd/dozer.tga [deleted file]
gfx/hud/default/minigames/bd/target.png [new file with mode: 0644]
gfx/hud/default/minigames/bd/target.tga [deleted file]
qcsrc/common/minigames/minigame/bd.qc
qcsrc/server/cl_impulse.qc

diff --git a/gfx/hud/default/minigames/bd/board.jpg b/gfx/hud/default/minigames/bd/board.jpg
deleted file mode 100644 (file)
index dfe8914..0000000
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 (file)
index 0000000..ed116d0
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 (file)
index 0000000..d8c3aa0
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 (file)
index 872e6ce..0000000
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 (file)
index 0000000..941ebbb
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 (file)
index cb1eba6..0000000
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 (file)
index 0000000..2ff03e6
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 (file)
index 0000000..2362647
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 (file)
index f8a4385..0000000
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 (file)
index 3a6330c..0000000
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 (file)
index 0000000..afa9c93
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 (file)
index 2b6c14f..0000000
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 (file)
index 0000000..004739c
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 (file)
index 8867955..0000000
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 (file)
index 0000000..be2f0cc
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 (file)
index 0000000..9a59f72
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 (file)
index 39ba0d1..0000000
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 (file)
index 2c0e698..0000000
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 (file)
index 0000000..63e7163
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 (file)
index f6d8607..0000000
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 (file)
index 0000000..7153445
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 (file)
index 0000000..19d9a8e
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 (file)
index f69334c..0000000
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 (file)
index 0000000..1457c7c
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 (file)
index b3a985a..0000000
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 (file)
index 0000000..caf8670
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 (file)
index 355332e..0000000
Binary files a/gfx/hud/default/minigames/bd/target.tga and /dev/null differ
index 9867ed0ad9919452802ea2de5f62433a64352a96..a311005b7fd5ebb377cba2f9c08533d4d60be6ec 100644 (file)
@@ -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 )
index 58f1a9bd37022a67ed9ff399788706bde4c94a60..ab5ad3b527be7dcd27d2c162e9ce7ec11803fa26 100644 (file)
@@ -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