mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 06:41:59 +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();
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
int height = pDudeInfo->eyeHeight*pSprite->yrepeat;
|
||||
///assert(pXSprite->target >= 0 && pXSprite->target < kMaxSprites);
|
||||
if (!(pXSprite->target_i >= 0 && pXSprite->target_i < kMaxSprites)) {
|
||||
Printf(PRINT_HIGH, "pXSprite->target >= 0 && pXSprite->target < kMaxSprites");
|
||||
return;
|
||||
}
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
|
||||
int x = pSprite->x;
|
||||
int y = pSprite->y;
|
||||
int z = height; // ???
|
||||
|
@ -161,11 +158,7 @@ void cerberusBurnSeqCallback2(int, DBloodActor* actor)
|
|||
{
|
||||
XSPRITE* pXSprite = &actor->x();
|
||||
spritetype* pSprite = &actor->s();
|
||||
///assert(pXSprite->target >= 0 && pXSprite->target < kMaxSprites);
|
||||
if (!(pXSprite->target_i >= 0 && pXSprite->target_i < kMaxSprites)) {
|
||||
Printf(PRINT_HIGH, "pXSprite->target >= 0 && pXSprite->target < kMaxSprites");
|
||||
return;
|
||||
}
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
int height = pDudeInfo->eyeHeight*pSprite->yrepeat;
|
||||
|
||||
|
@ -367,11 +360,7 @@ static void cerberusThinkChase(DBloodActor* actor)
|
|||
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
|
||||
///assert(pXSprite->target >= 0 && pXSprite->target < kMaxSprites);
|
||||
if (!(pXSprite->target_i >= 0 && pXSprite->target_i < kMaxSprites)) {
|
||||
Printf(PRINT_HIGH, "pXSprite->target >= 0 && pXSprite->target < kMaxSprites");
|
||||
return;
|
||||
}
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
spritetype *pTarget = &actor->GetTarget()->s();
|
||||
XSPRITE* pXTarget = &actor->GetTarget()->x();
|
||||
int dx = pTarget->x-pSprite->x;
|
||||
|
|
|
@ -68,11 +68,7 @@ void sub_71BD4(int, DBloodActor* actor)
|
|||
spritetype* pSprite = &actor->s();
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
int height = pSprite->yrepeat*pDudeInfo->eyeHeight;
|
||||
///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;
|
||||
}
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
int x = pSprite->x;
|
||||
int y = pSprite->y;
|
||||
int z = height;
|
||||
|
@ -141,11 +137,8 @@ void sub_720AC(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;
|
||||
}
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
int height = pSprite->yrepeat*pDudeInfo->eyeHeight;
|
||||
int ax, ay, az;
|
||||
|
|
Loading…
Reference in a new issue