Reverted time_get use, fixed m_LocalStartTime being reset

This commit is contained in:
LordSk 2018-11-16 18:52:15 +01:00
parent 04bf6c40cb
commit 902b6611fd
3 changed files with 3 additions and 4 deletions

View file

@ -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();
}

View file

@ -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)

View file

@ -35,7 +35,7 @@ public:
class CButtonContainer
{
public:
int64 m_FadeStartTime;
float m_FadeStartTime;
const void *GetID() const { return &m_FadeStartTime; }
};