mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
Reverted time_get use, fixed m_LocalStartTime being reset
This commit is contained in:
parent
04bf6c40cb
commit
902b6611fd
|
@ -1373,7 +1373,6 @@ void CClient::ProcessServerPacket(CNetChunk *pPacket)
|
|||
m_GameTime.Init((GameTick-1)*time_freq()/50);
|
||||
m_aSnapshots[SNAP_PREV] = m_SnapshotStorage.m_pFirst;
|
||||
m_aSnapshots[SNAP_CURRENT] = m_SnapshotStorage.m_pLast;
|
||||
m_LocalStartTime = time_get();
|
||||
SetState(IClient::STATE_ONLINE);
|
||||
DemoRecorder_HandleAutoStart();
|
||||
}
|
||||
|
|
|
@ -84,11 +84,11 @@ float CMenus::ButtonFade(CButtonContainer *pBC, float Seconds, int Checked)
|
|||
{
|
||||
if(UI()->HotItem() == pBC->GetID() || Checked)
|
||||
{
|
||||
pBC->m_FadeStartTime = time_get();
|
||||
pBC->m_FadeStartTime = Client()->LocalTime();
|
||||
return Seconds;
|
||||
}
|
||||
|
||||
return max(0.0f, (pBC->m_FadeStartTime - time_get()) / (float)time_freq() + Seconds);
|
||||
return max(0.0f, pBC->m_FadeStartTime - Client()->LocalTime() + Seconds);
|
||||
}
|
||||
|
||||
int CMenus::DoIcon(int ImageId, int SpriteId, const CUIRect *pRect)
|
||||
|
|
|
@ -35,7 +35,7 @@ public:
|
|||
class CButtonContainer
|
||||
{
|
||||
public:
|
||||
int64 m_FadeStartTime;
|
||||
float m_FadeStartTime;
|
||||
|
||||
const void *GetID() const { return &m_FadeStartTime; }
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue