1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-06-26 02:37:36 +00:00

Fix CCarGenerator Load/Save

This commit is contained in:
Sergeanur 2019-10-10 17:18:19 +03:00
parent 101192dd32
commit aa173a454c
2 changed files with 4 additions and 4 deletions

View file

@ -187,7 +187,7 @@ bool CCarGenerator::CheckIfWithinRangeOfAnyPlayer()
return DotProduct2D(direction, FindPlayerSpeed()) <= 0; return DotProduct2D(direction, FindPlayerSpeed()) <= 0;
} }
void CCarGenerator::Save(uint8 *buffer) void CCarGenerator::Save(uint8 *&buffer)
{ {
WriteSaveBuf(buffer, m_nModelIndex); WriteSaveBuf(buffer, m_nModelIndex);
WriteSaveBuf(buffer, m_vecPos); WriteSaveBuf(buffer, m_vecPos);
@ -214,7 +214,7 @@ void CCarGenerator::Save(uint8 *buffer)
} }
void CCarGenerator::Load(uint8 *buffer) void CCarGenerator::Load(uint8 *&buffer)
{ {
m_nModelIndex = ReadSaveBuf<uint32>(buffer); m_nModelIndex = ReadSaveBuf<uint32>(buffer);
m_vecPos = ReadSaveBuf<CVector>(buffer); m_vecPos = ReadSaveBuf<CVector>(buffer);

View file

@ -34,8 +34,8 @@ public:
void Setup(float x, float y, float z, float angle, int32 mi, int16 color1, int16 color2, uint8 force, uint8 alarm, uint8 lock, uint16 min_delay, uint16 max_delay); void Setup(float x, float y, float z, float angle, int32 mi, int16 color1, int16 color2, uint8 force, uint8 alarm, uint8 lock, uint16 min_delay, uint16 max_delay);
bool CheckForBlockage(); bool CheckForBlockage();
bool CheckIfWithinRangeOfAnyPlayer(); bool CheckIfWithinRangeOfAnyPlayer();
void Save(uint8*); void Save(uint8*&);
void Load(uint8*); void Load(uint8*&);
void SetUsesRemaining(uint16 uses) { m_nUsesRemaining = uses; } void SetUsesRemaining(uint16 uses) { m_nUsesRemaining = uses; }
}; };