mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 11:40:44 +00:00
Fix explode trigger seq counter randomization
This commit is contained in:
parent
51a24b3413
commit
c783ecbf22
1 changed files with 18 additions and 18 deletions
|
@ -1859,7 +1859,24 @@ int BuildObject(short nSprite, int nOjectType, int nHitag)
|
||||||
|
|
||||||
short nSeq = ObjectSeq[nOjectType];
|
short nSeq = ObjectSeq[nOjectType];
|
||||||
|
|
||||||
if (nSeq <= -1)
|
if (nSeq > -1)
|
||||||
|
{
|
||||||
|
ObjectList[nObject].field_8 = SeqOffsets[nSeq];
|
||||||
|
|
||||||
|
if (!nOjectType) // if not Explosion Trigger (e.g. Exploding Fire Cauldron)
|
||||||
|
{
|
||||||
|
ObjectList[nObject].field_0 = RandomSize(4) % (SeqSize[ObjectList[nObject].field_8] - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
int nSprite2 = insertsprite(sprite[nSprite].sectnum, 0);
|
||||||
|
ObjectList[nObject].field_10 = nSprite2;
|
||||||
|
|
||||||
|
sprite[nSprite2].cstat = 0x8000;
|
||||||
|
sprite[nSprite2].x = sprite[nSprite].x;
|
||||||
|
sprite[nSprite2].y = sprite[nSprite].y;
|
||||||
|
sprite[nSprite2].z = sprite[nSprite].z;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
ObjectList[nObject].field_0 = 0;
|
ObjectList[nObject].field_0 = 0;
|
||||||
ObjectList[nObject].field_8 = -1;
|
ObjectList[nObject].field_8 = -1;
|
||||||
|
@ -1871,23 +1888,6 @@ int BuildObject(short nSprite, int nOjectType, int nHitag)
|
||||||
ObjectList[nObject].field_10 = -nHitag;
|
ObjectList[nObject].field_10 = -nHitag;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
ObjectList[nObject].field_8 = SeqOffsets[nSeq];
|
|
||||||
|
|
||||||
if (!nOjectType) // if not Explosion Trigger (e.g. Exploding Fire Cauldron)
|
|
||||||
{
|
|
||||||
ObjectList[nObject].field_0 = RandomSize(4) % (SeqSize[nSeq] - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
int nSprite2 = insertsprite(sprite[nSprite].sectnum, 0);
|
|
||||||
ObjectList[nObject].field_10 = nSprite2;
|
|
||||||
|
|
||||||
sprite[nSprite2].cstat = 0x8000;
|
|
||||||
sprite[nSprite2].x = sprite[nSprite].x;
|
|
||||||
sprite[nSprite2].y = sprite[nSprite].y;
|
|
||||||
sprite[nSprite2].z = sprite[nSprite].z;
|
|
||||||
}
|
|
||||||
|
|
||||||
return nObject | 0x170000;
|
return nObject | 0x170000;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue