mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 18:18:18 +00:00
Fixed /pause not saving the time
made sv_pauseable on by default Signed-off-by: GreYFoXGTi <GreYFoXGTi@GMaiL.CoM>
This commit is contained in:
parent
76c6bc7e2f
commit
8b67e70dfb
|
@ -17,7 +17,7 @@ MACRO_CONFIG_INT(SvVoteKickBanTime,sv_vote_kick_bantime, 300, 0, 9999, CFGFLAG_S
|
||||||
MACRO_CONFIG_INT(SvVoteMapTimeDelay,sv_vote_map_delay,0,0,9999,CFGFLAG_SERVER,"how much time between map votes")
|
MACRO_CONFIG_INT(SvVoteMapTimeDelay,sv_vote_map_delay,0,0,9999,CFGFLAG_SERVER,"how much time between map votes")
|
||||||
//MACRO_CONFIG_INT(SvMaxConnections,sv_max_connections, 2, 1, 16, CFGFLAG_SERVER, "Maximum count of connection from one IP server can accept") not needed
|
//MACRO_CONFIG_INT(SvMaxConnections,sv_max_connections, 2, 1, 16, CFGFLAG_SERVER, "Maximum count of connection from one IP server can accept") not needed
|
||||||
MACRO_CONFIG_INT(SvMaxAfkTime,sv_max_afk_time, 0, 0, 9999, CFGFLAG_SERVER, "How many seconds a player is allowed to be afk, 0=disabled")
|
MACRO_CONFIG_INT(SvMaxAfkTime,sv_max_afk_time, 0, 0, 9999, CFGFLAG_SERVER, "How many seconds a player is allowed to be afk, 0=disabled")
|
||||||
MACRO_CONFIG_INT(SvPauseable, sv_pauseable, 0, 0, 1, CFGFLAG_SERVER, "players can pause their char or not")
|
MACRO_CONFIG_INT(SvPauseable, sv_pauseable, 1, 0, 1, CFGFLAG_SERVER, "players can pause their char or not")
|
||||||
MACRO_CONFIG_INT(SvCheatTime, sv_cheattime, 0, 0, 1, CFGFLAG_SERVER, "players can cheat with time or not")
|
MACRO_CONFIG_INT(SvCheatTime, sv_cheattime, 0, 0, 1, CFGFLAG_SERVER, "players can cheat with time or not")
|
||||||
MACRO_CONFIG_INT(SvHit, sv_hit, 1, 0, 1, CFGFLAG_SERVER, "players can hammer/grenade/laser one another")
|
MACRO_CONFIG_INT(SvHit, sv_hit, 1, 0, 1, CFGFLAG_SERVER, "players can hammer/grenade/laser one another")
|
||||||
MACRO_CONFIG_INT(SvTunes, sv_tunes, 1, 0, 1, CFGFLAG_SERVER, "Turns Tuning On/Off")
|
MACRO_CONFIG_INT(SvTunes, sv_tunes, 1, 0, 1, CFGFLAG_SERVER, "Turns Tuning On/Off")
|
||||||
|
|
|
@ -228,7 +228,7 @@ void CPlayer::TryRespawn()
|
||||||
|
|
||||||
void CPlayer::LoadCharacter() {
|
void CPlayer::LoadCharacter() {
|
||||||
Character->m_Core = m_PauseInfo.m_Core;
|
Character->m_Core = m_PauseInfo.m_Core;
|
||||||
Character->m_StartTime = m_PauseInfo.m_StartTime;
|
Character->m_StartTime = Server()->Tick() - (m_PauseInfo.m_PauseTime - m_PauseInfo.m_StartTime);
|
||||||
Character->m_RaceState = m_PauseInfo.m_RaceState;
|
Character->m_RaceState = m_PauseInfo.m_RaceState;
|
||||||
Character->m_RefreshTime = Server()->Tick();
|
Character->m_RefreshTime = Server()->Tick();
|
||||||
for(int i = 0; i < NUM_WEAPONS; ++i) {
|
for(int i = 0; i < NUM_WEAPONS; ++i) {
|
||||||
|
@ -282,6 +282,7 @@ void CPlayer::SaveCharacter()
|
||||||
m_PauseInfo.m_LastWeapon = Character->m_LastWeapon;
|
m_PauseInfo.m_LastWeapon = Character->m_LastWeapon;
|
||||||
m_PauseInfo.m_HammerType = Character->m_HammerType;
|
m_PauseInfo.m_HammerType = Character->m_HammerType;
|
||||||
m_PauseInfo.m_Super = Character->m_Super;
|
m_PauseInfo.m_Super = Character->m_Super;
|
||||||
|
m_PauseInfo.m_PauseTime = Server()->Tick();
|
||||||
//m_PauseInfo.m_RefreshTime = Character->m_RefreshTime;
|
//m_PauseInfo.m_RefreshTime = Character->m_RefreshTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,6 +56,7 @@ public:
|
||||||
bool m_aHasWeapon[NUM_WEAPONS];
|
bool m_aHasWeapon[NUM_WEAPONS];
|
||||||
int m_HammerType;
|
int m_HammerType;
|
||||||
bool m_Super;
|
bool m_Super;
|
||||||
|
int m_PauseTime;
|
||||||
} m_PauseInfo;
|
} m_PauseInfo;
|
||||||
void LoadCharacter();
|
void LoadCharacter();
|
||||||
void SaveCharacter();
|
void SaveCharacter();
|
||||||
|
|
Loading…
Reference in a new issue