mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-13 20:42:11 +00:00
- last FAFcansee bunch
This commit is contained in:
parent
7aca321fab
commit
9444bd4370
2 changed files with 10 additions and 4 deletions
|
@ -2203,6 +2203,12 @@ inline double ActorLowerZ(DSWActor* actor)
|
|||
return (int_ActorZOfBottom(actor) - (int_ActorSizeZ(actor) * 0.25)) * zinttoworld;
|
||||
}
|
||||
|
||||
inline DVector3 ActorLowerVect(DSWActor* actor)
|
||||
{
|
||||
return DVector3(actor->spr.pos.XY(), ActorLowerZ(actor));
|
||||
}
|
||||
|
||||
|
||||
// Z size of top (TOS) and bottom (BOS) part of sprite
|
||||
inline int ActorSizeToTop(DSWActor* a)
|
||||
{
|
||||
|
|
|
@ -7042,7 +7042,7 @@ int DoDamageTest(DSWActor* actor)
|
|||
// For speed's sake, try limiting check only to radius weapons!
|
||||
if (actor->user.Radius > 200)
|
||||
{
|
||||
if (!FAFcansee_(itActor->int_pos().X,itActor->int_pos().Y, int_ActorUpperZ(actor), itActor->sector(),actor->int_pos().X,actor->int_pos().Y,actor->int_pos().Z,actor->sector()))
|
||||
if (!FAFcansee(ActorUpperVect(itActor), itActor->sector(),actor->spr.pos,actor->sector()))
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -7259,8 +7259,8 @@ int DoExpDamageTest(DSWActor* actor)
|
|||
|
||||
// Second parameter MUST have blocking bits set or cansee won't work
|
||||
// added second check for FAF water - hitscans were hitting ceiling
|
||||
if (!FAFcansee_(actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->sector(), itActor->int_pos().X, itActor->int_pos().Y, int_ActorUpperZ(actor), itActor->sector()) &&
|
||||
!FAFcansee_(actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->sector(), itActor->int_pos().X, itActor->int_pos().Y, int_ActorLowerZ(actor), itActor->sector()))
|
||||
if (!FAFcansee(actor->spr.pos, actor->sector(), ActorUpperVect(itActor), itActor->sector()) &&
|
||||
!FAFcansee(actor->spr.pos, actor->sector(), ActorLowerVect(itActor), itActor->sector()))
|
||||
continue;
|
||||
|
||||
DoDamage(itActor, actor);
|
||||
|
@ -8603,7 +8603,7 @@ int DoMineRangeTest(DSWActor* actor, int range)
|
|||
if (dist > range)
|
||||
continue;
|
||||
|
||||
if (!FAFcansee_(itActor->int_pos().X,itActor->int_pos().Y,int_ActorUpperZ(actor),itActor->sector(),actor->int_pos().X,actor->int_pos().Y,actor->int_pos().Z,actor->sector()))
|
||||
if (!FAFcansee(ActorUpperVect(actor),itActor->sector(),actor->spr.pos,actor->sector()))
|
||||
continue;
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue