X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fminigames%2Fminigame%2Fnmm.qc;h=82e09c324ab3982966ea7a08dc33f81527e50467;hb=b945d959784e5b249c66aea4f3326d8ae048f1cd;hp=bdb02ab96273682819017d43864356295a3caf8d;hpb=e424ba544c41fc40b241b17bd7c1d9c2fc930705;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/minigames/minigame/nmm.qc b/qcsrc/common/minigames/minigame/nmm.qc index bdb02ab96..82e09c324 100644 --- a/qcsrc/common/minigames/minigame/nmm.qc +++ b/qcsrc/common/minigames/minigame/nmm.qc @@ -1,4 +1,9 @@ #include "nmm.qh" + +#ifdef CSQC +#include +#endif + REGISTER_MINIGAME(nmm, "Nine Men's Morris"); const int NMM_TURN_PLACE = 0x0100; // player has to place a piece on the board @@ -474,22 +479,22 @@ void nmm_hud_board(vector pos, vector mySize) if ( active_minigame.minigame_flags & NMM_TURN_WIN ) { vector winfs = hud_fontsize*2; - string playername = ""; + string pname = ""; FOREACH_MINIGAME_ENTITY(e) if ( e.classname == "minigame_player" && e.team == (active_minigame.minigame_flags & NMM_TURN_TEAM) ) - playername = entcs_GetName(e.minigame_playerslot-1); + pname = entcs_GetName(e.minigame_playerslot-1); vector win_pos = pos+eY*(mySize_y-winfs_y)/2; vector win_sz; win_sz = minigame_drawcolorcodedstring_wrapped(mySize_x,win_pos, - sprintf("%s^7 won the game!",playername), + sprintf("%s^7 won the game!",pname), winfs, 0, DRAWFLAG_NORMAL, 0.5); drawfill(win_pos-eY*hud_fontsize_y,win_sz+2*eY*hud_fontsize_y,'1 1 1',0.5,DRAWFLAG_ADDITIVE); minigame_drawcolorcodedstring_wrapped(mySize_x,win_pos, - sprintf("%s^7 won the game!",playername), + sprintf("%s^7 won the game!",pname), winfs, panel_fg_alpha, DRAWFLAG_NORMAL, 0.5); } } @@ -497,9 +502,8 @@ void nmm_hud_board(vector pos, vector mySize) // Required function, draw the game status panel void nmm_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); pos_y += ts_y;