summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c3750b3)
raw | patch | inline | side by side (parent: c3750b3)
author | fgsfds <pvt.fgsfds@gmail.com> | |
Mon, 24 Feb 2020 15:55:48 +0000 (18:55 +0300) | ||
committer | fgsfds <pvt.fgsfds@gmail.com> | |
Mon, 24 Feb 2020 15:55:48 +0000 (18:55 +0300) |
diff --git a/src/game/g_console.pas b/src/game/g_console.pas
index 01cd41ab1c677fa9c45a791de02d2a7ea4d59644..94b65318a091c51e78dfa8f2fcfc268c489a8aa3 100644 (file)
--- a/src/game/g_console.pas
+++ b/src/game/g_console.pas
AddCommand('g_maxlives', GameCVars);
AddCommand('g_warmuptime', GameCVars);
AddCommand('g_spawn_invul', GameCVars);
AddCommand('g_maxlives', GameCVars);
AddCommand('g_warmuptime', GameCVars);
AddCommand('g_spawn_invul', GameCVars);
- AddCommand('g_respawn_items', GameCVars);
AddCommand('net_interp', GameCVars);
AddCommand('net_forceplayerupdate', GameCVars);
AddCommand('net_predictself', GameCVars);
AddCommand('net_interp', GameCVars);
AddCommand('net_forceplayerupdate', GameCVars);
AddCommand('net_predictself', GameCVars);
WhitelistCommand('g_scorelimit');
WhitelistCommand('g_timelimit');
WhitelistCommand('g_dm_keys');
WhitelistCommand('g_scorelimit');
WhitelistCommand('g_timelimit');
WhitelistCommand('g_dm_keys');
- WhitelistCommand('g_respawn_items');
WhitelistCommand('g_spawn_invul');
WhitelistCommand('g_warmuptime');
WhitelistCommand('g_spawn_invul');
WhitelistCommand('g_warmuptime');
diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index feaf1591041441ee1e22591c3d7d371bf5fc361b..0395bf4c9f05bae2fc2a68023d795d51d2867c05 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
GAME_OPTION_BOTVSPLAYER = 32;
GAME_OPTION_BOTVSMONSTER = 64;
GAME_OPTION_DMKEYS = 128;
GAME_OPTION_BOTVSPLAYER = 32;
GAME_OPTION_BOTVSMONSTER = 64;
GAME_OPTION_DMKEYS = 128;
- GAME_OPTION_RESPAWNITEMS = 256;
STATE_NONE = 0;
STATE_MENU = 1;
STATE_NONE = 0;
STATE_MENU = 1;
if g_Game_IsNet then MH_SEND_GameSettings;
end;
end
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;
- end
else if (cmd = 'g_warmuptime') and not g_Game_IsClient then
begin
if Length(P) > 1 then
else if (cmd = 'g_warmuptime') and not g_Game_IsClient then
begin
if Length(P) > 1 then
diff --git a/src/game/g_items.pas b/src/game/g_items.pas
index ae047f82b8afcc86bfa283e05012af0964c9b3a5..9693ad07f31270f0d4e691a33ebcd66de8cbe04d 100644 (file)
--- a/src/game/g_items.pas
+++ b/src/game/g_items.pas
Anim: TAnimation;
m: Word;
r, nxt: Boolean;
Anim: TAnimation;
m: Word;
r, nxt: Boolean;
- actualRespawnable: Boolean;
begin
if (ggItems = nil) then exit;
begin
if (ggItems = nil) then exit;
// Íàäî óáðàòü ñ êàðòû, åñëè ýòî íå êëþ÷, êîòîðûì íóæíî ïîäåëèòüñÿ ñ äðóãèì èãðîêîì
if r then
begin
// Íàäî óáðàòü ñ êàðòû, åñëè ýòî íå êëþ÷, êîòîðûì íóæíî ïîäåëèòüñÿ ñ äðóãèì èãðîêîì
if r then
begin
- actualRespawnable := Respawnable
- and ((ITEM_RESPAWNTIME > 0) and LongBool(gGameSettings.Options and GAME_OPTION_RESPAWNITEMS));
- if not actualRespawnable then g_Items_Remove(i) else g_Items_Pick(i);
+ if not (Respawnable and (ITEM_RESPAWNTIME > 0)) then
+ g_Items_Remove(i)
+ else
+ g_Items_Pick(i);
if g_Game_IsNet then MH_SEND_ItemDestroy(False, i);
nxt := True;
break;
if g_Game_IsNet then MH_SEND_ItemDestroy(False, i);
nxt := True;
break;
index 09021f5cd3981736eeadc30dffde6d41465a216b..8d5ea098ae9488b74e9b9737620127b330bf391a 100644 (file)
--- a/src/game/g_language.pas
+++ b/src/game/g_language.pas
I_MENU_GOAL_LIMIT,
I_MENU_MAX_LIVES,
I_MENU_TEAM_DAMAGE,
I_MENU_GOAL_LIMIT,
I_MENU_MAX_LIVES,
I_MENU_TEAM_DAMAGE,
- I_MENU_RESPAWN_ITEMS,
+ I_MENU_ITEM_RESPAWN_TIME,
I_MENU_DEATHMATCH_KEYS,
I_MENU_ENABLE_EXITS,
I_MENU_WEAPONS_STAY,
I_MENU_DEATHMATCH_KEYS,
I_MENU_ENABLE_EXITS,
I_MENU_WEAPONS_STAY,
I_MSG_ALLOWMON_OFF,
I_MSG_DMKEYS_ON,
I_MSG_DMKEYS_OFF,
I_MSG_ALLOWMON_OFF,
I_MSG_DMKEYS_ON,
I_MSG_DMKEYS_OFF,
- I_MSG_RESPAWNITEMS_ON,
- I_MSG_RESPAWNITEMS_OFF,
I_MSG_BOTSVSPLAYERS_ON,
I_MSG_BOTSVSPLAYERS_OFF,
I_MSG_BOTSVSMONSTERS_ON,
I_MSG_BOTSVSPLAYERS_ON,
I_MSG_BOTSVSPLAYERS_OFF,
I_MSG_BOTSVSMONSTERS_ON,
'Æèçíè:'),
('MENU TEAM DAMAGE', 'Friendly Fire:',
'Óðîí ñâîèõ:'),
'Æèçíè:'),
('MENU TEAM DAMAGE', 'Friendly Fire:',
'Óðîí ñâîèõ:'),
- ('MENU RESPAWN ITEMS', 'Respawn Items:',
- 'Ðåñïàâíèòü ïðåäìåòû:'),
+ ('MENU ITEM RESPAWN TIME', 'Item respawn time:',
+ 'Âðåìÿ ðåñïàâíà ïðåäìåòîâ:'),
('MENU DEATHMATCH KEYS', 'Give all keys in DM:',
'Âñå êëþ÷è â DM:'),
('MENU ENABLE EXITS', 'Enable Exit:',
('MENU DEATHMATCH KEYS', 'Give all keys in DM:',
'Âñå êëþ÷è â DM:'),
('MENU ENABLE EXITS', 'Enable Exit:',
'Ðåñïàâí ñî âñåìè êëþ÷àìè â DM âêëþ÷åí'),
('MSG DMKEYS OFF', 'Spawning with all keys in DM disabled',
'Ðåñïàâí ñî âñåìè êëþ÷àìè â DM âûêëþ÷åí'),
'Ðåñïàâí ñî âñåìè êëþ÷àìè â DM âêëþ÷åí'),
('MSG DMKEYS OFF', 'Spawning with all keys in DM disabled',
'Ðåñïàâí ñî âñåìè êëþ÷àìè â DM âûêëþ÷åí'),
- ('MSG RESPAWNITEMS ON', 'Respawning items enabled',
- 'Ðåñïàâí ïðåäìåòîâ âêëþ÷åí'),
- ('MSG RESPAWNITEMS OFF', 'Respawning items disabled',
- 'Ðåñïàâí ïðåäìåòîâ âûêëþ÷åí'),
('MSG BOTSVSPLAYERS ON', 'Bots attack players',
'Áîòû ïðîòèâ èãðîêîâ'),
('MSG BOTSVSPLAYERS OFF', 'Bots ignore players',
('MSG BOTSVSPLAYERS ON', 'Bots attack players',
'Áîòû ïðîòèâ èãðîêîâ'),
('MSG BOTSVSPLAYERS OFF', 'Bots ignore players',
diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas
index 62d9337a4f91dc9e3b60aecbbb36ceeacf46a3e1..9f7aaaa4c53ea09180d2972a0f3c4428dba66fa5 100644 (file)
--- a/src/game/g_menu.pas
+++ b/src/game/g_menu.pas
gcMaxLives := StrToIntDef(TGUIEdit(GetControl('edMaxLives')).Text, 0);
gcTeamDamage := TGUISwitch(GetControl('swTeamDamage')).ItemIndex = 0;
gcMaxLives := StrToIntDef(TGUIEdit(GetControl('edMaxLives')).Text, 0);
gcTeamDamage := TGUISwitch(GetControl('swTeamDamage')).ItemIndex = 0;
- gcRespawnItems := TGUISwitch(GetControl('swRespawnItems')).ItemIndex = 0;
gcDeathmatchKeys := TGUISwitch(GetControl('swDeathmatchKeys')).ItemIndex = 0;
gcAllowExit := TGUISwitch(GetControl('swEnableExits')).ItemIndex = 0;
gcWeaponStay := TGUISwitch(GetControl('swWeaponStay')).ItemIndex = 0;
gcDeathmatchKeys := TGUISwitch(GetControl('swDeathmatchKeys')).ItemIndex = 0;
gcAllowExit := TGUISwitch(GetControl('swEnableExits')).ItemIndex = 0;
gcWeaponStay := TGUISwitch(GetControl('swWeaponStay')).ItemIndex = 0;
Options := 0;
if gcTeamDamage then
Options := Options or GAME_OPTION_TEAMDAMAGE;
Options := 0;
if gcTeamDamage then
Options := Options or GAME_OPTION_TEAMDAMAGE;
- if gcRespawnItems then
- Options := Options or GAME_OPTION_RESPAWNITEMS;
if gcDeathmatchKeys then
Options := Options or GAME_OPTION_DMKEYS;
if gcAllowExit then
if gcDeathmatchKeys then
Options := Options or GAME_OPTION_DMKEYS;
if gcAllowExit then
NetPort := StrToIntDef(TGUIEdit(GetControl('edPort')).Text, 0);
gnTeamDamage := TGUISwitch(GetControl('swTeamDamage')).ItemIndex = 0;
NetPort := StrToIntDef(TGUIEdit(GetControl('edPort')).Text, 0);
gnTeamDamage := TGUISwitch(GetControl('swTeamDamage')).ItemIndex = 0;
- gnRespawnItems := TGUISwitch(GetControl('swRespawnItems')).ItemIndex = 0;
gnDeathmatchKeys := TGUISwitch(GetControl('swDeathmatchKeys')).ItemIndex = 0;
gnAllowExit := TGUISwitch(GetControl('swEnableExits')).ItemIndex = 0;
gnWeaponStay := TGUISwitch(GetControl('swWeaponStay')).ItemIndex = 0;
gnDeathmatchKeys := TGUISwitch(GetControl('swDeathmatchKeys')).ItemIndex = 0;
gnAllowExit := TGUISwitch(GetControl('swEnableExits')).ItemIndex = 0;
gnWeaponStay := TGUISwitch(GetControl('swWeaponStay')).ItemIndex = 0;
Options := 0;
if gnTeamDamage then
Options := Options or GAME_OPTION_TEAMDAMAGE;
Options := 0;
if gnTeamDamage then
Options := Options or GAME_OPTION_TEAMDAMAGE;
- if gnRespawnItems then
- Options := Options or GAME_OPTION_RESPAWNITEMS;
if gnDeathmatchKeys then
Options := Options or GAME_OPTION_DMKEYS;
if gnAllowExit then
if gnDeathmatchKeys then
Options := Options or GAME_OPTION_DMKEYS;
if gnAllowExit then
else
ItemIndex := 1;
end;
else
ItemIndex := 1;
end;
- with AddSwitch(_lc[I_MENU_RESPAWN_ITEMS]) do
- begin
- Name := 'swRespawnItems';
- AddItem(_lc[I_MENU_YES]);
- AddItem(_lc[I_MENU_NO]);
- if gnRespawnItems then
- ItemIndex := 0
- else
- ItemIndex := 1;
- end;
with AddSwitch(_lc[I_MENU_DEATHMATCH_KEYS]) do
begin
Name := 'swDeathmatchKeys';
with AddSwitch(_lc[I_MENU_DEATHMATCH_KEYS]) do
begin
Name := 'swDeathmatchKeys';
else
ItemIndex := 1;
end;
else
ItemIndex := 1;
end;
- with AddSwitch(_lc[I_MENU_RESPAWN_ITEMS]) do
- begin
- Name := 'swRespawnItems';
- AddItem(_lc[I_MENU_YES]);
- AddItem(_lc[I_MENU_NO]);
- if gcRespawnItems then
- ItemIndex := 0
- else
- ItemIndex := 1;
- end;
with AddSwitch(_lc[I_MENU_DEATHMATCH_KEYS]) do
begin
Name := 'swDeathmatchKeys';
with AddSwitch(_lc[I_MENU_DEATHMATCH_KEYS]) do
begin
Name := 'swDeathmatchKeys';
diff --git a/src/game/g_options.pas b/src/game/g_options.pas
index e89521ddaab4800819bc475058c861fc2bf01c02..23ddc36a259a6a5d04531e64b3ff5243253b8e5a 100644 (file)
--- a/src/game/g_options.pas
+++ b/src/game/g_options.pas
gcMonsters: Boolean;
gcBotsVS: String;
gcDeathmatchKeys: Boolean = True;
gcMonsters: Boolean;
gcBotsVS: String;
gcDeathmatchKeys: Boolean = True;
- gcRespawnItems: Boolean = True;
gcSpawnInvul: Integer = 0;
gnMap: String;
gnGameMode: String;
gcSpawnInvul: Integer = 0;
gnMap: String;
gnGameMode: String;
gnMonsters: Boolean;
gnBotsVS: String;
gnDeathmatchKeys: Boolean = True;
gnMonsters: Boolean;
gnBotsVS: String;
gnDeathmatchKeys: Boolean = True;
- gnRespawnItems: Boolean = True;
gnSpawnInvul: Integer = 0;
gsSDLSampleRate: Integer;
gsSDLBufferSize: Integer;
gnSpawnInvul: Integer = 0;
gsSDLSampleRate: Integer;
gsSDLBufferSize: Integer;
gcMonsters := False;
gcBotsVS := 'Everybody';
gcDeathmatchKeys := True;
gcMonsters := False;
gcBotsVS := 'Everybody';
gcDeathmatchKeys := True;
- gcRespawnItems := True;
gcSpawnInvul := 0;
(* section GameplayNetwork *)
gcSpawnInvul := 0;
(* section GameplayNetwork *)
gnMonsters := False;
gnBotsVS := 'Everybody';
gnDeathmatchKeys := True;
gnMonsters := False;
gnBotsVS := 'Everybody';
gnDeathmatchKeys := True;
- gnRespawnItems := True;
gnSpawnInvul := 0;
(* section MasterServer *)
gnSpawnInvul := 0;
(* section MasterServer *)
ReadBoolean(gcMonsters, 'Monsters');
ReadString(gcBotsVS, 'BotsVS');
ReadBoolean(gcDeathmatchKeys, 'DeathmatchKeys');
ReadBoolean(gcMonsters, 'Monsters');
ReadString(gcBotsVS, 'BotsVS');
ReadBoolean(gcDeathmatchKeys, 'DeathmatchKeys');
- ReadBoolean(gcRespawnItems, 'RespawnItems');
ReadInteger(gcSpawnInvul, 'SpawnInvul');
with gGameSettings do
ReadInteger(gcSpawnInvul, 'SpawnInvul');
with gGameSettings do
Options := Options or GAME_OPTION_BOTVSMONSTER;
if gcDeathmatchKeys then
Options := Options or GAME_OPTION_DMKEYS;
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';
end;
section := 'GameplayNetwork';
ReadBoolean(gnMonsters, 'Monsters');
ReadString(gnBotsVS, 'BotsVS');
ReadBoolean(gnDeathmatchKeys, 'DeathmatchKeys');
ReadBoolean(gnMonsters, 'Monsters');
ReadString(gnBotsVS, 'BotsVS');
ReadBoolean(gnDeathmatchKeys, 'DeathmatchKeys');
- ReadBoolean(gnRespawnItems, 'RespawnItems');
ReadInteger(gnSpawnInvul, 'SpawnInvul');
section := 'MasterServer';
ReadInteger(gnSpawnInvul, 'SpawnInvul');
section := 'MasterServer';
config.WriteBool('GameplayCustom', 'Monsters', gcMonsters);
config.WriteStr ('GameplayCustom', 'BotsVS', gcBotsVS);
config.WriteBool('GameplayCustom', 'DeathmatchKeys', gcDeathmatchKeys);
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);
config.WriteInt ('GameplayCustom', 'SpawnInvul', gcSpawnInvul);
config.WriteStr ('GameplayNetwork', 'Map', gnMap);
config.WriteBool('GameplayNetwork', 'Monsters', gnMonsters);
config.WriteStr ('GameplayNetwork', 'BotsVS', gnBotsVS);
config.WriteBool('GameplayNetwork', 'DeathmatchKeys', gnDeathmatchKeys);
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);
config.WriteInt ('GameplayNetwork', 'SpawnInvul', gnSpawnInvul);
config.WriteStr('MasterServer', 'IP', NetSlistIP);
config.WriteBool('GameplayCustom', 'Monsters', gcMonsters);
config.WriteStr ('GameplayCustom', 'BotsVS', gcBotsVS);
config.WriteBool('GameplayCustom', 'DeathmatchKeys', gcDeathmatchKeys);
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);
config.WriteInt ('GameplayCustom', 'SpawnInvul', gcSpawnInvul);
config.SaveFile(FileName);
config.WriteBool('GameplayNetwork', 'Monsters', gnMonsters);
config.WriteStr ('GameplayNetwork', 'BotsVS', gnBotsVS);
config.WriteBool('GameplayNetwork', 'DeathmatchKeys', gnDeathmatchKeys);
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);
config.WriteInt ('GameplayNetwork', 'SpawnInvul', gnSpawnInvul);
config.SaveFile(FileName);