mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-19 07:31:03 +00:00
- Check enemy type when adding to enemy level count
Fixes count issues with respawning enemies copied from NBlood commit a6bbac4a213f6fb76a7c20b80da6b30c9ffc3064
This commit is contained in:
parent
dd1178df91
commit
ca423e15f0
6 changed files with 5 additions and 11 deletions
|
@ -155,7 +155,7 @@ void SpidBirthSeqCallback(int, DBloodActor* actor)
|
|||
{
|
||||
pDudeExtraE->birthCounter++;
|
||||
spawned->SetOwner(spawned);
|
||||
gKillMgr.AddNewKill(1);
|
||||
gKillMgr.AddKill(spawned);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -257,7 +257,7 @@ void genDudeAttack1(int, DBloodActor* actor)
|
|||
aiActivateDude(spawned);
|
||||
}
|
||||
|
||||
gKillMgr.AddNewKill(1);
|
||||
gKillMgr.AddKill(spawned);
|
||||
pExtra->slave[pExtra->slaveCount++] = spawned;
|
||||
if (!playGenDudeSound(actor, kGenDudeSndAttackNormal))
|
||||
sfxPlay3DSoundCP(actor, 379, 1, 0, 0x10000 - Random3(0x3000));
|
||||
|
@ -1954,7 +1954,7 @@ DBloodActor* genDudeSpawn(DBloodActor* source, DBloodActor* actor, int nDist)
|
|||
spawned->spr.yrepeat = source->spr.yrepeat;
|
||||
}
|
||||
|
||||
gKillMgr.AddNewKill(1);
|
||||
gKillMgr.AddKill(spawned);
|
||||
aiInitSprite(spawned);
|
||||
return spawned;
|
||||
}
|
||||
|
|
|
@ -73,11 +73,6 @@ void CKillMgr::SetCount(int nCount)
|
|||
TotalKills = nCount;
|
||||
}
|
||||
|
||||
void CKillMgr::AddNewKill(int nCount)
|
||||
{
|
||||
TotalKills += nCount;
|
||||
}
|
||||
|
||||
void CKillMgr::AddKill(DBloodActor* actor)
|
||||
{
|
||||
if (actor->spr.statnum == kStatDude && actor->spr.type != kDudeBat && actor->spr.type != kDudeRat && actor->spr.type != kDudeInnocent && actor->spr.type != kDudeBurningInnocent)
|
||||
|
|
|
@ -30,7 +30,6 @@ class CKillMgr {
|
|||
public:
|
||||
int TotalKills, Kills;
|
||||
void SetCount(int);
|
||||
void AddNewKill(int);
|
||||
void AddKill(DBloodActor* actor);
|
||||
void CountTotalKills(void);
|
||||
void Clear(void);
|
||||
|
|
|
@ -315,7 +315,7 @@ static DBloodActor* nnExtSpawnDude(DBloodActor* sourceactor, DBloodActor* origin
|
|||
|
||||
aiInitSprite(pDudeActor);
|
||||
|
||||
gKillMgr.AddNewKill(1);
|
||||
gKillMgr.AddKill(pDudeActor);
|
||||
|
||||
bool burning = IsBurningDude(pDudeActor);
|
||||
if (burning) {
|
||||
|
|
|
@ -495,7 +495,7 @@ void OperateSprite(DBloodActor* actor, EVENT event)
|
|||
{
|
||||
auto spawned = actSpawnDude(actor, actor->xspr.data1, -1, 0);
|
||||
if (spawned) {
|
||||
gKillMgr.AddNewKill(1);
|
||||
gKillMgr.AddKill(spawned);
|
||||
switch (actor->xspr.data1) {
|
||||
case kDudeBurningInnocent:
|
||||
case kDudeBurningCultist:
|
||||
|
|
Loading…
Reference in a new issue