X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=blobdiff_plain;f=src%2Fgame%2Fg_options.pas;h=c923a6771fdb120124f71ef6a778720633af8ffc;hp=d4f92e86617af3c35036b96df4f798c117de4c68;hb=c8d7811d45c2d34a7e297613e50570f253a0d8e9;hpb=80a5bd62ed15eaa7140802ab6d45da86ffa919d0 diff --git a/src/game/g_options.pas b/src/game/g_options.pas index d4f92e8..c923a67 100644 --- a/src/game/g_options.pas +++ b/src/game/g_options.pas @@ -73,6 +73,8 @@ var gcWeaponStay: Boolean; gcMonsters: Boolean; gcBotsVS: String; + gcDeathmatchKeys: Boolean = True; + gcSpawnInvul: Integer = 0; gnMap: String; gnGameMode: String; gnTimeLimit: Word; @@ -84,6 +86,8 @@ var gnWeaponStay: Boolean; gnMonsters: Boolean; gnBotsVS: String; + gnDeathmatchKeys: Boolean = True; + gnSpawnInvul: Integer = 0; gsSDLSampleRate: Integer; gsSDLBufferSize: Integer; gDefaultMegawadStart: AnsiString; @@ -283,6 +287,8 @@ begin gcWeaponStay := False; gcMonsters := False; gcBotsVS := 'Everybody'; + gcDeathmatchKeys := True; + gcSpawnInvul := 0; (* section GameplayNetwork *) gnMap := ''; @@ -296,6 +302,8 @@ begin gnWeaponStay := False; gnMonsters := False; gnBotsVS := 'Everybody'; + gnDeathmatchKeys := True; + gnSpawnInvul := 0; (* section MasterServer *) NetSlistIP := 'mpms.doom2d.org'; @@ -410,6 +418,8 @@ begin ReadBoolean(gcWeaponStay, 'WeaponStay'); ReadBoolean(gcMonsters, 'Monsters'); ReadString(gcBotsVS, 'BotsVS'); + ReadBoolean(gcDeathmatchKeys, 'DeathmatchKeys'); + ReadInteger(gcSpawnInvul, 'SpawnInvul'); with gGameSettings do begin @@ -437,6 +447,8 @@ begin Options := Options or GAME_OPTION_BOTVSPLAYER; if gcBotsVS = 'Monsters' then Options := Options or GAME_OPTION_BOTVSMONSTER; + if gcDeathmatchKeys then + Options := Options or GAME_OPTION_DMKEYS; end; section := 'GameplayNetwork'; @@ -451,6 +463,8 @@ begin ReadBoolean(gnWeaponStay, 'WeaponStay'); ReadBoolean(gnMonsters, 'Monsters'); ReadString(gnBotsVS, 'BotsVS'); + ReadBoolean(gnDeathmatchKeys, 'DeathmatchKeys'); + ReadInteger(gnSpawnInvul, 'SpawnInvul'); section := 'MasterServer'; ReadString(NetSlistIP, 'IP'); @@ -521,6 +535,8 @@ begin config.WriteBool('GameplayCustom', 'WeaponStay', gcWeaponStay); config.WriteBool('GameplayCustom', 'Monsters', gcMonsters); config.WriteStr ('GameplayCustom', 'BotsVS', gcBotsVS); + config.WriteBool('GameplayCustom', 'DeathmatchKeys', gcDeathmatchKeys); + config.WriteInt ('GameplayCustom', 'SpawnInvul', gcSpawnInvul); config.WriteStr ('GameplayNetwork', 'Map', gnMap); config.WriteStr ('GameplayNetwork', 'GameMode', gnGameMode); @@ -533,6 +549,8 @@ begin config.WriteBool('GameplayNetwork', 'WeaponStay', gnWeaponStay); config.WriteBool('GameplayNetwork', 'Monsters', gnMonsters); config.WriteStr ('GameplayNetwork', 'BotsVS', gnBotsVS); + config.WriteBool('GameplayNetwork', 'DeathmatchKeys', gnDeathmatchKeys); + config.WriteInt ('GameplayNetwork', 'SpawnInvul', gnSpawnInvul); config.WriteStr('MasterServer', 'IP', NetSlistIP); config.WriteInt('MasterServer', 'Port', NetSlistPort); @@ -579,6 +597,8 @@ begin config.WriteBool('GameplayCustom', 'WeaponStay', gcWeaponStay); config.WriteBool('GameplayCustom', 'Monsters', gcMonsters); config.WriteStr ('GameplayCustom', 'BotsVS', gcBotsVS); + config.WriteBool('GameplayCustom', 'DeathmatchKeys', gcDeathmatchKeys); + config.WriteInt ('GameplayCustom', 'SpawnInvul', gcSpawnInvul); config.SaveFile(FileName); config.Free(); @@ -603,6 +623,8 @@ begin config.WriteBool('GameplayNetwork', 'WeaponStay', gnWeaponStay); config.WriteBool('GameplayNetwork', 'Monsters', gnMonsters); config.WriteStr ('GameplayNetwork', 'BotsVS', gnBotsVS); + config.WriteBool('GameplayNetwork', 'DeathmatchKeys', gnDeathmatchKeys); + config.WriteInt ('GameplayNetwork', 'SpawnInvul', gnSpawnInvul); config.SaveFile(FileName); config.Free();