From af7573ddbe38e0aaa485877e7ccb2e704b0f5a7f Mon Sep 17 00:00:00 2001 From: erorcun Date: Sat, 26 Jun 2021 00:25:59 +0300 Subject: Revert "Redo ReadSaveBuf + common.h cleanup" This reverts commit 2b67aba94cb6448fb24c869559465eddf2bad069. --- src/entities/Entity.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/entities/Entity.cpp') diff --git a/src/entities/Entity.cpp b/src/entities/Entity.cpp index a7f4bd45..9d5bf73c 100644 --- a/src/entities/Entity.cpp +++ b/src/entities/Entity.cpp @@ -22,7 +22,6 @@ #include "MemoryHeap.h" #include "Bones.h" #include "Debug.h" -#include "SaveBuf.h" int gBuildings; @@ -754,8 +753,7 @@ CEntity::SaveEntityFlags(uint8*& buf) void CEntity::LoadEntityFlags(uint8*& buf) { - uint32 tmp; - ReadSaveBuf(&tmp, buf); + uint32 tmp = ReadSaveBuf(buf); m_type = (tmp & ((BIT(3) - 1))); m_status = ((tmp >> 3) & (BIT(5) - 1)); @@ -786,7 +784,7 @@ CEntity::LoadEntityFlags(uint8*& buf) bZoneCulled = !!(tmp & BIT(30)); bZoneCulled2 = !!(tmp & BIT(31)); - ReadSaveBuf(&tmp, buf); + tmp = ReadSaveBuf(buf); bRemoveFromWorld = !!(tmp & BIT(0)); bHasHitWall = !!(tmp & BIT(1)); -- cgit v1.2.3