X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fminigames%2Fminigame%2Fc4.qc;h=c8f8184f5b0bd019862d1b73ecc631faea5084f1;hb=7e5268799e95d0dd6f2b77ed4e097b0adc755f2b;hp=2a6cb3d475ded6748f10715c5e5e9118e9ce6675;hpb=d492869ab1f18e05121529b7bcffcb637d13994c;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/minigames/minigame/c4.qc b/qcsrc/common/minigames/minigame/c4.qc index 2a6cb3d47..c8f8184f5 100644 --- a/qcsrc/common/minigames/minigame/c4.qc +++ b/qcsrc/common/minigames/minigame/c4.qc @@ -201,7 +201,7 @@ int c4_server_event(entity minigame, string event, ...) while( (e = findentity(e, owner, minigame)) ) if(e.classname == "minigame_board_piece") { - if(e.netname) { strunzone(e.netname); } + strfree(e.netname); delete(e); } return false; @@ -299,22 +299,22 @@ void c4_hud_board(vector pos, vector mySize) if ( active_minigame.minigame_flags & C4_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 & C4_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); } } @@ -399,8 +399,7 @@ void c4_make_move(entity minigame) void c4_set_curr_pos(string s) { - if ( c4_curr_pos ) - strunzone(c4_curr_pos); + strfree(c4_curr_pos); if ( s ) s = strzone(s); c4_curr_pos = s;