mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-20 18:52:43 +00:00
- clear some data on init.
This commit is contained in:
parent
8dde6a3074
commit
1d371b8cbf
3 changed files with 5 additions and 0 deletions
|
@ -46,6 +46,7 @@ public:
|
|||
enum { count = size };
|
||||
void Clear()
|
||||
{
|
||||
memset(DataList, 0, sizeof(DataList));
|
||||
freecount = size;
|
||||
for (int i = 0; i < size; i++)
|
||||
{
|
||||
|
@ -61,6 +62,8 @@ public:
|
|||
|
||||
void Release(int i)
|
||||
{
|
||||
// Important: This must not clear the released objects because several
|
||||
// linked list loops are written to access the 'next' field after the Release call!
|
||||
FreeList[freecount++] = i;
|
||||
}
|
||||
|
||||
|
|
|
@ -539,6 +539,7 @@ loc_1868A:
|
|||
{
|
||||
nLastFlash = edi;
|
||||
}
|
||||
pFlash->pActor = nullptr;
|
||||
sFlash.Release(nFlash);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -801,6 +801,7 @@ int GetUpAngle(DExhumedActor* pActor1, int nVal, DExhumedActor* pActor2, int ecx
|
|||
void InitPushBlocks()
|
||||
{
|
||||
nPushBlocks = 0;
|
||||
memset(sBlockInfo, 0, sizeof(sBlockInfo));
|
||||
}
|
||||
|
||||
int GrabPushBlock()
|
||||
|
|
Loading…
Reference in a new issue