mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 00:41:55 +00:00
- more target replacements.
This commit is contained in:
parent
b9f6120380
commit
11aea1c5d4
19 changed files with 81 additions and 86 deletions
|
@ -67,7 +67,7 @@ void batBiteSeqCallback(int, DBloodActor* actor)
|
|||
XSPRITE* pXSprite = &actor->x();
|
||||
spritetype *pSprite = &actor->s();
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
int dx = CosScale16(pSprite->ang);
|
||||
int dy = SinScale16(pSprite->ang);
|
||||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
|
@ -168,8 +168,8 @@ static void batThinkPonder(DBloodActor* actor)
|
|||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
XSPRITE *pXTarget = &xsprite[pTarget->extra];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
XSPRITE *pXTarget = &actor->GetTarget()->x();
|
||||
int dx = pTarget->x-pSprite->x;
|
||||
int dy = pTarget->y-pSprite->y;
|
||||
aiChooseDirection(actor, getangle(dx, dy));
|
||||
|
@ -276,8 +276,8 @@ static void batThinkChase(DBloodActor* actor)
|
|||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
XSPRITE *pXTarget = &xsprite[pTarget->extra];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
XSPRITE* pXTarget = &actor->GetTarget()->x();
|
||||
int dx = pTarget->x-pSprite->x;
|
||||
int dy = pTarget->y-pSprite->y;
|
||||
aiChooseDirection(actor, getangle(dx, dy));
|
||||
|
|
|
@ -68,7 +68,7 @@ void SlashSeqCallback(int, DBloodActor* actor)
|
|||
XSPRITE* pXSprite = &actor->x();
|
||||
spritetype *pSprite = &actor->s();
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
int dx = CosScale16(pSprite->ang);
|
||||
int dy = SinScale16(pSprite->ang);
|
||||
// Correct ?
|
||||
|
@ -240,8 +240,8 @@ static void beastThinkChase(DBloodActor* actor)
|
|||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
XSPRITE *pXTarget = &xsprite[pTarget->extra];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
XSPRITE* pXTarget = &actor->GetTarget()->x();
|
||||
int dx = pTarget->x-pSprite->x;
|
||||
int dy = pTarget->y-pSprite->y;
|
||||
aiChooseDirection(actor,getangle(dx, dy));
|
||||
|
@ -410,8 +410,8 @@ static void beastThinkSwimChase(DBloodActor* actor)
|
|||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
XSPRITE *pXTarget = &xsprite[pTarget->extra];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
XSPRITE* pXTarget = &actor->GetTarget()->x();
|
||||
int dx = pTarget->x-pSprite->x;
|
||||
int dy = pTarget->y-pSprite->y;
|
||||
aiChooseDirection(actor,getangle(dx, dy));
|
||||
|
@ -514,7 +514,7 @@ static void sub_62AE0(DBloodActor* actor)
|
|||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
int z = pSprite->z + getDudeInfo(pSprite->type)->eyeHeight;
|
||||
int z2 = pTarget->z + getDudeInfo(pTarget->type)->eyeHeight;
|
||||
int nAng = ((pXSprite->goalAng+1024-pSprite->ang)&2047)-1024;
|
||||
|
@ -552,7 +552,7 @@ static void sub_62D7C(DBloodActor* actor)
|
|||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
int z = pSprite->z + getDudeInfo(pSprite->type)->eyeHeight;
|
||||
int z2 = pTarget->z + getDudeInfo(pTarget->type)->eyeHeight;
|
||||
int nAng = ((pXSprite->goalAng+1024-pSprite->ang)&2047)-1024;
|
||||
|
|
|
@ -79,7 +79,7 @@ void eelBiteSeqCallback(int, DBloodActor* actor)
|
|||
return;
|
||||
}
|
||||
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
int dx = CosScale16(pSprite->ang);
|
||||
int dy = SinScale16(pSprite->ang);
|
||||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
|
@ -181,8 +181,8 @@ static void eelThinkPonder(DBloodActor* actor)
|
|||
}
|
||||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
XSPRITE *pXTarget = &xsprite[pTarget->extra];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
XSPRITE* pXTarget = &actor->GetTarget()->x();
|
||||
int dx = pTarget->x-pSprite->x;
|
||||
int dy = pTarget->y-pSprite->y;
|
||||
aiChooseDirection(actor,getangle(dx, dy));
|
||||
|
@ -288,8 +288,8 @@ static void eelThinkChase(DBloodActor* actor)
|
|||
}
|
||||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
XSPRITE *pXTarget = &xsprite[pTarget->extra];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
XSPRITE* pXTarget = &actor->GetTarget()->x();
|
||||
int dx = pTarget->x-pSprite->x;
|
||||
int dy = pTarget->y-pSprite->y;
|
||||
aiChooseDirection(actor,getangle(dx, dy));
|
||||
|
|
|
@ -162,8 +162,8 @@ static void burnThinkChase(DBloodActor* actor)
|
|||
}
|
||||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
XSPRITE *pXTarget = &xsprite[pTarget->extra];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
XSPRITE* pXTarget = &actor->GetTarget()->x();
|
||||
int dx = pTarget->x-pSprite->x;
|
||||
int dy = pTarget->y-pSprite->y;
|
||||
aiChooseDirection(actor,getangle(dx, dy));
|
||||
|
|
|
@ -137,8 +137,8 @@ static void calebThinkChase(DBloodActor* actor)
|
|||
}
|
||||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
XSPRITE *pXTarget = &xsprite[pTarget->extra];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
XSPRITE* pXTarget = &actor->GetTarget()->x();
|
||||
int dx = pTarget->x-pSprite->x;
|
||||
int dy = pTarget->y-pSprite->y;
|
||||
aiChooseDirection(actor,getangle(dx, dy));
|
||||
|
@ -272,8 +272,8 @@ static void calebThinkSwimChase(DBloodActor* actor)
|
|||
}
|
||||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
XSPRITE *pXTarget = &xsprite[pTarget->extra];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
XSPRITE* pXTarget = &actor->GetTarget()->x();
|
||||
int dx = pTarget->x-pSprite->x;
|
||||
int dy = pTarget->y-pSprite->y;
|
||||
aiChooseDirection(actor,getangle(dx, dy));
|
||||
|
@ -353,7 +353,7 @@ static void sub_65F44(DBloodActor* actor)
|
|||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
int z = pSprite->z + getDudeInfo(pSprite->type)->eyeHeight;
|
||||
int z2 = pTarget->z + getDudeInfo(pTarget->type)->eyeHeight;
|
||||
int nAng = ((pXSprite->goalAng+1024-pSprite->ang)&2047)-1024;
|
||||
|
@ -391,7 +391,7 @@ static void sub_661E0(DBloodActor* actor)
|
|||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
int z = pSprite->z + getDudeInfo(pSprite->type)->eyeHeight;
|
||||
int z2 = pTarget->z + getDudeInfo(pTarget->type)->eyeHeight;
|
||||
int nAng = ((pXSprite->goalAng+1024-pSprite->ang)&2047)-1024;
|
||||
|
|
|
@ -68,7 +68,7 @@ void cerberusBiteSeqCallback(int, DBloodActor* actor)
|
|||
return;
|
||||
}
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
int dz = pTarget->z-pSprite->z;
|
||||
actFireVector(actor, 350, -100, dx, dy, dz, kVectorCerberusHack);
|
||||
actFireVector(actor, -350, 0, dx, dy, dz, kVectorCerberusHack);
|
||||
|
@ -372,8 +372,8 @@ static void cerberusThinkChase(DBloodActor* actor)
|
|||
Printf(PRINT_HIGH, "pXSprite->target >= 0 && pXSprite->target < kMaxSprites");
|
||||
return;
|
||||
}
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
XSPRITE *pXTarget = &xsprite[pTarget->extra];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
XSPRITE* pXTarget = &actor->GetTarget()->x();
|
||||
int dx = pTarget->x-pSprite->x;
|
||||
int dy = pTarget->y-pSprite->y;
|
||||
aiChooseDirection(actor,getangle(dx, dy));
|
||||
|
|
|
@ -137,7 +137,7 @@ void cultThrowSeqCallback(int, DBloodActor* actor)
|
|||
char v4 = Chance(0x6000);
|
||||
sfxPlay3DSound(pSprite, 455, -1, 0);
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
int dx = pTarget->x - pSprite->x;
|
||||
int dy = pTarget->y - pSprite->y;
|
||||
|
@ -174,7 +174,7 @@ void sub_68230(int, DBloodActor* actor)
|
|||
nMissile = kThingArmedTNTBundle;
|
||||
sfxPlay3DSound(pSprite, 455, -1, 0);
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
int dx = pTarget->x - pSprite->x;
|
||||
int dy = pTarget->y - pSprite->y;
|
||||
|
@ -252,8 +252,8 @@ static void cultThinkChase(DBloodActor* actor)
|
|||
}
|
||||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
XSPRITE *pXTarget = &xsprite[pTarget->extra];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
XSPRITE* pXTarget = &actor->GetTarget()->x();
|
||||
int dx = pTarget->x-pSprite->x;
|
||||
int dy = pTarget->y-pSprite->y;
|
||||
aiChooseDirection(actor,getangle(dx, dy));
|
||||
|
|
|
@ -82,7 +82,7 @@ void SlashFSeqCallback(int, DBloodActor* actor)
|
|||
XSPRITE* pXSprite = &actor->x();
|
||||
spritetype* pSprite = &actor->s();
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
DUDEINFO *pDudeInfoT = getDudeInfo(pTarget->type);
|
||||
int height = (pSprite->yrepeat*pDudeInfo->eyeHeight)<<2;
|
||||
|
@ -112,7 +112,7 @@ void BlastSSeqCallback(int, DBloodActor* actor)
|
|||
spritetype* pSprite = &actor->s();
|
||||
wrand(); // ???
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
int height = (pSprite->yrepeat*getDudeInfo(pSprite->type)->eyeHeight) << 2;
|
||||
int dx = pXSprite->targetX-pSprite->x;
|
||||
int dy = pXSprite->targetY-pSprite->y;
|
||||
|
@ -368,8 +368,8 @@ static void gargThinkChase(DBloodActor* actor)
|
|||
return;
|
||||
}
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
XSPRITE *pXTarget = &xsprite[pTarget->extra];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
XSPRITE* pXTarget = &actor->GetTarget()->x();
|
||||
int dx = pTarget->x-pSprite->x;
|
||||
int dy = pTarget->y-pSprite->y;
|
||||
aiChooseDirection(actor,getangle(dx, dy));
|
||||
|
|
|
@ -66,7 +66,7 @@ void ghostSlashSeqCallback(int, DBloodActor* actor)
|
|||
XSPRITE* pXSprite = &actor->x();
|
||||
spritetype* pSprite = &actor->s();
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
DUDEINFO *pDudeInfoT = getDudeInfo(pTarget->type);
|
||||
int height = (pSprite->yrepeat*pDudeInfo->eyeHeight)<<2;
|
||||
|
@ -95,7 +95,7 @@ void ghostBlastSeqCallback(int, DBloodActor* actor)
|
|||
spritetype* pSprite = &actor->s();
|
||||
wrand(); // ???
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
int height = (pSprite->yrepeat*getDudeInfo(pSprite->type)->eyeHeight) << 2;
|
||||
int dx = pXSprite->targetX-pSprite->x;
|
||||
int dy = pXSprite->targetY-pSprite->y;
|
||||
|
@ -346,8 +346,8 @@ static void ghostThinkChase(DBloodActor* actor)
|
|||
return;
|
||||
}
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
XSPRITE *pXTarget = &xsprite[pTarget->extra];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
XSPRITE* pXTarget = &actor->GetTarget()->x();
|
||||
int dx = pTarget->x-pSprite->x;
|
||||
int dy = pTarget->y-pSprite->y;
|
||||
aiChooseDirection(actor,getangle(dx, dy));
|
||||
|
|
|
@ -63,7 +63,7 @@ void GillBiteSeqCallback(int, DBloodActor* actor)
|
|||
XSPRITE* pXSprite = &actor->x();
|
||||
spritetype* pSprite = &actor->s();
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
int dx = CosScale16(pSprite->ang);
|
||||
int dy = SinScale16(pSprite->ang);
|
||||
int dz = pSprite->z-pTarget->z;
|
||||
|
@ -130,8 +130,8 @@ static void gillThinkChase(DBloodActor* actor)
|
|||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
XSPRITE *pXTarget = &xsprite[pTarget->extra];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
XSPRITE* pXTarget = &actor->GetTarget()->x();
|
||||
int dx = pTarget->x-pSprite->x;
|
||||
int dy = pTarget->y-pSprite->y;
|
||||
aiChooseDirection(actor,getangle(dx, dy));
|
||||
|
@ -262,8 +262,8 @@ static void gillThinkSwimChase(DBloodActor* actor)
|
|||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
XSPRITE *pXTarget = &xsprite[pTarget->extra];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
XSPRITE* pXTarget = &actor->GetTarget()->x();
|
||||
int dx = pTarget->x-pSprite->x;
|
||||
int dy = pTarget->y-pSprite->y;
|
||||
aiChooseDirection(actor,getangle(dx, dy));
|
||||
|
@ -347,7 +347,7 @@ static void sub_6CD74(DBloodActor* actor)
|
|||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
int z = pSprite->z + getDudeInfo(pSprite->type)->eyeHeight;
|
||||
int z2 = pTarget->z + getDudeInfo(pTarget->type)->eyeHeight;
|
||||
int nAng = ((pXSprite->goalAng+1024-pSprite->ang)&2047)-1024;
|
||||
|
@ -384,7 +384,7 @@ static void sub_6D03C(DBloodActor* actor)
|
|||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
int z = pSprite->z + getDudeInfo(pSprite->type)->eyeHeight;
|
||||
int z2 = pTarget->z + getDudeInfo(pTarget->type)->eyeHeight;
|
||||
int nAng = ((pXSprite->goalAng+1024-pSprite->ang)&2047)-1024;
|
||||
|
|
|
@ -47,7 +47,7 @@ void HandJumpSeqCallback(int, DBloodActor* actor)
|
|||
XSPRITE* pXSprite = &actor->x();
|
||||
spritetype* pSprite = &actor->s();
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
if (IsPlayerSprite(pTarget))
|
||||
{
|
||||
PLAYER *pPlayer = &gPlayer[pTarget->type-kDudePlayer1];
|
||||
|
@ -95,8 +95,8 @@ static void handThinkChase(DBloodActor* actor)
|
|||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
XSPRITE *pXTarget = &xsprite[pTarget->extra];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
XSPRITE* pXTarget = &actor->GetTarget()->x();
|
||||
int dx = pTarget->x-pSprite->x;
|
||||
int dy = pTarget->y-pSprite->y;
|
||||
aiChooseDirection(actor,getangle(dx, dy));
|
||||
|
|
|
@ -56,7 +56,7 @@ void houndBiteSeqCallback(int, DBloodActor* actor)
|
|||
}
|
||||
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
#ifdef NOONE_EXTENSIONS
|
||||
if (IsPlayerSprite(pTarget) || gModernMap) // allow to hit non-player targets
|
||||
actFireVector(actor, 0, 0, dx, dy, pTarget->z - pSprite->z, kVectorHoundBite);
|
||||
|
@ -116,8 +116,8 @@ static void houndThinkChase(DBloodActor* actor)
|
|||
return;
|
||||
}
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
XSPRITE *pXTarget = &xsprite[pTarget->extra];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
XSPRITE* pXTarget = &actor->GetTarget()->x();
|
||||
int dx = pTarget->x-pSprite->x;
|
||||
int dy = pTarget->y-pSprite->y;
|
||||
aiChooseDirection(actor,getangle(dx, dy));
|
||||
|
|
|
@ -77,8 +77,8 @@ static void innocThinkChase(DBloodActor* actor)
|
|||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
XSPRITE *pXTarget = &xsprite[pTarget->extra];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
XSPRITE* pXTarget = &actor->GetTarget()->x();
|
||||
int dx = pTarget->x-pSprite->x;
|
||||
int dy = pTarget->y-pSprite->y;
|
||||
aiChooseDirection(actor,getangle(dx, dy));
|
||||
|
|
|
@ -65,15 +65,10 @@ void podAttack(int, DBloodActor* actor)
|
|||
{
|
||||
XSPRITE* pXSprite = &actor->x();
|
||||
spritetype* pSprite = &actor->s();
|
||||
///assert(pXSprite->target_i >= 0 && pXSprite->target_i < kMaxSprites);
|
||||
if (!(pXSprite->target_i >= 0 && pXSprite->target_i < kMaxSprites)) {
|
||||
Printf(PRINT_HIGH, "pXSprite->target_i >= 0 && pXSprite->target_i < kMaxSprites");
|
||||
return;
|
||||
}
|
||||
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
int x = pTarget->x-pSprite->x;
|
||||
int y = pTarget->y-pSprite->y;
|
||||
|
@ -197,8 +192,8 @@ static void aiPodChase(DBloodActor* actor)
|
|||
return;
|
||||
}
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
XSPRITE *pXTarget = &xsprite[pTarget->extra];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
XSPRITE* pXTarget = &actor->GetTarget()->x();
|
||||
int dx = pTarget->x-pSprite->x;
|
||||
int dy = pTarget->y-pSprite->y;
|
||||
aiChooseDirection(actor,getangle(dx, dy));
|
||||
|
|
|
@ -50,7 +50,7 @@ void ratBiteSeqCallback(int, DBloodActor* actor)
|
|||
int dy = SinScale16(pSprite->ang);
|
||||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
if (IsPlayerSprite(pTarget))
|
||||
actFireVector(actor, 0, 0, dx, dy, pTarget->z-pSprite->z, kVectorRatBite);
|
||||
}
|
||||
|
@ -90,8 +90,8 @@ static void ratThinkChase(DBloodActor* actor)
|
|||
}
|
||||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
XSPRITE *pXTarget = &xsprite[pTarget->extra];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
XSPRITE* pXTarget = &actor->GetTarget()->x();
|
||||
int dx = pTarget->x-pSprite->x;
|
||||
int dy = pTarget->y-pSprite->y;
|
||||
aiChooseDirection(actor,getangle(dx, dy));
|
||||
|
|
|
@ -74,8 +74,8 @@ void SpidBiteSeqCallback(int, DBloodActor* actor)
|
|||
int dz = Random2(2000);
|
||||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
XSPRITE *pXTarget = &xsprite[pTarget->extra];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
XSPRITE* pXTarget = &actor->GetTarget()->x();
|
||||
if (IsPlayerSprite(pTarget)) {
|
||||
|
||||
int hit = HitScan(pSprite, pSprite->z, dx, dy, 0, CLIPMASK1, 0);
|
||||
|
@ -123,7 +123,7 @@ void SpidJumpSeqCallback(int, DBloodActor* actor)
|
|||
int dz = Random2(200);
|
||||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
if (IsPlayerSprite(pTarget)) {
|
||||
dz += pTarget->z-pSprite->z;
|
||||
switch (pSprite->type) {
|
||||
|
@ -145,7 +145,7 @@ void SpidBirthSeqCallback(int, DBloodActor* actor)
|
|||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
DUDEEXTRA_at6_u1 *pDudeExtraE = &actor->dudeExtra.at6.u1;
|
||||
int dx = pXSprite->targetX-pSprite->x;
|
||||
int dy = pXSprite->targetY-pSprite->y;
|
||||
|
@ -207,8 +207,8 @@ static void spidThinkChase(DBloodActor* actor)
|
|||
}
|
||||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
XSPRITE *pXTarget = &xsprite[pTarget->extra];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
XSPRITE* pXTarget = &actor->GetTarget()->x();
|
||||
int dx = pTarget->x-pSprite->x;
|
||||
int dy = pTarget->y-pSprite->y;
|
||||
aiChooseDirection(actor,getangle(dx, dy));
|
||||
|
|
|
@ -51,8 +51,8 @@ void sub_71A90(int, DBloodActor* actor)
|
|||
XSPRITE* pXSprite = &actor->x();
|
||||
spritetype* pSprite = &actor->s();
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
XSPRITE *pXTarget = &xsprite[pTarget->extra];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
XSPRITE* pXTarget = &actor->GetTarget()->x();
|
||||
int nTarget = pTarget->index;
|
||||
int nOwner = pSprite->owner;
|
||||
if (pXTarget->burnTime == 0)
|
||||
|
@ -319,8 +319,8 @@ static void sub_72934(DBloodActor* actor)
|
|||
}
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
XSPRITE *pXTarget = &xsprite[pTarget->extra];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
XSPRITE* pXTarget = &actor->GetTarget()->x();
|
||||
int dx = pTarget->x-pSprite->x;
|
||||
int dy = pTarget->y-pSprite->y;
|
||||
aiChooseDirection(actor,getangle(dx, dy));
|
||||
|
|
|
@ -64,7 +64,7 @@ void HackSeqCallback(int, DBloodActor* actor)
|
|||
XSPRITE* pXSprite = &actor->x();
|
||||
spritetype* pSprite = &actor->s();
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
DUDEINFO *pDudeInfoT = getDudeInfo(pTarget->type);
|
||||
int tx = pXSprite->targetX-pSprite->x;
|
||||
|
@ -120,8 +120,8 @@ static void zombaThinkChase(DBloodActor* actor)
|
|||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
XSPRITE *pXTarget = &xsprite[pTarget->extra];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
XSPRITE* pXTarget = &actor->GetTarget()->x();
|
||||
int dx = pTarget->x-pSprite->x;
|
||||
int dy = pTarget->y-pSprite->y;
|
||||
aiChooseDirection(actor,getangle(dx, dy));
|
||||
|
@ -172,8 +172,8 @@ static void zombaThinkPonder(DBloodActor* actor)
|
|||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
XSPRITE *pXTarget = &xsprite[pTarget->extra];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
XSPRITE* pXTarget = &actor->GetTarget()->x();
|
||||
int dx = pTarget->x-pSprite->x;
|
||||
int dy = pTarget->y-pSprite->y;
|
||||
aiChooseDirection(actor,getangle(dx, dy));
|
||||
|
|
|
@ -53,7 +53,7 @@ void zombfHackSeqCallback(int, DBloodActor* actor)
|
|||
if (pSprite->type != kDudeZombieButcher)
|
||||
return;
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
int height = (pDudeInfo->eyeHeight*pSprite->yrepeat);
|
||||
DUDEINFO *pDudeInfoT = getDudeInfo(pTarget->type);
|
||||
|
@ -66,7 +66,7 @@ void PukeSeqCallback(int, DBloodActor* actor)
|
|||
XSPRITE* pXSprite = &actor->x();
|
||||
spritetype* pSprite = &actor->s();
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
DUDEINFO *pDudeInfoT = getDudeInfo(pTarget->type);
|
||||
int height = (pDudeInfo->eyeHeight*pSprite->yrepeat);
|
||||
|
@ -122,8 +122,8 @@ static void zombfThinkChase(DBloodActor* actor)
|
|||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &sprite[pXSprite->target_i];
|
||||
XSPRITE *pXTarget = &xsprite[pTarget->extra];
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
XSPRITE* pXTarget = &actor->GetTarget()->x();
|
||||
int dx = pTarget->x-pSprite->x;
|
||||
int dy = pTarget->y-pSprite->y;
|
||||
aiChooseDirection(actor,getangle(dx, dy));
|
||||
|
|
Loading…
Reference in a new issue