X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_game.pas;h=0d31e221c6c5c0950e515552fe1b7ed26396620d;hb=6f5375e6179294fde838bcf61f0dafeb4e018ee7;hp=23c09434500a78b91de1423888484296164d8a95;hpb=408d21ccc37ab8b7848b9e0eecc48bd38d2ae89c;p=d2df-sdl.git diff --git a/src/game/g_game.pas b/src/game/g_game.pas index 23c0943..0d31e22 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -180,6 +180,7 @@ const GAME_OPTION_BOTVSPLAYER = 32; GAME_OPTION_BOTVSMONSTER = 64; GAME_OPTION_DMKEYS = 128; + GAME_OPTION_RESPAWNITEMS = 256; STATE_NONE = 0; STATE_MENU = 1; @@ -4641,7 +4642,7 @@ begin // Ñòàðòóåì ñåðâåð if not g_Net_Host(IPAddr, Port, NetMaxClients) then begin - g_FatalError(_lc[I_NET_MSG] + _lc[I_NET_ERR_HOST]); + g_FatalError(_lc[I_NET_MSG] + Format(_lc[I_NET_ERR_HOST], [Port])); Exit; end; @@ -5572,7 +5573,27 @@ begin g_Console_Add(_lc[I_MSG_DMKEYS_ON]) else g_Console_Add(_lc[I_MSG_DMKEYS_OFF]); - g_Console_Add(_lc[I_MSG_ONMAPCHANGE]); + + if g_Game_IsNet then MH_SEND_GameSettings; + end; + end + else if (cmd = 'g_respawn_items') and not g_Game_IsClient then + begin + with gGameSettings do + begin + if (Length(P) > 1) and + ((P[1] = '1') or (P[1] = '0')) then + begin + if (P[1][1] = '1') then + Options := Options or GAME_OPTION_RESPAWNITEMS + else + Options := Options and (not GAME_OPTION_RESPAWNITEMS); + end; + + if (LongBool(Options and GAME_OPTION_RESPAWNITEMS)) then + g_Console_Add(_lc[I_MSG_RESPAWNITEMS_ON]) + else + g_Console_Add(_lc[I_MSG_RESPAWNITEMS_OFF]); if g_Game_IsNet then MH_SEND_GameSettings; end;