mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 00:41:55 +00:00
- fixed compilation.
This commit is contained in:
parent
1839634d79
commit
3419d6a901
3 changed files with 25 additions and 10 deletions
|
@ -241,6 +241,8 @@ int MoveCreature(short nSprite);
|
|||
int MoveCreatureWithCaution(int nSprite);
|
||||
void WheresMyMouth(int nPlayer, int *x, int *y, int *z, short *sectnum);
|
||||
int GetSpriteHeight(int nSprite);
|
||||
int GetActorHeight(DExhumedActor* nSprite);
|
||||
DExhumedActor* insertActor(int, int);
|
||||
DExhumedActor* GrabBody();
|
||||
DExhumedActor* GrabBodyGunSprite();
|
||||
void CreatePushBlock(int nSector);
|
||||
|
|
|
@ -521,6 +521,18 @@ int GetSpriteHeight(int nSprite)
|
|||
return tileHeight(pSprite->picnum) * pSprite->yrepeat * 4;
|
||||
}
|
||||
|
||||
int GetActorHeight(DExhumedActor* actor)
|
||||
{
|
||||
return tileHeight(actor->s().picnum) * actor->s().yrepeat * 4;
|
||||
}
|
||||
|
||||
DExhumedActor* insertActor(int sect, int stat)
|
||||
{
|
||||
int ndx = insertsprite(sect, stat);
|
||||
return ndx >= 0 ? &exhumedActors[ndx] : nullptr;
|
||||
}
|
||||
|
||||
|
||||
int movesprite(short nSprite, int dx, int dy, int dz, int, int flordist, unsigned int clipmask)
|
||||
{
|
||||
spritetype *pSprite = &sprite[nSprite];
|
||||
|
@ -1308,7 +1320,7 @@ void WheresMyMouth(int nPlayer, int *x, int *y, int *z, short *sectnum)
|
|||
*x = pSprite->x;
|
||||
*y = pSprite->y;
|
||||
|
||||
int height = GetSpriteHeight(pActor) / 2;
|
||||
int height = GetActorHeight(pActor) / 2;
|
||||
|
||||
*z = pSprite->z - height;
|
||||
*sectnum = pSprite->sectnum;
|
||||
|
@ -1433,12 +1445,12 @@ int BuildCreatureChunk(int nVal, int nPic)
|
|||
{
|
||||
int var_14;
|
||||
|
||||
int nSprite = GrabChunkSprite();
|
||||
auto actor = GrabChunkSprite();
|
||||
|
||||
if (nSprite == -1) {
|
||||
if (actor == nullptr) {
|
||||
return -1;
|
||||
}
|
||||
auto pSprite = &sprite[nSprite];
|
||||
auto pSprite = &actor->s();
|
||||
|
||||
if (nVal & 0x4000)
|
||||
{
|
||||
|
@ -1456,7 +1468,7 @@ int BuildCreatureChunk(int nVal, int nPic)
|
|||
pSprite->y = sprite[nVal].y;
|
||||
pSprite->z = sprite[nVal].z;
|
||||
|
||||
mychangespritesect(nSprite, sprite[nVal].sectnum);
|
||||
mychangespritesect(actor->GetSpriteIndex(), sprite[nVal].sectnum);
|
||||
|
||||
pSprite->cstat = 0x80;
|
||||
pSprite->shade = -12;
|
||||
|
@ -1484,10 +1496,10 @@ int BuildCreatureChunk(int nVal, int nPic)
|
|||
// GrabTimeSlot(3);
|
||||
|
||||
pSprite->extra = -1;
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, nSprite, 0xD0000);
|
||||
pSprite->hitag = runlist_AddRunRec(NewRun, nSprite, 0xD0000);
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, actor->GetSpriteIndex(), 0xD0000);
|
||||
pSprite->hitag = runlist_AddRunRec(NewRun, actor->GetSpriteIndex(), 0xD0000);
|
||||
|
||||
return nSprite | 0xD0000;
|
||||
return actor->GetSpriteIndex();
|
||||
}
|
||||
|
||||
void AICreatureChunk::Tick(RunListEvent* ev)
|
||||
|
|
|
@ -279,8 +279,9 @@ void RestartPlayer(short nPlayer)
|
|||
}
|
||||
}
|
||||
|
||||
nSprite = GrabBody();
|
||||
nSpr = &sprite[nSprite];
|
||||
auto actor = GrabBody();
|
||||
nSprite = actor->GetSpriteIndex();
|
||||
nSpr = &actor->s();
|
||||
|
||||
mychangespritesect(nSprite, sPlayerSave[nPlayer].nSector);
|
||||
changespritestat(nSprite, 100);
|
||||
|
|
Loading…
Reference in a new issue