mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-19 15:40:58 +00:00
- Blood: fixed loading of maps with tracking conditions.
These use a pointer in the DBloodActor structure, but this part wasn't cleared for sprites loaded with the map. # Conflicts: # source/games/blood/src/nnexts.cpp
This commit is contained in:
parent
01deb13694
commit
5732bb2db3
3 changed files with 4 additions and 3 deletions
|
@ -749,7 +749,7 @@ void callbackCondition(DBloodActor* actor, int)
|
||||||
XSPRITE* pXSprite = &actor->x();
|
XSPRITE* pXSprite = &actor->x();
|
||||||
if (pXSprite->isTriggered) return;
|
if (pXSprite->isTriggered) return;
|
||||||
|
|
||||||
TRCONDITION* pCond = &gCondition[pXSprite->sysData1];
|
TRCONDITION const* pCond = &gCondition[pXSprite->sysData1];
|
||||||
for (unsigned i = 0; i < pCond->length; i++) {
|
for (unsigned i = 0; i < pCond->length; i++) {
|
||||||
EVENT evn;
|
EVENT evn;
|
||||||
evn.type = pCond->obj[i].type;
|
evn.type = pCond->obj[i].type;
|
||||||
|
|
|
@ -995,6 +995,7 @@ void dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, shor
|
||||||
{
|
{
|
||||||
sprite[i].cstat &= ~0x30;
|
sprite[i].cstat &= ~0x30;
|
||||||
}
|
}
|
||||||
|
bloodActors[i].Clear();
|
||||||
}
|
}
|
||||||
unsigned int nCRC = fr.ReadUInt32();
|
unsigned int nCRC = fr.ReadUInt32();
|
||||||
|
|
||||||
|
|
|
@ -498,7 +498,7 @@ void nnExtResetGlobals()
|
||||||
for (int i = 0; i < gTrackingCondsCount; i++)
|
for (int i = 0; i < gTrackingCondsCount; i++)
|
||||||
{
|
{
|
||||||
TRCONDITION* pCond = &gCondition[i];
|
TRCONDITION* pCond = &gCondition[i];
|
||||||
for (unsigned k = 0; k < pCond->length; k++)
|
for (unsigned k = 0; k < kMaxTracedObjects; k++)
|
||||||
{
|
{
|
||||||
pCond->obj[k].actor = nullptr;
|
pCond->obj[k].actor = nullptr;
|
||||||
pCond->obj[k].index_ = pCond->obj[k].cmd = 0;
|
pCond->obj[k].index_ = pCond->obj[k].cmd = 0;
|
||||||
|
@ -1150,7 +1150,7 @@ void nnExtProcessSuperSprites()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < gTrackingCondsCount; i++)
|
for (int i = 0; i < gTrackingCondsCount; i++)
|
||||||
{
|
{
|
||||||
TRCONDITION* pCond = &gCondition[i];
|
TRCONDITION const* pCond = &gCondition[i];
|
||||||
XSPRITE* pXCond = &pCond->actor->x();
|
XSPRITE* pXCond = &pCond->actor->x();
|
||||||
if (pXCond->locked || pXCond->isTriggered || ++pXCond->busy < pXCond->busyTime)
|
if (pXCond->locked || pXCond->isTriggered || ++pXCond->busy < pXCond->busyTime)
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue