mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +00:00
- added a few more ValidateTarget calls.
This commit is contained in:
parent
a3a5e7e90b
commit
595893a9a0
2 changed files with 7 additions and 25 deletions
|
@ -81,11 +81,8 @@ void cerberusBurnSeqCallback(int, DBloodActor* actor)
|
||||||
spritetype* pSprite = &actor->s();
|
spritetype* pSprite = &actor->s();
|
||||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||||
int height = pDudeInfo->eyeHeight*pSprite->yrepeat;
|
int height = pDudeInfo->eyeHeight*pSprite->yrepeat;
|
||||||
///assert(pXSprite->target >= 0 && pXSprite->target < kMaxSprites);
|
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||||
if (!(pXSprite->target_i >= 0 && pXSprite->target_i < kMaxSprites)) {
|
|
||||||
Printf(PRINT_HIGH, "pXSprite->target >= 0 && pXSprite->target < kMaxSprites");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
int x = pSprite->x;
|
int x = pSprite->x;
|
||||||
int y = pSprite->y;
|
int y = pSprite->y;
|
||||||
int z = height; // ???
|
int z = height; // ???
|
||||||
|
@ -161,11 +158,7 @@ void cerberusBurnSeqCallback2(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE* pXSprite = &actor->x();
|
XSPRITE* pXSprite = &actor->x();
|
||||||
spritetype* pSprite = &actor->s();
|
spritetype* pSprite = &actor->s();
|
||||||
///assert(pXSprite->target >= 0 && pXSprite->target < kMaxSprites);
|
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||||
if (!(pXSprite->target_i >= 0 && pXSprite->target_i < kMaxSprites)) {
|
|
||||||
Printf(PRINT_HIGH, "pXSprite->target >= 0 && pXSprite->target < kMaxSprites");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||||
int height = pDudeInfo->eyeHeight*pSprite->yrepeat;
|
int height = pDudeInfo->eyeHeight*pSprite->yrepeat;
|
||||||
|
|
||||||
|
@ -367,11 +360,7 @@ static void cerberusThinkChase(DBloodActor* actor)
|
||||||
|
|
||||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||||
|
|
||||||
///assert(pXSprite->target >= 0 && pXSprite->target < kMaxSprites);
|
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||||
if (!(pXSprite->target_i >= 0 && pXSprite->target_i < kMaxSprites)) {
|
|
||||||
Printf(PRINT_HIGH, "pXSprite->target >= 0 && pXSprite->target < kMaxSprites");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
spritetype *pTarget = &actor->GetTarget()->s();
|
spritetype *pTarget = &actor->GetTarget()->s();
|
||||||
XSPRITE* pXTarget = &actor->GetTarget()->x();
|
XSPRITE* pXTarget = &actor->GetTarget()->x();
|
||||||
int dx = pTarget->x-pSprite->x;
|
int dx = pTarget->x-pSprite->x;
|
||||||
|
|
|
@ -68,11 +68,7 @@ void sub_71BD4(int, DBloodActor* actor)
|
||||||
spritetype* pSprite = &actor->s();
|
spritetype* pSprite = &actor->s();
|
||||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||||
int height = pSprite->yrepeat*pDudeInfo->eyeHeight;
|
int height = pSprite->yrepeat*pDudeInfo->eyeHeight;
|
||||||
///assert(pXSprite->target_i >= 0 && pXSprite->target_i < kMaxSprites);
|
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||||
if (!(pXSprite->target_i >= 0 && pXSprite->target_i < kMaxSprites)) {
|
|
||||||
Printf(PRINT_HIGH, "pXSprite->target_i >= 0 && pXSprite->target_i < kMaxSprites");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
int x = pSprite->x;
|
int x = pSprite->x;
|
||||||
int y = pSprite->y;
|
int y = pSprite->y;
|
||||||
int z = height;
|
int z = height;
|
||||||
|
@ -141,11 +137,8 @@ void sub_720AC(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE* pXSprite = &actor->x();
|
XSPRITE* pXSprite = &actor->x();
|
||||||
spritetype* pSprite = &actor->s();
|
spritetype* pSprite = &actor->s();
|
||||||
///assert(pXSprite->target_i >= 0 && pXSprite->target_i < kMaxSprites);
|
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||||
if (!(pXSprite->target_i >= 0 && pXSprite->target_i < kMaxSprites)) {
|
|
||||||
Printf(PRINT_HIGH, "pXSprite->target_i >= 0 && pXSprite->target_i < kMaxSprites");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||||
int height = pSprite->yrepeat*pDudeInfo->eyeHeight;
|
int height = pSprite->yrepeat*pDudeInfo->eyeHeight;
|
||||||
int ax, ay, az;
|
int ax, ay, az;
|
||||||
|
|
Loading…
Reference in a new issue