mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Use bool
instead of int
This commit is contained in:
parent
1333ac34f4
commit
9b68b9deef
|
@ -218,7 +218,7 @@ enum
|
|||
CHUNKTYPE_DELTA = 3,
|
||||
};
|
||||
|
||||
void CDemoRecorder::WriteTickMarker(int Tick, int Keyframe)
|
||||
void CDemoRecorder::WriteTickMarker(int Tick, bool Keyframe)
|
||||
{
|
||||
if(m_LastTickMarker == -1 || Tick - m_LastTickMarker > CHUNKMASK_TICK || Keyframe)
|
||||
{
|
||||
|
@ -298,7 +298,7 @@ void CDemoRecorder::RecordSnapshot(int Tick, const void *pData, int Size)
|
|||
if(m_LastKeyFrame == -1 || (Tick - m_LastKeyFrame) > SERVER_TICK_SPEED * 5)
|
||||
{
|
||||
// write full tickmarker
|
||||
WriteTickMarker(Tick, 1);
|
||||
WriteTickMarker(Tick, true);
|
||||
|
||||
// write snapshot
|
||||
Write(CHUNKTYPE_SNAPSHOT, pData, Size);
|
||||
|
@ -313,7 +313,7 @@ void CDemoRecorder::RecordSnapshot(int Tick, const void *pData, int Size)
|
|||
int DeltaSize;
|
||||
|
||||
// write tickmarker
|
||||
WriteTickMarker(Tick, 0);
|
||||
WriteTickMarker(Tick, false);
|
||||
|
||||
DeltaSize = m_pSnapshotDelta->CreateDelta((CSnapshot *)m_aLastSnapshotData, (CSnapshot *)pData, &aDeltaData);
|
||||
if(DeltaSize)
|
||||
|
|
|
@ -33,7 +33,7 @@ class CDemoRecorder : public IDemoRecorder
|
|||
DEMOFUNC_FILTER m_pfnFilter;
|
||||
void *m_pUser;
|
||||
|
||||
void WriteTickMarker(int Tick, int Keyframe);
|
||||
void WriteTickMarker(int Tick, bool Keyframe);
|
||||
void Write(int Type, const void *pData, int Size);
|
||||
|
||||
public:
|
||||
|
|
Loading…
Reference in a new issue