mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-14 03:58:18 +00:00
Saving hitting status on pause
This commit is contained in:
parent
344944c9d4
commit
831aea796e
|
@ -358,6 +358,7 @@ void CPlayer::LoadCharacter()
|
||||||
m_pCharacter->m_EndlessHook = m_PauseInfo.m_EndlessHook;
|
m_pCharacter->m_EndlessHook = m_PauseInfo.m_EndlessHook;
|
||||||
m_pCharacter->m_TeleCheckpoint = m_PauseInfo.m_TeleCheckpoint;
|
m_pCharacter->m_TeleCheckpoint = m_PauseInfo.m_TeleCheckpoint;
|
||||||
m_pCharacter->m_CpActive = m_PauseInfo.m_CpActive;
|
m_pCharacter->m_CpActive = m_PauseInfo.m_CpActive;
|
||||||
|
m_pCharacter->m_Hit = m_PauseInfo.m_Hit;
|
||||||
for(int i = 0; i < NUM_CHECKPOINTS; i++)
|
for(int i = 0; i < NUM_CHECKPOINTS; i++)
|
||||||
m_pCharacter->m_CpCurrent[i] = m_PauseInfo.m_CpCurrent[i];
|
m_pCharacter->m_CpCurrent[i] = m_PauseInfo.m_CpCurrent[i];
|
||||||
((CGameControllerDDRace*)GameServer()->m_pController)->m_Teams.m_Core.Team(GetCID(), m_PauseInfo.m_Team);
|
((CGameControllerDDRace*)GameServer()->m_pController)->m_Teams.m_Core.Team(GetCID(), m_PauseInfo.m_Team);
|
||||||
|
@ -385,6 +386,7 @@ void CPlayer::SaveCharacter()
|
||||||
m_PauseInfo.m_PauseTime = Server()->Tick();
|
m_PauseInfo.m_PauseTime = Server()->Tick();
|
||||||
m_PauseInfo.m_TeleCheckpoint = m_pCharacter->m_TeleCheckpoint;
|
m_PauseInfo.m_TeleCheckpoint = m_pCharacter->m_TeleCheckpoint;
|
||||||
m_PauseInfo.m_CpActive = m_pCharacter->m_CpActive;
|
m_PauseInfo.m_CpActive = m_pCharacter->m_CpActive;
|
||||||
|
m_PauseInfo.m_Hit = m_pCharacter->m_Hit;
|
||||||
for(int i = 0; i < NUM_CHECKPOINTS; i++)
|
for(int i = 0; i < NUM_CHECKPOINTS; i++)
|
||||||
m_PauseInfo.m_CpCurrent[i] = m_pCharacter->m_CpCurrent[i];
|
m_PauseInfo.m_CpCurrent[i] = m_pCharacter->m_CpCurrent[i];
|
||||||
//m_PauseInfo.m_RefreshTime = m_pCharacter->m_RefreshTime;
|
//m_PauseInfo.m_RefreshTime = m_pCharacter->m_RefreshTime;
|
||||||
|
|
|
@ -133,6 +133,7 @@ public:
|
||||||
int m_TeleCheckpoint;
|
int m_TeleCheckpoint;
|
||||||
int m_CpActive;
|
int m_CpActive;
|
||||||
float m_CpCurrent[25];
|
float m_CpCurrent[25];
|
||||||
|
int m_Hit;
|
||||||
} m_PauseInfo;
|
} m_PauseInfo;
|
||||||
int m_ForcePauseTime;
|
int m_ForcePauseTime;
|
||||||
bool m_InfoSaved;
|
bool m_InfoSaved;
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
#ifndef GAME_VERSION_H
|
#ifndef GAME_VERSION_H
|
||||||
#define GAME_VERSION_H
|
#define GAME_VERSION_H
|
||||||
#include "generated/nethash.cpp"
|
#include "generated/nethash.cpp"
|
||||||
#define GAME_VERSION "0.6 trunk, 1.082a"
|
#define GAME_VERSION "0.6 trunk, 1.083a"
|
||||||
#define GAME_NETVERSION "0.6 626fce9a778df4d4"
|
#define GAME_NETVERSION "0.6 626fce9a778df4d4"
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue