mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 22:51:50 +00:00
- floatified SpriteOverlapZ
This commit is contained in:
parent
a5d6cbaa57
commit
c9ab96f504
4 changed files with 11 additions and 14 deletions
|
@ -363,7 +363,7 @@ int DoSkullJump(DSWActor* actor)
|
|||
DISTANCE(actor->spr.pos, actor->user.targetActor->spr.pos, dist, a, b, c);
|
||||
|
||||
if (dist < 1000 &&
|
||||
SpriteOverlapZ(actor, actor->user.targetActor, Z(32)))
|
||||
SpriteOverlapZ(actor, actor->user.targetActor, 32))
|
||||
{
|
||||
UpdateSinglePlayKills(actor);
|
||||
DoSkullBeginDeath(actor);
|
||||
|
@ -731,7 +731,7 @@ int DoBettyJump(DSWActor* actor)
|
|||
DISTANCE(actor->spr.pos, actor->user.targetActor->spr.pos, dist, a, b, c);
|
||||
|
||||
if (dist < 1000 &&
|
||||
SpriteOverlapZ(actor, actor->user.targetActor, Z(32)))
|
||||
SpriteOverlapZ(actor, actor->user.targetActor, 32))
|
||||
{
|
||||
UpdateSinglePlayKills(actor);
|
||||
DoBettyBeginDeath(actor);
|
||||
|
|
|
@ -4284,15 +4284,12 @@ bool SpriteOverlap(DSWActor* actor_a, DSWActor* actor_b)
|
|||
|
||||
}
|
||||
|
||||
bool SpriteOverlapZ(DSWActor* actor_a, DSWActor* actor_b, int z_overlap)
|
||||
bool SpriteOverlapZ(DSWActor* actor_a, DSWActor* actor_b, double z_overlap)
|
||||
{
|
||||
int spa_tos, spa_bos, spb_tos, spb_bos;
|
||||
|
||||
spa_tos = int_ActorZOfTop(actor_a);
|
||||
spa_bos = int_ActorZOfBottom(actor_a);
|
||||
|
||||
spb_tos = int_ActorZOfTop(actor_b);
|
||||
spb_bos = int_ActorZOfBottom(actor_b);
|
||||
double spa_tos = ActorZOfTop(actor_a);
|
||||
double spa_bos = ActorZOfBottom(actor_a);
|
||||
double spb_tos = ActorZOfTop(actor_b);
|
||||
double spb_bos = ActorZOfBottom(actor_b);
|
||||
|
||||
|
||||
// if the top of sprite a is below the bottom of b
|
||||
|
|
|
@ -55,7 +55,7 @@ bool ActorSpawn(DSWActor*);
|
|||
int SpawnItemsMatch(short match);
|
||||
void PicAnimOff(short picnum);
|
||||
int MissileWaterAdjust(DSWActor*);
|
||||
bool SpriteOverlapZ(DSWActor*, DSWActor*, int);
|
||||
bool SpriteOverlapZ(DSWActor*, DSWActor*, double);
|
||||
|
||||
enum
|
||||
{
|
||||
|
|
|
@ -11727,7 +11727,7 @@ int InitSwordAttack(PLAYER* pp)
|
|||
|
||||
if (dist < CloseRangeDist(itActor, plActor, reach) && PlayerFacingRange(pp, itActor, face))
|
||||
{
|
||||
if (SpriteOverlapZ(pp->actor, itActor, Z(20)))
|
||||
if (SpriteOverlapZ(pp->actor, itActor, 20))
|
||||
{
|
||||
if (FAFcansee(ActorVectOfMiddle(itActor), itActor->sector(), ActorVectOfMiddle(plActor), plActor->sector()))
|
||||
DoDamage(itActor, pp->actor);
|
||||
|
@ -11900,7 +11900,7 @@ int InitFistAttack(PLAYER* pp)
|
|||
|
||||
if (dist < CloseRangeDist(itActor, plActor, reach) && PlayerFacingRange(pp, itActor, face))
|
||||
{
|
||||
if (SpriteOverlapZ(pp->actor, itActor, Z(20)) || face == 190)
|
||||
if (SpriteOverlapZ(pp->actor, itActor, 20) || face == 190)
|
||||
{
|
||||
if (FAFcansee(ActorVectOfMiddle(itActor), itActor->sector(), ActorVectOfMiddle(plActor), plActor->sector()))
|
||||
DoDamage(itActor, plActor);
|
||||
|
@ -12202,7 +12202,7 @@ int InitMiniSumoClap(DSWActor* actor)
|
|||
|
||||
if (dist < CloseRangeDist(targetActor, actor, 1000))
|
||||
{
|
||||
if (SpriteOverlapZ(actor, targetActor, Z(20)))
|
||||
if (SpriteOverlapZ(actor, targetActor, 20))
|
||||
{
|
||||
if (FAFcansee(ActorVectOfMiddle(targetActor), targetActor->sector(), ActorVectOfMiddle(actor), actor->sector()))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue