diff --git a/source/games/blood/src/aibeast.cpp b/source/games/blood/src/aibeast.cpp index 61a740f11..82f1d11b7 100644 --- a/source/games/blood/src/aibeast.cpp +++ b/source/games/blood/src/aibeast.cpp @@ -64,7 +64,6 @@ AISTATE beast138FEC = { kAiStateOther, 9, -1, 120, NULL, aiMoveTurn, NULL, &beas void SlashSeqCallback(int, DBloodActor* actor) { - spritetype* pSprite = &actor->s(); if (!actor->ValidateTarget(__FUNCTION__)) return; auto target = actor->GetTarget(); int dx = bcos(actor->spr.ang); @@ -81,7 +80,6 @@ void SlashSeqCallback(int, DBloodActor* actor) void StompSeqCallback(int, DBloodActor* actor) { - spritetype* pSprite = &actor->s(); int dx = bcos(actor->spr.ang); int dy = bsin(actor->spr.ang); int x = actor->spr.pos.X; @@ -167,7 +165,6 @@ void StompSeqCallback(int, DBloodActor* actor) static void MorphToBeast(DBloodActor* actor) { - auto pSprite = &actor->s(); actHealDude(actor, dudeInfo[51].startHealth, dudeInfo[51].startHealth); actor->spr.type = kDudeBeast; } @@ -182,7 +179,6 @@ static void beastThinkSearch(DBloodActor* actor) static void beastThinkGoto(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); auto pSector = actor->spr.sector(); @@ -205,7 +201,6 @@ static void beastThinkGoto(DBloodActor* actor) static void beastThinkChase(DBloodActor* actor) { - auto const pSprite = &actor->s(); if (actor->GetTarget() == nullptr) { auto pSector = actor->spr.sector(); @@ -339,7 +334,6 @@ static void beastThinkChase(DBloodActor* actor) static void beastThinkSwimGoto(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); int dx = pXSprite->targetX - actor->spr.pos.X; @@ -354,7 +348,6 @@ static void beastThinkSwimGoto(DBloodActor* actor) static void beastThinkSwimChase(DBloodActor* actor) { - auto pSprite = &actor->s(); if (actor->GetTarget() == nullptr) { aiNewState(actor, &beastSwimGoto); @@ -410,7 +403,6 @@ static void beastThinkSwimChase(DBloodActor* actor) static void beastMoveForward(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); int nAng = ((pXSprite->goalAng + 1024 - actor->spr.ang) & 2047) - 1024; @@ -430,7 +422,6 @@ static void beastMoveForward(DBloodActor* actor) static void sub_628A0(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); int nAng = ((pXSprite->goalAng + 1024 - actor->spr.ang) & 2047) - 1024; @@ -463,7 +454,6 @@ static void sub_628A0(DBloodActor* actor) static void sub_62AE0(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); if (!actor->ValidateTarget(__FUNCTION__)) return; @@ -500,7 +490,6 @@ static void sub_62AE0(DBloodActor* actor) static void sub_62D7C(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); if (!actor->ValidateTarget(__FUNCTION__)) return; diff --git a/source/games/blood/src/aiboneel.cpp b/source/games/blood/src/aiboneel.cpp index 7e47fd2b2..f9f8b3bd6 100644 --- a/source/games/blood/src/aiboneel.cpp +++ b/source/games/blood/src/aiboneel.cpp @@ -63,8 +63,6 @@ AISTATE eelDodgeDownLeft = { kAiStateMove, 0, -1, 90, NULL, eelMoveDodgeDown, NU void eelBiteSeqCallback(int, DBloodActor* actor) { - spritetype* pSprite = &actor->s(); - /* * workaround for * pXSprite->target >= 0 in file NBlood/source/blood/src/aiboneel.cpp at line 86 @@ -92,7 +90,6 @@ void eelBiteSeqCallback(int, DBloodActor* actor) static void eelThinkTarget(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); DUDEEXTRA_STATS* pDudeExtraE = &actor->dudeExtra.stats; @@ -155,7 +152,6 @@ static void eelThinkSearch(DBloodActor* actor) static void eelThinkGoto(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); int dx = pXSprite->targetX - actor->spr.pos.X; @@ -170,7 +166,6 @@ static void eelThinkGoto(DBloodActor* actor) static void eelThinkPonder(DBloodActor* actor) { - auto pSprite = &actor->s(); if (actor->GetTarget() == nullptr) { aiNewState(actor, &eelSearch); @@ -225,7 +220,6 @@ static void eelThinkPonder(DBloodActor* actor) static void eelMoveDodgeUp(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); int nAng = ((pXSprite->goalAng + 1024 - actor->spr.ang) & 2047) - 1024; @@ -250,7 +244,6 @@ static void eelMoveDodgeUp(DBloodActor* actor) static void eelMoveDodgeDown(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); int nAng = ((pXSprite->goalAng + 1024 - actor->spr.ang) & 2047) - 1024; @@ -276,7 +269,6 @@ static void eelMoveDodgeDown(DBloodActor* actor) static void eelThinkChase(DBloodActor* actor) { - auto pSprite = &actor->s(); if (actor->GetTarget() == nullptr) { aiNewState(actor, &eelGoto); @@ -333,7 +325,6 @@ static void eelThinkChase(DBloodActor* actor) static void eelMoveForward(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); int nAng = ((pXSprite->goalAng + 1024 - actor->spr.ang) & 2047) - 1024; @@ -366,7 +357,6 @@ static void eelMoveForward(DBloodActor* actor) static void eelMoveSwoop(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); int nAng = ((pXSprite->goalAng + 1024 - actor->spr.ang) & 2047) - 1024; @@ -395,7 +385,6 @@ static void eelMoveSwoop(DBloodActor* actor) static void eelMoveAscend(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); int nAng = ((pXSprite->goalAng + 1024 - actor->spr.ang) & 2047) - 1024; @@ -424,7 +413,6 @@ static void eelMoveAscend(DBloodActor* actor) void eelMoveToCeil(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); int x = actor->spr.pos.X; int y = actor->spr.pos.Y; int z = actor->spr.pos.Z; diff --git a/source/games/blood/src/aiburn.cpp b/source/games/blood/src/aiburn.cpp index 5dff2de38..b01a5b815 100644 --- a/source/games/blood/src/aiburn.cpp +++ b/source/games/blood/src/aiburn.cpp @@ -84,7 +84,6 @@ static void burnThinkSearch(DBloodActor* actor) static void burnThinkGoto(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); int dx = pXSprite->targetX - actor->spr.pos.X; @@ -126,7 +125,6 @@ static void burnThinkGoto(DBloodActor* actor) static void burnThinkChase(DBloodActor* actor) { - auto pSprite = &actor->s(); if (actor->GetTarget() == nullptr) { switch (actor->spr.type) diff --git a/source/games/blood/src/aicaleb.cpp b/source/games/blood/src/aicaleb.cpp index 0238b7c32..4044ee7f6 100644 --- a/source/games/blood/src/aicaleb.cpp +++ b/source/games/blood/src/aicaleb.cpp @@ -59,7 +59,6 @@ AISTATE tinycaleb139698 = { kAiStateOther, 8, -1, 120, NULL, aiMoveTurn, NULL, & void SeqAttackCallback(int, DBloodActor* actor) { - spritetype* pSprite = &actor->s(); int dx = bcos(actor->spr.ang); int dy = bsin(actor->spr.ang); int dz = actor->dudeSlope; @@ -91,7 +90,6 @@ static void calebThinkSearch(DBloodActor* actor) static void calebThinkGoto(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); @@ -115,7 +113,6 @@ static void calebThinkGoto(DBloodActor* actor) static void calebThinkChase(DBloodActor* actor) { - auto const pSprite = &actor->s(); auto pSector = actor->spr.sector(); auto pXSector = pSector->hasX() ? &pSector->xs() : nullptr; @@ -216,7 +213,6 @@ static void calebThinkChase(DBloodActor* actor) static void calebThinkSwimGoto(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); int dx = pXSprite->targetX - actor->spr.pos.X; @@ -231,7 +227,6 @@ static void calebThinkSwimGoto(DBloodActor* actor) static void calebThinkSwimChase(DBloodActor* actor) { - auto pSprite = &actor->s(); if (actor->GetTarget() == nullptr) { aiNewState(actor, &tinycalebSwimGoto); @@ -281,7 +276,6 @@ static void calebThinkSwimChase(DBloodActor* actor) static void sub_65D04(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); int nAng = ((pXSprite->goalAng + 1024 - actor->spr.ang) & 2047) - 1024; @@ -314,7 +308,6 @@ static void sub_65D04(DBloodActor* actor) static void sub_65F44(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); if (!actor->ValidateTarget(__FUNCTION__)) return; @@ -352,7 +345,6 @@ static void sub_65F44(DBloodActor* actor) static void sub_661E0(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); if (!actor->ValidateTarget(__FUNCTION__)) return; diff --git a/source/games/blood/src/aicerber.cpp b/source/games/blood/src/aicerber.cpp index e515c9f97..8f0a4a05b 100644 --- a/source/games/blood/src/aicerber.cpp +++ b/source/games/blood/src/aicerber.cpp @@ -57,10 +57,8 @@ AISTATE cerberus1398AC = { kAiStateOther, 7, -1, 120, NULL, aiMoveTurn, NULL, &c void cerberusBiteSeqCallback(int, DBloodActor* actor) { - spritetype* pSprite = &actor->s(); int dx = bcos(actor->spr.ang); int dy = bsin(actor->spr.ang); - ///assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); if (!(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax)) { Printf(PRINT_HIGH, "actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax"); return; @@ -75,7 +73,6 @@ void cerberusBiteSeqCallback(int, DBloodActor* actor) void cerberusBurnSeqCallback(int, DBloodActor* actor) { - spritetype* pSprite = &actor->s(); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); int height = pDudeInfo->eyeHeight * actor->spr.yrepeat; if (!actor->ValidateTarget(__FUNCTION__)) return; @@ -92,8 +89,7 @@ void cerberusBurnSeqCallback(int, DBloodActor* actor) BloodStatIterator it(kStatDude); while (auto actor2 = it.Next()) { - spritetype* pSprite2 = &actor2->s(); - if (pSprite == pSprite2 || !(actor2->spr.flags & 8)) + if (actor == actor2 || !(actor2->spr.flags & 8)) continue; int x2 = actor2->spr.pos.X; int y2 = actor2->spr.pos.Y; @@ -113,7 +109,7 @@ void cerberusBurnSeqCallback(int, DBloodActor* actor) int tz = z + MulScale(actor->dudeSlope, nDist, 10); int tsr = MulScale(9460, nDist, 10); int top, bottom; - GetSpriteExtents(pSprite2, &top, &bottom); + GetActorExtents(actor2, &top, &bottom); if (tz - tsr > bottom || tz + tsr < top) continue; int dx = (tx - x2) >> 4; @@ -152,7 +148,6 @@ void cerberusBurnSeqCallback(int, DBloodActor* actor) void cerberusBurnSeqCallback2(int, DBloodActor* actor) { - spritetype* pSprite = &actor->s(); if (!actor->ValidateTarget(__FUNCTION__)) return; DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); int height = pDudeInfo->eyeHeight * actor->spr.yrepeat; @@ -240,8 +235,6 @@ static void cerberusThinkSearch(DBloodActor* actor) static void cerberusThinkTarget(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); - ///assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); if (!(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax)) { Printf(PRINT_HIGH, "actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax"); return; @@ -302,8 +295,6 @@ static void cerberusThinkTarget(DBloodActor* actor) static void cerberusThinkGoto(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); - ///assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); if (!(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax)) { Printf(PRINT_HIGH, "actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax"); return; @@ -330,7 +321,6 @@ static void cerberusThinkGoto(DBloodActor* actor) static void cerberusThinkChase(DBloodActor* actor) { - auto pSprite = &actor->s(); if (actor->GetTarget() == nullptr) { switch (actor->spr.type) { case kDudeCerberusTwoHead: diff --git a/source/games/blood/src/aicult.cpp b/source/games/blood/src/aicult.cpp index 31aef8fc4..01bc1f211 100644 --- a/source/games/blood/src/aicult.cpp +++ b/source/games/blood/src/aicult.cpp @@ -74,7 +74,6 @@ AISTATE cultistSwimRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &culti void TommySeqCallback(int, DBloodActor* actor) { - spritetype* pSprite = &actor->s(); int dx = bcos(actor->spr.ang); int dy = bsin(actor->spr.ang); int dz = actor->dudeSlope; @@ -87,7 +86,6 @@ void TommySeqCallback(int, DBloodActor* actor) void TeslaSeqCallback(int, DBloodActor* actor) { - spritetype* pSprite = &actor->s(); if (Chance(dword_138BB0[gGameOptions.nDifficulty])) { int dx = bcos(actor->spr.ang); @@ -103,7 +101,6 @@ void TeslaSeqCallback(int, DBloodActor* actor) void ShotSeqCallback(int, DBloodActor* actor) { - spritetype* pSprite = &actor->s(); int dx = bcos(actor->spr.ang); int dy = bsin(actor->spr.ang); int dz = actor->dudeSlope; @@ -125,7 +122,6 @@ void ShotSeqCallback(int, DBloodActor* actor) void cultThrowSeqCallback(int, DBloodActor* actor) { - spritetype* pSprite = &actor->s(); int nMissile = kThingArmedTNTStick; if (gGameOptions.nDifficulty > 2) nMissile = kThingArmedTNTBundle; @@ -160,7 +156,6 @@ void sub_68170(int, DBloodActor* actor) void sub_68230(int, DBloodActor* actor) { - spritetype* pSprite = &actor->s(); int nMissile = kThingArmedTNTStick; if (gGameOptions.nDifficulty > 2) nMissile = kThingArmedTNTBundle; @@ -198,7 +193,6 @@ static void cultThinkSearch(DBloodActor* actor) static void cultThinkGoto(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); int dx = pXSprite->targetX - actor->spr.pos.X; @@ -225,7 +219,6 @@ static void cultThinkGoto(DBloodActor* actor) static void cultThinkChase(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); if (actor->GetTarget() == nullptr) { switch (pXSprite->medium) diff --git a/source/games/blood/src/aigarg.cpp b/source/games/blood/src/aigarg.cpp index 6c2d46575..a4767d40d 100644 --- a/source/games/blood/src/aigarg.cpp +++ b/source/games/blood/src/aigarg.cpp @@ -77,7 +77,6 @@ static void playStatueBreakSnd(DBloodActor* actor) { void SlashFSeqCallback(int, DBloodActor* actor) { - spritetype* pSprite = &actor->s(); if (!actor->ValidateTarget(__FUNCTION__)) return; auto target = actor->GetTarget(); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); @@ -104,7 +103,6 @@ void ThrowFSeqCallback(int, DBloodActor* actor) void BlastSSeqCallback(int, DBloodActor* actor) { XSPRITE* pXSprite = &actor->x(); - spritetype* pSprite = &actor->s(); wrand(); // ??? if (!actor->ValidateTarget(__FUNCTION__)) return; auto target = actor->GetTarget(); @@ -200,8 +198,6 @@ void ThrowSSeqCallback(int, DBloodActor* actor) static void gargThinkTarget(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); - ///assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); if (!(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax)) { Printf(PRINT_HIGH, "actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax"); return; @@ -266,8 +262,6 @@ static void gargThinkSearch(DBloodActor* actor) static void gargThinkGoto(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); - ///assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); if (!(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax)) { Printf(PRINT_HIGH, "actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax"); return; @@ -286,8 +280,6 @@ static void gargThinkGoto(DBloodActor* actor) static void gargMoveDodgeUp(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); - ///assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); if (!(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax)) { Printf(PRINT_HIGH, "actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax"); return; @@ -315,8 +307,6 @@ static void gargMoveDodgeUp(DBloodActor* actor) static void gargMoveDodgeDown(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); - ///assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); if (!(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax)) { Printf(PRINT_HIGH, "actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax"); return; @@ -345,7 +335,6 @@ static void gargMoveDodgeDown(DBloodActor* actor) static void gargThinkChase(DBloodActor* actor) { - auto pSprite = &actor->s(); if (actor->GetTarget() == nullptr) { aiNewState(actor, &gargoyleFGoto); @@ -522,7 +511,6 @@ static void gargThinkChase(DBloodActor* actor) static void entryFStatue(DBloodActor* actor) { - auto pSprite = &actor->s(); DUDEINFO* pDudeInfo = &dudeInfo[6]; actHealDude(actor, pDudeInfo->startHealth, pDudeInfo->startHealth); actor->spr.type = kDudeGargoyleFlesh; @@ -530,7 +518,6 @@ static void entryFStatue(DBloodActor* actor) static void entrySStatue(DBloodActor* actor) { - auto pSprite = &actor->s(); DUDEINFO* pDudeInfo = &dudeInfo[7]; actHealDude(actor, pDudeInfo->startHealth, pDudeInfo->startHealth); actor->spr.type = kDudeGargoyleStone; @@ -539,8 +526,6 @@ static void entrySStatue(DBloodActor* actor) static void gargMoveForward(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); - ///assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); if (!(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax)) { Printf(PRINT_HIGH, "actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax"); return; @@ -576,8 +561,6 @@ static void gargMoveForward(DBloodActor* actor) static void gargMoveSlow(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); - ///assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); if (!(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax)) { Printf(PRINT_HIGH, "actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax"); return; @@ -620,8 +603,6 @@ static void gargMoveSlow(DBloodActor* actor) static void gargMoveSwoop(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); - ///assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); if (!(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax)) { Printf(PRINT_HIGH, "actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax"); return; @@ -663,8 +644,6 @@ static void gargMoveSwoop(DBloodActor* actor) static void gargMoveFly(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); - ///assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); if (!(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax)) { Printf(PRINT_HIGH, "actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax"); return; diff --git a/source/games/blood/src/aighost.cpp b/source/games/blood/src/aighost.cpp index 412df7af1..e27684f98 100644 --- a/source/games/blood/src/aighost.cpp +++ b/source/games/blood/src/aighost.cpp @@ -62,7 +62,6 @@ AISTATE ghostDodgeDownLeft = { kAiStateMove, 0, -1, 90, NULL, ghostMoveDodgeDown void ghostSlashSeqCallback(int, DBloodActor* actor) { - spritetype* pSprite = &actor->s(); if (!actor->ValidateTarget(__FUNCTION__)) return; auto target = actor->GetTarget(); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); @@ -90,7 +89,6 @@ void ghostThrowSeqCallback(int, DBloodActor* actor) void ghostBlastSeqCallback(int, DBloodActor* actor) { XSPRITE* pXSprite = &actor->x(); - spritetype* pSprite = &actor->s(); wrand(); // ??? if (!actor->ValidateTarget(__FUNCTION__)) return; auto target = actor->GetTarget(); @@ -180,8 +178,6 @@ void ghostBlastSeqCallback(int, DBloodActor* actor) static void ghostThinkTarget(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); - ///assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); if (!(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax)) { Printf(PRINT_HIGH, "actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax"); return; @@ -245,8 +241,6 @@ static void ghostThinkSearch(DBloodActor* actor) static void ghostThinkGoto(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); - ///assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); if (!(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax)) { Printf(PRINT_HIGH, "actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax"); return; @@ -265,8 +259,6 @@ static void ghostThinkGoto(DBloodActor* actor) static void ghostMoveDodgeUp(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); - ///assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); if (!(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax)) { Printf(PRINT_HIGH, "actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax"); return; @@ -294,8 +286,6 @@ static void ghostMoveDodgeUp(DBloodActor* actor) static void ghostMoveDodgeDown(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); - ///assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); if (!(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax)) { Printf(PRINT_HIGH, "actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax"); return; @@ -325,7 +315,6 @@ static void ghostMoveDodgeDown(DBloodActor* actor) static void ghostThinkChase(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); if (actor->GetTarget() == nullptr) { aiNewState(actor, &ghostGoto); @@ -434,8 +423,6 @@ static void ghostThinkChase(DBloodActor* actor) static void ghostMoveForward(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); - ///assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); if (!(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax)) { Printf(PRINT_HIGH, "actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax"); return; @@ -471,8 +458,6 @@ static void ghostMoveForward(DBloodActor* actor) static void ghostMoveSlow(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); - ///assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); if (!(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax)) { Printf(PRINT_HIGH, "actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax"); return; @@ -512,8 +497,6 @@ static void ghostMoveSlow(DBloodActor* actor) static void ghostMoveSwoop(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); - ///assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); if (!(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax)) { Printf(PRINT_HIGH, "actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax"); return; @@ -552,8 +535,6 @@ static void ghostMoveSwoop(DBloodActor* actor) static void ghostMoveFly(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); - ///assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); if (!(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax)) { Printf(PRINT_HIGH, "actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax"); return; diff --git a/source/games/blood/src/aigilbst.cpp b/source/games/blood/src/aigilbst.cpp index 7bfcaca0b..f0f55a9f7 100644 --- a/source/games/blood/src/aigilbst.cpp +++ b/source/games/blood/src/aigilbst.cpp @@ -59,7 +59,6 @@ AISTATE gillBeast13A170 = { kAiStateOther, 10, -1, 120, NULL, NULL, aiMoveTurn, void GillBiteSeqCallback(int, DBloodActor* actor) { - spritetype* pSprite = &actor->s(); if (!actor->ValidateTarget(__FUNCTION__)) return; auto target = actor->GetTarget(); int dx = bcos(actor->spr.ang); @@ -82,7 +81,6 @@ static void gillThinkSearch(DBloodActor* actor) static void gillThinkGoto(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); @@ -106,7 +104,6 @@ static void gillThinkGoto(DBloodActor* actor) static void gillThinkChase(DBloodActor* actor) { - auto const pSprite = &actor->s(); auto pSector = actor->spr.sector(); auto pXSector = pSector->hasX() ? &pSector->xs() : nullptr; @@ -204,7 +201,6 @@ static void gillThinkChase(DBloodActor* actor) static void gillThinkSwimGoto(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); int dx = pXSprite->targetX - actor->spr.pos.X; @@ -219,7 +215,6 @@ static void gillThinkSwimGoto(DBloodActor* actor) static void gillThinkSwimChase(DBloodActor* actor) { - auto pSprite = &actor->s(); if (actor->GetTarget() == nullptr) { aiNewState(actor, &gillBeastSwimSearch); @@ -275,7 +270,6 @@ static void gillThinkSwimChase(DBloodActor* actor) static void sub_6CB00(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); @@ -309,7 +303,6 @@ static void sub_6CB00(DBloodActor* actor) static void sub_6CD74(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); if (!actor->ValidateTarget(__FUNCTION__)) return; @@ -346,7 +339,6 @@ static void sub_6CD74(DBloodActor* actor) static void sub_6D03C(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); if (!actor->ValidateTarget(__FUNCTION__)) return; diff --git a/source/games/blood/src/aihand.cpp b/source/games/blood/src/aihand.cpp index c1f3af6e6..532933710 100644 --- a/source/games/blood/src/aihand.cpp +++ b/source/games/blood/src/aihand.cpp @@ -66,7 +66,6 @@ static void handThinkSearch(DBloodActor* actor) static void handThinkGoto(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); int dx = pXSprite->targetX - actor->spr.pos.X; @@ -81,7 +80,6 @@ static void handThinkGoto(DBloodActor* actor) static void handThinkChase(DBloodActor* actor) { - auto pSprite = &actor->s(); if (actor->GetTarget() == nullptr) { aiNewState(actor, &handGoto); diff --git a/source/games/blood/src/aihound.cpp b/source/games/blood/src/aihound.cpp index 366dbbeac..34911e0ad 100644 --- a/source/games/blood/src/aihound.cpp +++ b/source/games/blood/src/aihound.cpp @@ -44,10 +44,8 @@ AISTATE houndBurn = { kAiStateChase, 7, nHoundBurnClient, 60, NULL, NULL, NULL, void houndBiteSeqCallback(int, DBloodActor* actor) { - spritetype* pSprite = &actor->s(); int dx = bcos(actor->spr.ang); int dy = bsin(actor->spr.ang); - ///assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); if (!(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax)) { Printf(PRINT_HIGH, "actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax"); return; @@ -66,7 +64,6 @@ void houndBiteSeqCallback(int, DBloodActor* actor) void houndBurnSeqCallback(int, DBloodActor* actor) { - spritetype* pSprite = &actor->s(); actFireMissile(actor, 0, 0, bcos(actor->spr.ang), bsin(actor->spr.ang), 0, kMissileFlameHound); } @@ -80,8 +77,6 @@ static void houndThinkSearch(DBloodActor* actor) static void houndThinkGoto(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); - ///assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); if (!(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax)) { Printf(PRINT_HIGH, "actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax"); return; @@ -100,13 +95,11 @@ static void houndThinkGoto(DBloodActor* actor) static void houndThinkChase(DBloodActor* actor) { - auto pSprite = &actor->s(); if (actor->GetTarget() == nullptr) { aiNewState(actor, &houndGoto); return; } - ///assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); if (!(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax)) { Printf(PRINT_HIGH, "actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax"); return; diff --git a/source/games/blood/src/aiinnoc.cpp b/source/games/blood/src/aiinnoc.cpp index 38fbb6cec..0cc9a276e 100644 --- a/source/games/blood/src/aiinnoc.cpp +++ b/source/games/blood/src/aiinnoc.cpp @@ -43,7 +43,6 @@ AISTATE innocentGoto = { kAiStateMove, 6, -1, 600, NULL, aiMoveForward, innocThi static void innocThinkSearch(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); aiChooseDirection(actor, pXSprite->goalAng); aiThinkTarget(actor); } @@ -51,7 +50,6 @@ static void innocThinkSearch(DBloodActor* actor) static void innocThinkGoto(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); int dx = pXSprite->targetX - actor->spr.pos.X; @@ -67,7 +65,6 @@ static void innocThinkGoto(DBloodActor* actor) static void innocThinkChase(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); if (actor->GetTarget() == nullptr) { aiNewState(actor, &innocentGoto); diff --git a/source/games/blood/src/aipod.cpp b/source/games/blood/src/aipod.cpp index 2c0e07170..1451f5958 100644 --- a/source/games/blood/src/aipod.cpp +++ b/source/games/blood/src/aipod.cpp @@ -62,8 +62,6 @@ void sub_6FF54(int, DBloodActor* actor) void podAttack(int, DBloodActor* actor) { - spritetype* pSprite = &actor->s(); - if (!actor->ValidateTarget(__FUNCTION__)) return; auto target = actor->GetTarget(); @@ -108,7 +106,6 @@ void podAttack(int, DBloodActor* actor) void sub_70284(int, DBloodActor* actor) { - auto pSprite = &actor->s(); sfxPlay3DSound(actor, 2502, -1, 0); int nDist, nBurn; DAMAGE_TYPE dmgType; @@ -138,8 +135,6 @@ static void aiPodSearch(DBloodActor* actor) static void aiPodMove(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); - ///assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); if (!(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax)) { Printf(PRINT_HIGH, "actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax"); return; @@ -168,7 +163,6 @@ static void aiPodMove(DBloodActor* actor) static void aiPodChase(DBloodActor* actor) { - auto pSprite = &actor->s(); if (actor->GetTarget() == nullptr) { switch (actor->spr.type) { case kDudePodGreen: @@ -182,7 +176,6 @@ static void aiPodChase(DBloodActor* actor) } return; } - ///assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); if (!(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax)) { Printf(PRINT_HIGH, "actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax"); return; diff --git a/source/games/blood/src/airat.cpp b/source/games/blood/src/airat.cpp index f38f4f88d..a7b9a1e4e 100644 --- a/source/games/blood/src/airat.cpp +++ b/source/games/blood/src/airat.cpp @@ -43,7 +43,6 @@ AISTATE ratBite = { kAiStateChase, 6, nRatBiteClient, 120, NULL, NULL, NULL, &ra void ratBiteSeqCallback(int, DBloodActor* actor) { - spritetype* pSprite = &actor->s(); int dx = bcos(actor->spr.ang); int dy = bsin(actor->spr.ang); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); @@ -63,7 +62,6 @@ static void ratThinkSearch(DBloodActor* actor) static void ratThinkGoto(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); int dx = pXSprite->targetX - actor->spr.pos.X; @@ -78,7 +76,6 @@ static void ratThinkGoto(DBloodActor* actor) static void ratThinkChase(DBloodActor* actor) { - auto pSprite = &actor->s(); if (actor->GetTarget() == nullptr) { aiNewState(actor, &ratGoto); diff --git a/source/games/blood/src/aispid.cpp b/source/games/blood/src/aispid.cpp index 9bb543a0d..ad3a4cf17 100644 --- a/source/games/blood/src/aispid.cpp +++ b/source/games/blood/src/aispid.cpp @@ -45,7 +45,6 @@ AISTATE spidBirth = { kAiStateOther, 0, nSpidBirthClient, 60, NULL, NULL, NULL, static void spidBlindEffect(DBloodActor* actor, int nBlind, int max) { - spritetype* pSprite = &actor->s(); if (actor->IsPlayerActor()) { nBlind <<= 4; @@ -60,7 +59,6 @@ static void spidBlindEffect(DBloodActor* actor, int nBlind, int max) void SpidBiteSeqCallback(int, DBloodActor* actor) { - spritetype* pSprite = &actor->s(); int dx = bcos(actor->spr.ang); int dy = bsin(actor->spr.ang); dx += Random2(2000); @@ -109,7 +107,6 @@ void SpidBiteSeqCallback(int, DBloodActor* actor) void SpidJumpSeqCallback(int, DBloodActor* actor) { - spritetype* pSprite = &actor->s(); int dx = bcos(actor->spr.ang); int dy = bsin(actor->spr.ang); dx += Random2(200); @@ -135,7 +132,6 @@ void SpidJumpSeqCallback(int, DBloodActor* actor) void SpidBirthSeqCallback(int, DBloodActor* actor) { XSPRITE* pXSprite = &actor->x(); - spritetype* pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); if (!actor->ValidateTarget(__FUNCTION__)) return; @@ -176,7 +172,6 @@ static void spidThinkSearch(DBloodActor* actor) static void spidThinkGoto(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); int dx = pXSprite->targetX - actor->spr.pos.X; @@ -191,7 +186,6 @@ static void spidThinkGoto(DBloodActor* actor) static void spidThinkChase(DBloodActor* actor) { - auto pSprite = &actor->s(); if (actor->GetTarget() == nullptr) { aiNewState(actor, &spidGoto); diff --git a/source/games/blood/src/aitchern.cpp b/source/games/blood/src/aitchern.cpp index e8f05fcbe..9a09f6486 100644 --- a/source/games/blood/src/aitchern.cpp +++ b/source/games/blood/src/aitchern.cpp @@ -58,7 +58,6 @@ void sub_71A90(int, DBloodActor* actor) void sub_71BD4(int, DBloodActor* actor) { - spritetype* pSprite = &actor->s(); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); int height = actor->spr.yrepeat * pDudeInfo->eyeHeight; if (!actor->ValidateTarget(__FUNCTION__)) return; @@ -126,7 +125,6 @@ void sub_71BD4(int, DBloodActor* actor) void sub_720AC(int, DBloodActor* actor) { - spritetype* pSprite = &actor->s(); if (!actor->ValidateTarget(__FUNCTION__)) return; DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); @@ -207,8 +205,6 @@ static void sub_72580(DBloodActor* actor) static void sub_725A4(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); - ///assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); if (!(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax)) { Printf(PRINT_HIGH, "actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax"); return; @@ -266,8 +262,6 @@ static void sub_725A4(DBloodActor* actor) static void sub_72850(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); - ///assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); if (!(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax)) { Printf(PRINT_HIGH, "actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax"); return; @@ -285,13 +279,11 @@ static void sub_72850(DBloodActor* actor) static void sub_72934(DBloodActor* actor) { - auto pSprite = &actor->s(); if (actor->GetTarget() == nullptr) { aiNewState(actor, &tcherno13A9B8); return; } - ///assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); if (!(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax)) { Printf(PRINT_HIGH, "actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax"); return; diff --git a/source/games/blood/src/aizomba.cpp b/source/games/blood/src/aizomba.cpp index 7f90bd295..98a10762b 100644 --- a/source/games/blood/src/aizomba.cpp +++ b/source/games/blood/src/aizomba.cpp @@ -61,7 +61,6 @@ AISTATE zombie13AC2C = { kAiStateOther, 11, nStandClient, 0, entryEZombie, NULL, void HackSeqCallback(int, DBloodActor* actor) { XSPRITE* pXSprite = &actor->x(); - spritetype* pSprite = &actor->s(); if (!actor->ValidateTarget(__FUNCTION__)) return; auto target = actor->GetTarget(); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); @@ -93,7 +92,6 @@ static void zombaThinkSearch(DBloodActor* actor) static void zombaThinkGoto(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); int dx = pXSprite->targetX - actor->spr.pos.X; @@ -108,7 +106,6 @@ static void zombaThinkGoto(DBloodActor* actor) static void zombaThinkChase(DBloodActor* actor) { - auto pSprite = &actor->s(); if (actor->GetTarget() == nullptr) { aiNewState(actor, &zombieASearch); @@ -159,7 +156,6 @@ static void zombaThinkChase(DBloodActor* actor) static void zombaThinkPonder(DBloodActor* actor) { - auto pSprite = &actor->s(); if (actor->GetTarget() == nullptr) { aiNewState(actor, &zombieASearch); @@ -211,7 +207,6 @@ static void zombaThinkPonder(DBloodActor* actor) static void myThinkTarget(DBloodActor* actor) { - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); for (int p = connecthead; p >= 0; p = connectpoint2[p]) @@ -263,7 +258,6 @@ static void myThinkSearch(DBloodActor* actor) static void entryEZombie(DBloodActor* actor) { - auto pSprite = &actor->s(); actor->spr.type = kDudeZombieAxeNormal; actor->spr.flags |= 1; } @@ -276,7 +270,6 @@ static void entryAIdle(DBloodActor* actor) static void entryEStand(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); sfxPlay3DSound(actor, 1100, -1, 0); actor->spr.ang = getangle(pXSprite->targetX - actor->spr.pos.X, pXSprite->targetY - actor->spr.pos.Y); } diff --git a/source/games/blood/src/aizombf.cpp b/source/games/blood/src/aizombf.cpp index 772eac951..5e1dcb0c5 100644 --- a/source/games/blood/src/aizombf.cpp +++ b/source/games/blood/src/aizombf.cpp @@ -47,7 +47,6 @@ AISTATE zombieFTeslaRecoil = { kAiStateRecoil, 4, -1, 0, NULL, NULL, NULL, &zomb void zombfHackSeqCallback(int, DBloodActor* actor) { - spritetype* pSprite = &actor->s(); if (actor->spr.type != kDudeZombieButcher) return; if (!actor->ValidateTarget(__FUNCTION__)) return; @@ -62,7 +61,6 @@ void zombfHackSeqCallback(int, DBloodActor* actor) void PukeSeqCallback(int, DBloodActor* actor) { XSPRITE* pXSprite = &actor->x(); - spritetype* pSprite = &actor->s(); if (!actor->ValidateTarget(__FUNCTION__)) return; auto target = actor->GetTarget(); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); @@ -80,7 +78,6 @@ void PukeSeqCallback(int, DBloodActor* actor) void ThrowSeqCallback(int, DBloodActor* actor) { - spritetype* pSprite = &actor->s(); actFireMissile(actor, 0, -getDudeInfo(actor->spr.type)->eyeHeight, bcos(actor->spr.ang), bsin(actor->spr.ang), 0, kMissileButcherKnife); } @@ -94,7 +91,6 @@ static void zombfThinkSearch(DBloodActor* actor) static void zombfThinkGoto(DBloodActor* actor) { auto pXSprite = &actor->x(); - auto pSprite = &actor->s(); assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); int dx = pXSprite->targetX - actor->spr.pos.X; @@ -109,7 +105,6 @@ static void zombfThinkGoto(DBloodActor* actor) static void zombfThinkChase(DBloodActor* actor) { - auto pSprite = &actor->s(); if (actor->GetTarget() == nullptr) { aiNewState(actor, &zombieFGoto);