mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-14 08:30:50 +00:00
- server CVARs can be changed only by settings controller
Initially, settings controller flag was false by default It was not touched during construction and destruction of player_t instances though Now, with all members initialized in class definition, this flag must be saved and restored manually https://forum.zdoom.org/viewtopic.php?t=62830
This commit is contained in:
parent
f0ce453d47
commit
8a4b8cc2ca
2 changed files with 3 additions and 1 deletions
|
@ -453,7 +453,7 @@ public:
|
||||||
TObjPtr<AActor*> MUSINFOactor = nullptr; // For MUSINFO purposes
|
TObjPtr<AActor*> MUSINFOactor = nullptr; // For MUSINFO purposes
|
||||||
int8_t MUSINFOtics = 0;
|
int8_t MUSINFOtics = 0;
|
||||||
|
|
||||||
bool settings_controller = true; // Player can control game settings.
|
bool settings_controller = false; // Player can control game settings.
|
||||||
int8_t crouching = 0;
|
int8_t crouching = 0;
|
||||||
int8_t crouchdir = 0;
|
int8_t crouchdir = 0;
|
||||||
|
|
||||||
|
|
|
@ -1285,6 +1285,7 @@ void G_PlayerReborn (int player)
|
||||||
log = p->LogText;
|
log = p->LogText;
|
||||||
chasecam = p->cheats & CF_CHASECAM;
|
chasecam = p->cheats & CF_CHASECAM;
|
||||||
Bot = p->Bot; //Added by MC:
|
Bot = p->Bot; //Added by MC:
|
||||||
|
const bool settings_controller = p->settings_controller;
|
||||||
|
|
||||||
// Reset player structure to its defaults
|
// Reset player structure to its defaults
|
||||||
p->~player_t();
|
p->~player_t();
|
||||||
|
@ -1303,6 +1304,7 @@ void G_PlayerReborn (int player)
|
||||||
p->LogText = log;
|
p->LogText = log;
|
||||||
p->cheats |= chasecam;
|
p->cheats |= chasecam;
|
||||||
p->Bot = Bot; //Added by MC:
|
p->Bot = Bot; //Added by MC:
|
||||||
|
p->settings_controller = settings_controller;
|
||||||
|
|
||||||
p->oldbuttons = ~0, p->attackdown = true; p->usedown = true; // don't do anything immediately
|
p->oldbuttons = ~0, p->attackdown = true; p->usedown = true; // don't do anything immediately
|
||||||
p->original_oldbuttons = ~0;
|
p->original_oldbuttons = ~0;
|
||||||
|
|
Loading…
Reference in a new issue