mirror of
https://gitlab.com/skmp/dca3-game.git
synced 2025-09-24 21:31:35 +02:00
Add missed lines allocation
This commit is contained in:
@@ -52,6 +52,10 @@
|
||||
#include "Wanted.h"
|
||||
#include "SaveBuf.h"
|
||||
|
||||
void* obj_alloc(size_t size, void** storage);
|
||||
void obj_free(void* ptr);
|
||||
void* obj_move(void* ptr);
|
||||
|
||||
bool bAllCarCheat;
|
||||
|
||||
RwObject *GetCurrentAtomicObjectCB(RwObject *object, void *data);
|
||||
@@ -194,7 +198,7 @@ CAutomobile::CAutomobile(int32 id, uint8 CreatedBy)
|
||||
|
||||
CColModel *colModel = mi->GetColModel();
|
||||
if(colModel->lines == nil){
|
||||
colModel->lines = (CColLine*)RwMalloc(4*sizeof(CColLine));
|
||||
colModel->lines = (CColLine*)obj_alloc(4*sizeof(CColLine), (void**)&colModel->lines);
|
||||
colModel->numLines = 4;
|
||||
}
|
||||
|
||||
|
@@ -38,6 +38,10 @@
|
||||
#include "Debug.h"
|
||||
#include "SaveBuf.h"
|
||||
|
||||
void* obj_alloc(size_t size, void** storage);
|
||||
void obj_free(void* ptr);
|
||||
void* obj_move(void* ptr);
|
||||
|
||||
const uint32 CBike::nSaveStructSize =
|
||||
#ifdef COMPATIBLE_SAVES
|
||||
1260;
|
||||
@@ -163,7 +167,7 @@ CBike::CBike(int32 id, uint8 CreatedBy)
|
||||
|
||||
CColModel *colModel = mi->GetColModel();
|
||||
if(colModel->lines == nil){
|
||||
colModel->lines = (CColLine*)RwMalloc(4*sizeof(CColLine));
|
||||
colModel->lines = (CColLine*)obj_alloc(4*sizeof(CColLine), (void**)&colModel->lines);
|
||||
colModel->numLines = 4;
|
||||
}
|
||||
// BUG? this would make more sense in the if above
|
||||
|
Reference in New Issue
Block a user