mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-31 13:10:39 +00:00
- SpriteOverlapZ
This commit is contained in:
parent
66e61d799d
commit
431103032f
4 changed files with 8 additions and 10 deletions
|
@ -39,7 +39,6 @@ int InitSpriteChemBomb(DSWActor*);
|
|||
int InitFlashBomb(DSWActor* actor);
|
||||
int InitCaltrops(DSWActor* actor);
|
||||
int InitPhosphorus(int16_t SpriteNum);
|
||||
bool SpriteOverlapZ(int16_t, int16_t, int);
|
||||
|
||||
//////////////////////
|
||||
//
|
||||
|
@ -382,7 +381,7 @@ int DoSkullJump(DSWActor* actor)
|
|||
DISTANCE(sp->x, sp->y, u->targetActor->s().x, u->targetActor->s().y, dist, a, b, c);
|
||||
|
||||
if (dist < 1000 &&
|
||||
SpriteOverlapZ(actor->GetSpriteIndex(), u->targetActor->GetSpriteIndex(), Z(32)))
|
||||
SpriteOverlapZ(actor, u->targetActor, Z(32)))
|
||||
{
|
||||
UpdateSinglePlayKills(actor);
|
||||
DoSkullBeginDeath(actor);
|
||||
|
@ -780,7 +779,7 @@ int DoBettyJump(DSWActor* actor)
|
|||
DISTANCE(sp->x, sp->y, u->targetActor->s().x, u->targetActor->s().y, dist, a, b, c);
|
||||
|
||||
if (dist < 1000 &&
|
||||
SpriteOverlapZ(actor->GetSpriteIndex(), u->targetActor->GetSpriteIndex(), Z(32)))
|
||||
SpriteOverlapZ(actor, u->targetActor, Z(32)))
|
||||
{
|
||||
UpdateSinglePlayKills(actor);
|
||||
DoBettyBeginDeath(actor);
|
||||
|
|
|
@ -4630,10 +4630,9 @@ bool SpriteOverlap(DSWActor* actor_a, DSWActor* actor_b)
|
|||
|
||||
}
|
||||
|
||||
bool
|
||||
SpriteOverlapZ(int16_t spritenum_a, int16_t spritenum_b, int z_overlap)
|
||||
bool SpriteOverlapZ(DSWActor* actor_a, DSWActor* actor_b, int z_overlap)
|
||||
{
|
||||
SPRITEp spa = &sprite[spritenum_a], spb = &sprite[spritenum_b];
|
||||
SPRITEp spa = &actor_a->s(), spb = &actor_b->s();
|
||||
|
||||
int spa_tos, spa_bos, spb_tos, spb_bos;
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ bool ActorSpawn(DSWActor*);
|
|||
int SpawnItemsMatch(short match);
|
||||
void PicAnimOff(short picnum);
|
||||
int MissileWaterAdjust(DSWActor*);
|
||||
bool SpriteOverlapZ(int16_t spritenum_a,int16_t spritenum_b,int z_overlap);
|
||||
bool SpriteOverlapZ(DSWActor*, DSWActor*, int);
|
||||
|
||||
enum
|
||||
{
|
||||
|
|
|
@ -12550,7 +12550,7 @@ int InitSwordAttack(PLAYERp pp)
|
|||
|
||||
if (dist < CLOSE_RANGE_DIST_FUDGE(sp, psp, reach) && PLAYER_FACING_RANGE(pp, sp, face))
|
||||
{
|
||||
if (SpriteOverlapZ(pp->Actor()->GetSpriteIndex(), itActor->GetSpriteIndex(), Z(20)))
|
||||
if (SpriteOverlapZ(pp->Actor(), itActor, Z(20)))
|
||||
{
|
||||
if (FAFcansee(sp->x, sp->y, SPRITEp_MID(sp), sp->sectnum, psp->x, psp->y, SPRITEp_MID(psp), psp->sectnum))
|
||||
DoDamage(itActor, pp->Actor());
|
||||
|
@ -12735,7 +12735,7 @@ int InitFistAttack(PLAYERp pp)
|
|||
|
||||
if (dist < CLOSE_RANGE_DIST_FUDGE(sp, psp, reach) && PLAYER_FACING_RANGE(pp, sp, face))
|
||||
{
|
||||
if (SpriteOverlapZ(pp->Actor()->GetSpriteIndex(), itActor->GetSpriteIndex(), Z(20)) || face == 190)
|
||||
if (SpriteOverlapZ(pp->Actor(), itActor, Z(20)) || face == 190)
|
||||
{
|
||||
if (FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,psp->x,psp->y,SPRITEp_MID(psp),psp->sectnum))
|
||||
DoDamage(itActor, pp->Actor());
|
||||
|
@ -13065,7 +13065,7 @@ int InitMiniSumoClap(DSWActor* actor)
|
|||
|
||||
if (dist < CLOSE_RANGE_DIST_FUDGE(tsp, sp, 1000))
|
||||
{
|
||||
if (SpriteOverlapZ(actor->GetSpriteIndex(), u->targetActor->GetSpriteIndex(), Z(20)))
|
||||
if (SpriteOverlapZ(actor, u->targetActor, Z(20)))
|
||||
{
|
||||
if (FAFcansee(tsp->x, tsp->y, ActorMid(u->targetActor), tsp->sectnum, sp->x, sp->y, SPRITEp_MID(sp), sp->sectnum))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue