]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/minigames/minigame/c4.qc
Merge branch 'master' into terencehill/hud_updates
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / minigames / minigame / c4.qc
index 9b9d570855b490d8ac01d737cfb2114329656fe7..2a6cb3d475ded6748f10715c5e5e9118e9ce6675 100644 (file)
@@ -1,3 +1,4 @@
+#include "c4.qh"
 REGISTER_MINIGAME(c4, "Connect Four");
 
 const float C4_TURN_PLACE = 0x0100; // player has to place a piece on the board
@@ -24,11 +25,11 @@ const int C4_TEAMS = 2;
 // find connect 4 piece given its tile name
 entity c4_find_piece(entity minig, string tile)
 {
-       entity e = world;
+       entity e = NULL;
        while ( ( e = findentity(e,owner,minig) ) )
                if ( e.classname == "minigame_board_piece" && e.netname == tile )
                        return e;
-       return world;
+       return NULL;
 }
 
 // Checks if the given piece completes a row
@@ -196,12 +197,12 @@ int c4_server_event(entity minigame, string event, ...)
                }
                case "end":
                {
-                       entity e = world;
+                       entity e = NULL;
                        while( (e = findentity(e, owner, minigame)) )
                        if(e.classname == "minigame_board_piece")
                        {
                                if(e.netname) { strunzone(e.netname); }
-                               remove(e);
+                               delete(e);
                        }
                        return false;
                }
@@ -322,7 +323,7 @@ void c4_hud_board(vector pos, vector mySize)
 // Required function, draw the game status panel
 void c4_hud_status(vector pos, vector mySize)
 {
-       HUD_Panel_DrawBg(1);
+       HUD_Panel_DrawBg();
        vector ts;
        ts = minigame_drawstring_wrapped(mySize_x,pos,active_minigame.descriptor.message,
                hud_fontsize * 2, '0.25 0.47 0.72', panel_fg_alpha, DRAWFLAG_NORMAL,0.5);