mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +00:00
- handled all pSprite-> in actor.cpp.
This commit is contained in:
parent
27e9894ece
commit
b91fe45fc3
4 changed files with 343 additions and 408 deletions
File diff suppressed because it is too large
Load diff
|
@ -2590,7 +2590,7 @@ void genDudePostDeath(DBloodActor* actor, DAMAGE_TYPE damageType, int damage)
|
|||
fxSpawnBlood(actor, damage);
|
||||
}
|
||||
|
||||
gKillMgr.AddKill(pSprite);
|
||||
gKillMgr.AddKill(actor);
|
||||
|
||||
pSprite->type = kThingBloodChunks;
|
||||
actPostSprite(actor, kStatThing);
|
||||
|
|
|
@ -78,9 +78,9 @@ void CKillMgr::AddNewKill(int nCount)
|
|||
TotalKills += nCount;
|
||||
}
|
||||
|
||||
void CKillMgr::AddKill(spritetype* pSprite)
|
||||
void CKillMgr::AddKill(DBloodActor* actor)
|
||||
{
|
||||
if (pSprite->statnum == kStatDude && pSprite->type != kDudeBat && pSprite->type != kDudeRat && pSprite->type != kDudeInnocent && pSprite->type != kDudeBurningInnocent)
|
||||
if (actor->spr.statnum == kStatDude && actor->spr.type != kDudeBat && actor->spr.type != kDudeRat && actor->spr.type != kDudeInnocent && actor->spr.type != kDudeBurningInnocent)
|
||||
Kills++;
|
||||
}
|
||||
|
||||
|
@ -90,10 +90,9 @@ void CKillMgr::CountTotalKills(void)
|
|||
BloodStatIterator it(kStatDude);
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
spritetype* pSprite = &actor->s();
|
||||
if (pSprite->type < kDudeBase || pSprite->type >= kDudeMax)
|
||||
if (actor->spr.type < kDudeBase || actor->spr.type >= kDudeMax)
|
||||
I_Error("Non-enemy sprite (%d) in the enemy sprite list.", actor->GetIndex());
|
||||
if (pSprite->statnum == kStatDude && pSprite->type != kDudeBat && pSprite->type != kDudeRat && pSprite->type != kDudeInnocent && pSprite->type != kDudeBurningInnocent)
|
||||
if (actor->spr.statnum == kStatDude && actor->spr.type != kDudeBat && actor->spr.type != kDudeRat && actor->spr.type != kDudeInnocent && actor->spr.type != kDudeBurningInnocent)
|
||||
TotalKills++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ public:
|
|||
int TotalKills, Kills;
|
||||
void SetCount(int);
|
||||
void AddNewKill(int);
|
||||
void AddKill(spritetype *pSprite);
|
||||
void AddKill(DBloodActor *actor);
|
||||
void CountTotalKills(void);
|
||||
void Clear(void);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue