mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-07 15:31:11 +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++;
|
pDudeExtraE->birthCounter++;
|
||||||
spawned->SetOwner(spawned);
|
spawned->SetOwner(spawned);
|
||||||
gKillMgr.AddNewKill(1);
|
gKillMgr.AddKill(spawned);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -257,7 +257,7 @@ void genDudeAttack1(int, DBloodActor* actor)
|
||||||
aiActivateDude(spawned);
|
aiActivateDude(spawned);
|
||||||
}
|
}
|
||||||
|
|
||||||
gKillMgr.AddNewKill(1);
|
gKillMgr.AddKill(spawned);
|
||||||
pExtra->slave[pExtra->slaveCount++] = spawned;
|
pExtra->slave[pExtra->slaveCount++] = spawned;
|
||||||
if (!playGenDudeSound(actor, kGenDudeSndAttackNormal))
|
if (!playGenDudeSound(actor, kGenDudeSndAttackNormal))
|
||||||
sfxPlay3DSoundCP(actor, 379, 1, 0, 0x10000 - Random3(0x3000));
|
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;
|
spawned->spr.yrepeat = source->spr.yrepeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
gKillMgr.AddNewKill(1);
|
gKillMgr.AddKill(spawned);
|
||||||
aiInitSprite(spawned);
|
aiInitSprite(spawned);
|
||||||
return spawned;
|
return spawned;
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,11 +73,6 @@ void CKillMgr::SetCount(int nCount)
|
||||||
TotalKills = nCount;
|
TotalKills = nCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CKillMgr::AddNewKill(int nCount)
|
|
||||||
{
|
|
||||||
TotalKills += nCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CKillMgr::AddKill(DBloodActor* actor)
|
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)
|
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:
|
public:
|
||||||
int TotalKills, Kills;
|
int TotalKills, Kills;
|
||||||
void SetCount(int);
|
void SetCount(int);
|
||||||
void AddNewKill(int);
|
|
||||||
void AddKill(DBloodActor* actor);
|
void AddKill(DBloodActor* actor);
|
||||||
void CountTotalKills(void);
|
void CountTotalKills(void);
|
||||||
void Clear(void);
|
void Clear(void);
|
||||||
|
|
|
@ -315,7 +315,7 @@ static DBloodActor* nnExtSpawnDude(DBloodActor* sourceactor, DBloodActor* origin
|
||||||
|
|
||||||
aiInitSprite(pDudeActor);
|
aiInitSprite(pDudeActor);
|
||||||
|
|
||||||
gKillMgr.AddNewKill(1);
|
gKillMgr.AddKill(pDudeActor);
|
||||||
|
|
||||||
bool burning = IsBurningDude(pDudeActor);
|
bool burning = IsBurningDude(pDudeActor);
|
||||||
if (burning) {
|
if (burning) {
|
||||||
|
|
|
@ -495,7 +495,7 @@ void OperateSprite(DBloodActor* actor, EVENT event)
|
||||||
{
|
{
|
||||||
auto spawned = actSpawnDude(actor, actor->xspr.data1, -1, 0);
|
auto spawned = actSpawnDude(actor, actor->xspr.data1, -1, 0);
|
||||||
if (spawned) {
|
if (spawned) {
|
||||||
gKillMgr.AddNewKill(1);
|
gKillMgr.AddKill(spawned);
|
||||||
switch (actor->xspr.data1) {
|
switch (actor->xspr.data1) {
|
||||||
case kDudeBurningInnocent:
|
case kDudeBurningInnocent:
|
||||||
case kDudeBurningCultist:
|
case kDudeBurningCultist:
|
||||||
|
|
Loading…
Reference in a new issue