- removed some unused functions from actor.cpp.

This commit is contained in:
Christoph Oelckers 2020-12-02 20:05:53 +01:00
parent 19b731bc8f
commit eee972d446
3 changed files with 2262 additions and 2288 deletions

View file

@ -2360,33 +2360,6 @@ bool IsUnderwaterSector(int nSector)
return 0;
}
// Let's better forget that this shit ever existed. It will be a lot easier to substitute player owners upon respawn, if needed.
int actOwnerIdToSpriteId(int nSprite)
{
if (nSprite == -1)
return -1;
if (nSprite & kMaxSprites)
nSprite = gPlayer[nSprite&(kMaxSprites-1)].pSprite->index;
return nSprite;
}
bool actTypeInSector(int nSector, int nType)
{
int nSprite;
SectIterator it(nSector);
while ((nSprite = it.NextIndex()) >= 0)
{
if (sprite[nSprite].index == nType)
return 1;
}
return 0;
}
void actAllocateSpares(void)
{
}
const int DudeDifficulty[5] = {
512, 384, 256, 208, 160
};
@ -2407,7 +2380,6 @@ void actInit(bool bSaveLoad)
}
#endif
int nSprite;
BloodStatIterator it(kStatItem);
while (auto act = it.Next())
{
@ -2484,14 +2456,13 @@ void actInit(bool bSaveLoad)
if (gGameOptions.nMonsterSettings == 0)
{
gKillMgr.SetCount(0);
int nSprite;
BloodStatIterator it(kStatDude);
while (auto act = it.Next())
{
spritetype *pSprite = &act->s();
if (act->hasX() && act->x().key > 0) // Drop Key
actDropObject(pSprite, kItemKeyBase + (act->x().key - 1));
DeleteSprite(nSprite);
DeleteSprite(act);
}
}
else
@ -2500,7 +2471,6 @@ void actInit(bool bSaveLoad)
///////////////
char unk[kDudeMax-kDudeBase];
memset(unk, 0, sizeof(unk));
int nSprite;
BloodStatIterator it(kStatDude);
while (auto act = it.Next())
{

View file

@ -216,8 +216,6 @@ void actDoLight(int spriteNum);
#endif
bool IsUnderwaterSector(int nSector);
bool actTypeInSector(int nSector, int nType);
void actAllocateSpares(void);
void actInit(bool bSaveLoad);
void ConcussSprite(int a1, spritetype *pSprite, int x, int y, int z, int a6);
int actWallBounceVector(int *x, int *y, int nWall, int a4);

View file

@ -89,5 +89,11 @@ public:
}
};
inline int DeleteSprite(DBloodActor* nSprite)
{
if (nSprite) return DeleteSprite(nSprite->s().index);
return 0;
}
END_BLD_NS