mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- Exhumed: Set opos for all dynamically spawned sprites.
Fixes #253 Let's hope this covers everything, the code is a bit scattered...
This commit is contained in:
parent
ba5ede65b8
commit
e470c59263
8 changed files with 13 additions and 0 deletions
|
@ -118,6 +118,7 @@ int BuildAnim(int nSprite, int val, int val2, int x, int y, int z, int nSector,
|
||||||
sprite[nSprite].xvel = 0;
|
sprite[nSprite].xvel = 0;
|
||||||
sprite[nSprite].yvel = 0;
|
sprite[nSprite].yvel = 0;
|
||||||
sprite[nSprite].zvel = 0;
|
sprite[nSprite].zvel = 0;
|
||||||
|
sprite[nSprite].backuppos();
|
||||||
|
|
||||||
// CHECKME - where is hitag set otherwise?
|
// CHECKME - where is hitag set otherwise?
|
||||||
if (sprite[nSprite].statnum < 900) {
|
if (sprite[nSprite].statnum < 900) {
|
||||||
|
|
|
@ -146,6 +146,7 @@ int BuildBubble(int x, int y, int z, short nSector)
|
||||||
sprite[nSprite].hitag = -1;
|
sprite[nSprite].hitag = -1;
|
||||||
sprite[nSprite].extra = -1;
|
sprite[nSprite].extra = -1;
|
||||||
sprite[nSprite].lotag = runlist_HeadRun() + 1;
|
sprite[nSprite].lotag = runlist_HeadRun() + 1;
|
||||||
|
sprite[nSprite].backuppos();
|
||||||
|
|
||||||
// GrabTimeSlot(3);
|
// GrabTimeSlot(3);
|
||||||
|
|
||||||
|
|
|
@ -691,6 +691,7 @@ int BuildBullet(short nSprite, int nType, int, int, int val1, int nAngle, int va
|
||||||
pBullet->field_8 = runlist_AddRunRec(NewRun, nBullet | 0xB0000);
|
pBullet->field_8 = runlist_AddRunRec(NewRun, nBullet | 0xB0000);
|
||||||
pBullet->field_13 = val3;
|
pBullet->field_13 = val3;
|
||||||
sprite[nBulletSprite].z += val1;
|
sprite[nBulletSprite].z += val1;
|
||||||
|
sprite[nBulletSprite].backuppos();
|
||||||
|
|
||||||
int var_18;
|
int var_18;
|
||||||
|
|
||||||
|
|
|
@ -566,6 +566,7 @@ void mydeletesprite(int nSprite)
|
||||||
soundEngine->RelinkSound(SOURCE_Actor, &sprite[nSprite], nullptr, &pos);
|
soundEngine->RelinkSound(SOURCE_Actor, &sprite[nSprite], nullptr, &pos);
|
||||||
|
|
||||||
deletesprite(nSprite);
|
deletesprite(nSprite);
|
||||||
|
sprite[nSprite].ox = 0x80000000;
|
||||||
|
|
||||||
if (nSprite == besttarget) {
|
if (nSprite == besttarget) {
|
||||||
besttarget = -1;
|
besttarget = -1;
|
||||||
|
|
|
@ -188,6 +188,7 @@ int BuildGrenade(int nPlayer)
|
||||||
sprite[nSprite].hitag = 0;
|
sprite[nSprite].hitag = 0;
|
||||||
sprite[nSprite].lotag = runlist_HeadRun() + 1;
|
sprite[nSprite].lotag = runlist_HeadRun() + 1;
|
||||||
sprite[nSprite].extra = -1;
|
sprite[nSprite].extra = -1;
|
||||||
|
sprite[nSprite].backuppos();
|
||||||
|
|
||||||
// GrabTimeSlot(3);
|
// GrabTimeSlot(3);
|
||||||
|
|
||||||
|
|
|
@ -1117,6 +1117,7 @@ int BuildSlide(int nChannel, int nStartWall, int nWall1, int ecx, int nWall2, in
|
||||||
sprite[nSprite].x = wall[nStartWall].x;
|
sprite[nSprite].x = wall[nStartWall].x;
|
||||||
sprite[nSprite].y = wall[nStartWall].y;
|
sprite[nSprite].y = wall[nStartWall].y;
|
||||||
sprite[nSprite].z = sector[nSector].floorz;
|
sprite[nSprite].z = sector[nSector].floorz;
|
||||||
|
sprite[nSprite].backuppos();
|
||||||
|
|
||||||
SlideData[nSlide].field_8a = 0;
|
SlideData[nSlide].field_8a = 0;
|
||||||
|
|
||||||
|
@ -1363,6 +1364,8 @@ int BuildTrap(int nSprite, int edx, int ebx, int ecx)
|
||||||
ecx++;
|
ecx++;
|
||||||
nWall++;
|
nWall++;
|
||||||
}
|
}
|
||||||
|
sprite[nSprite].backuppos();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FuncTrap(int a, int, int nRun)
|
void FuncTrap(int a, int, int nRun)
|
||||||
|
@ -1545,6 +1548,7 @@ int BuildSpark(int nSprite, int nVal)
|
||||||
spr->lotag = runlist_HeadRun() + 1;
|
spr->lotag = runlist_HeadRun() + 1;
|
||||||
spr->clipdist = 1;
|
spr->clipdist = 1;
|
||||||
spr->hitag = 0;
|
spr->hitag = 0;
|
||||||
|
spr->backuppos();
|
||||||
|
|
||||||
// GrabTimeSlot(3);
|
// GrabTimeSlot(3);
|
||||||
|
|
||||||
|
@ -1754,6 +1758,7 @@ int BuildEnergyBlock(short nSector)
|
||||||
spr->lotag = runlist_HeadRun() + 1;
|
spr->lotag = runlist_HeadRun() + 1;
|
||||||
spr->hitag = 0;
|
spr->hitag = 0;
|
||||||
spr->owner = runlist_AddRunRec(spr->lotag - 1, nSprite | 0x250000);
|
spr->owner = runlist_AddRunRec(spr->lotag - 1, nSprite | 0x250000);
|
||||||
|
spr->backuppos();
|
||||||
|
|
||||||
nEnergyBlocks++;
|
nEnergyBlocks++;
|
||||||
|
|
||||||
|
@ -2025,6 +2030,7 @@ int BuildObject(int const nSprite, int nOjectType, int nHitag)
|
||||||
ObjectList[nObject].field_10 = -nHitag;
|
ObjectList[nObject].field_10 = -nHitag;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
spr->backuppos();
|
||||||
|
|
||||||
return nObject | 0x170000;
|
return nObject | 0x170000;
|
||||||
}
|
}
|
||||||
|
|
|
@ -454,6 +454,7 @@ int BuildQueenEgg(short nQueen, int nVal)
|
||||||
sprite[nSprite2].shade = -12;
|
sprite[nSprite2].shade = -12;
|
||||||
sprite[nSprite2].picnum = 1;
|
sprite[nSprite2].picnum = 1;
|
||||||
sprite[nSprite2].ang = (RandomSize(9) + (nAngle - 256)) & kAngleMask;
|
sprite[nSprite2].ang = (RandomSize(9) + (nAngle - 256)) & kAngleMask;
|
||||||
|
sprite[nSprite2].backuppos();
|
||||||
|
|
||||||
if (!nVal)
|
if (!nVal)
|
||||||
{
|
{
|
||||||
|
|
|
@ -225,6 +225,7 @@ int BuildSnake(short nPlayer, short zVal)
|
||||||
sprite[nSprite].hitag = 0;
|
sprite[nSprite].hitag = 0;
|
||||||
sprite[nSprite].extra = -1;
|
sprite[nSprite].extra = -1;
|
||||||
sprite[nSprite].lotag = runlist_HeadRun() + 1;
|
sprite[nSprite].lotag = runlist_HeadRun() + 1;
|
||||||
|
sprite[nSprite].backuppos();
|
||||||
|
|
||||||
SnakeList[nSnake].nSprites[i] = nSprite;
|
SnakeList[nSnake].nSprites[i] = nSprite;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue