X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=blobdiff_plain;f=src%2Fgame%2Fg_options.pas;h=02889313813d3d9cbbba34e7db62f47efa24e6ac;hp=c923a6771fdb120124f71ef6a778720633af8ffc;hb=6f5375e6179294fde838bcf61f0dafeb4e018ee7;hpb=4774edd4a8efe6f10b0205f05e386d5629f69294 diff --git a/src/game/g_options.pas b/src/game/g_options.pas index c923a67..0288931 100644 --- a/src/game/g_options.pas +++ b/src/game/g_options.pas @@ -74,6 +74,7 @@ var gcMonsters: Boolean; gcBotsVS: String; gcDeathmatchKeys: Boolean = True; + gcRespawnItems: Boolean = True; gcSpawnInvul: Integer = 0; gnMap: String; gnGameMode: String; @@ -87,6 +88,7 @@ var gnMonsters: Boolean; gnBotsVS: String; gnDeathmatchKeys: Boolean = True; + gnRespawnItems: Boolean = True; gnSpawnInvul: Integer = 0; gsSDLSampleRate: Integer; gsSDLBufferSize: Integer; @@ -288,6 +290,7 @@ begin gcMonsters := False; gcBotsVS := 'Everybody'; gcDeathmatchKeys := True; + gcRespawnItems := True; gcSpawnInvul := 0; (* section GameplayNetwork *) @@ -303,6 +306,7 @@ begin gnMonsters := False; gnBotsVS := 'Everybody'; gnDeathmatchKeys := True; + gnRespawnItems := True; gnSpawnInvul := 0; (* section MasterServer *) @@ -419,6 +423,7 @@ begin ReadBoolean(gcMonsters, 'Monsters'); ReadString(gcBotsVS, 'BotsVS'); ReadBoolean(gcDeathmatchKeys, 'DeathmatchKeys'); + ReadBoolean(gcRespawnItems, 'RespawnItems'); ReadInteger(gcSpawnInvul, 'SpawnInvul'); with gGameSettings do @@ -449,6 +454,8 @@ begin Options := Options or GAME_OPTION_BOTVSMONSTER; if gcDeathmatchKeys then Options := Options or GAME_OPTION_DMKEYS; + if gcRespawnItems then + Options := Options or GAME_OPTION_RESPAWNITEMS; end; section := 'GameplayNetwork'; @@ -464,6 +471,7 @@ begin ReadBoolean(gnMonsters, 'Monsters'); ReadString(gnBotsVS, 'BotsVS'); ReadBoolean(gnDeathmatchKeys, 'DeathmatchKeys'); + ReadBoolean(gnRespawnItems, 'RespawnItems'); ReadInteger(gnSpawnInvul, 'SpawnInvul'); section := 'MasterServer'; @@ -536,6 +544,7 @@ begin config.WriteBool('GameplayCustom', 'Monsters', gcMonsters); config.WriteStr ('GameplayCustom', 'BotsVS', gcBotsVS); config.WriteBool('GameplayCustom', 'DeathmatchKeys', gcDeathmatchKeys); + config.WriteBool('GameplayCustom', 'RespawnItems', gcRespawnItems); config.WriteInt ('GameplayCustom', 'SpawnInvul', gcSpawnInvul); config.WriteStr ('GameplayNetwork', 'Map', gnMap); @@ -550,6 +559,7 @@ begin config.WriteBool('GameplayNetwork', 'Monsters', gnMonsters); config.WriteStr ('GameplayNetwork', 'BotsVS', gnBotsVS); config.WriteBool('GameplayNetwork', 'DeathmatchKeys', gnDeathmatchKeys); + config.WriteBool('GameplayNetwork', 'RespawnItems', gnRespawnItems); config.WriteInt ('GameplayNetwork', 'SpawnInvul', gnSpawnInvul); config.WriteStr('MasterServer', 'IP', NetSlistIP); @@ -598,6 +608,7 @@ begin config.WriteBool('GameplayCustom', 'Monsters', gcMonsters); config.WriteStr ('GameplayCustom', 'BotsVS', gcBotsVS); config.WriteBool('GameplayCustom', 'DeathmatchKeys', gcDeathmatchKeys); + config.WriteBool('GameplayCustom', 'RespawnItems', gcRespawnItems); config.WriteInt ('GameplayCustom', 'SpawnInvul', gcSpawnInvul); config.SaveFile(FileName); @@ -624,6 +635,7 @@ begin config.WriteBool('GameplayNetwork', 'Monsters', gnMonsters); config.WriteStr ('GameplayNetwork', 'BotsVS', gnBotsVS); config.WriteBool('GameplayNetwork', 'DeathmatchKeys', gnDeathmatchKeys); + config.WriteBool('GameplayNetwork', 'RespawnItems', gnRespawnItems); config.WriteInt ('GameplayNetwork', 'SpawnInvul', gnSpawnInvul); config.SaveFile(FileName);