Use bool instead of int

This commit is contained in:
Robert Müller 2023-10-15 15:00:59 +02:00
parent 1333ac34f4
commit 9b68b9deef
2 changed files with 4 additions and 4 deletions

View file

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

View file

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