mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-29 13:00:43 +00:00
- switched the checkhitsprite interface to actors.
This commit is contained in:
parent
30f4057451
commit
4258c27248
9 changed files with 19 additions and 29 deletions
|
@ -1523,7 +1523,7 @@ bool queball(DDukeActor *actor, int pocket, int queball, int stripeball)
|
|||
}
|
||||
else if (j == kHitSprite)
|
||||
{
|
||||
fi.checkhitsprite(actor->GetIndex(), coll.actor->GetIndex());
|
||||
fi.checkhitsprite(actor, coll.actor);
|
||||
}
|
||||
|
||||
s->xvel--;
|
||||
|
|
|
@ -424,7 +424,7 @@ SKIPWALLCHECK:
|
|||
{
|
||||
if (badguy(act2) && !cansee(spri2->x, spri2->y, spri2->z + q, spri2->sectnum, spri->x, spri->y, spri->z + q, spri->sectnum))
|
||||
continue;
|
||||
fi.checkhitsprite(act2->GetIndex(), actor->GetIndex());
|
||||
fi.checkhitsprite(act2, actor);
|
||||
}
|
||||
}
|
||||
else if (spri2->extra >= 0 && act2 != actor && (spri2->picnum == TRIPBOMB || badguy(act2) || spri2->picnum == QUEBALL || spri2->picnum == STRIPEBALL || (spri2->cstat & 257) || spri2->picnum == DUKELYINGDEAD))
|
||||
|
@ -500,7 +500,7 @@ SKIPWALLCHECK:
|
|||
spri2->picnum == FEM8 || spri2->picnum == FEM9 ||
|
||||
spri2->picnum == FEM10 || spri2->picnum == STATUE ||
|
||||
spri2->picnum == STATUEFLASH || spri2->picnum == SPACEMARINE || spri2->picnum == QUEBALL || spri2->picnum == STRIPEBALL)
|
||||
fi.checkhitsprite(act2->GetIndex(), actor->GetIndex());
|
||||
fi.checkhitsprite(act2, actor);
|
||||
}
|
||||
else if (spri->extra == 0) act2->extra = 0;
|
||||
|
||||
|
@ -1629,7 +1629,7 @@ static bool weaponhitsprite(DDukeActor* proj, DDukeActor *targ, bool fireball)
|
|||
}
|
||||
|
||||
if (!isWorldTour() || s->picnum != FIREBALL || fireball)
|
||||
fi.checkhitsprite(targ->GetIndex(), proj->GetIndex());
|
||||
fi.checkhitsprite(targ, proj);
|
||||
|
||||
if (targ->s.picnum == APLAYER)
|
||||
{
|
||||
|
@ -2802,7 +2802,7 @@ static void flamethrowerflame(DDukeActor *actor)
|
|||
s->xvel = s->yvel = s->zvel = 0;
|
||||
if (coll.type == kHitSprite)
|
||||
{
|
||||
fi.checkhitsprite(coll.actor->GetIndex(), actor->GetIndex());
|
||||
fi.checkhitsprite(coll.actor, actor);
|
||||
if (coll.actor->s.picnum == APLAYER)
|
||||
S_PlayActorSound(actor->GetIndex(), PISTOL_BODYHIT);
|
||||
}
|
||||
|
|
|
@ -291,7 +291,7 @@ SKIPWALLCHECK:
|
|||
{
|
||||
continue;
|
||||
}
|
||||
fi.checkhitsprite(act2->GetIndex(), actor->GetIndex());
|
||||
fi.checkhitsprite(act2, actor);
|
||||
}
|
||||
}
|
||||
else if (spri2->extra >= 0 && act2 != actor && (badguy(act2) || spri2->picnum == QUEBALL || spri2->picnum == RRTILE3440 || spri2->picnum == STRIPEBALL || (spri2->cstat & 257) || spri2->picnum == DUKELYINGDEAD))
|
||||
|
@ -352,7 +352,7 @@ SKIPWALLCHECK:
|
|||
|
||||
if (spri2->picnum == STATUEFLASH || spri2->picnum == QUEBALL ||
|
||||
spri2->picnum == STRIPEBALL || spri2->picnum == RRTILE3440)
|
||||
fi.checkhitsprite(act2->GetIndex(), actor->GetIndex());
|
||||
fi.checkhitsprite(act2, actor);
|
||||
|
||||
if (spri2->picnum != RADIUSEXPLOSION &&
|
||||
Owner && Owner->s.statnum < MAXSTATUS)
|
||||
|
@ -1182,7 +1182,7 @@ static bool weaponhitsprite(DDukeActor *proj, DDukeActor *targ, const vec3_t &ol
|
|||
return true;
|
||||
}
|
||||
|
||||
fi.checkhitsprite(targ->GetIndex(), proj->GetIndex());
|
||||
fi.checkhitsprite(targ, proj);
|
||||
|
||||
if (targ->s.picnum == APLAYER)
|
||||
{
|
||||
|
@ -2807,7 +2807,7 @@ static int henstand(DDukeActor *actor)
|
|||
else if (coll.type == kHitSprite)
|
||||
{
|
||||
auto hitact = coll.actor;
|
||||
fi.checkhitsprite(actor->GetIndex(), hitact->GetIndex());
|
||||
fi.checkhitsprite(actor, hitact);
|
||||
if (hitact->s.picnum == HEN)
|
||||
{
|
||||
auto ns = spawn(hitact, HENSTAND);
|
||||
|
|
|
@ -53,8 +53,8 @@ void checkplayerhurt_d(struct player_struct* p, int j);
|
|||
void checkplayerhurt_r(struct player_struct* p, int j);
|
||||
bool checkhitceiling_d(int sn);
|
||||
bool checkhitceiling_r(int sn);
|
||||
void checkhitsprite_d(int i, int sn);
|
||||
void checkhitsprite_r(int i, int sn);
|
||||
void checkhitsprite_d(DDukeActor* i, DDukeActor* sn);
|
||||
void checkhitsprite_r(DDukeActor* i, DDukeActor* sn);
|
||||
void checksectors_d(int snum);
|
||||
void checksectors_r(int snum);
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ struct Dispatcher
|
|||
void (*checkhitwall)(int spr, int dawallnum, int x, int y, int z, int atwith);
|
||||
void (*checkplayerhurt)(struct player_struct* p, int j);
|
||||
bool (*checkhitceiling)(int sn);
|
||||
void (*checkhitsprite)(int i, int sn);
|
||||
void (*checkhitsprite)(DDukeActor* i, DDukeActor* sn);
|
||||
void (*checksectors)(int low);
|
||||
|
||||
bool (*ceilingspace)(int sectnum);
|
||||
|
|
|
@ -276,7 +276,7 @@ static void shootknee(DDukeActor* actor, int p, int sx, int sy, int sz, int sa)
|
|||
|
||||
if (hitsprt && hitsprt->s.picnum != ACCESSSWITCH && hitsprt->s.picnum != ACCESSSWITCH2)
|
||||
{
|
||||
fi.checkhitsprite(hitsprt->GetIndex(), knee->GetIndex());
|
||||
fi.checkhitsprite(hitsprt, knee);
|
||||
if (p >= 0) fi.checkhitswitch(p, hitsprt->GetIndex(), 1);
|
||||
}
|
||||
|
||||
|
@ -440,7 +440,7 @@ static void shootweapon(DDukeActor *actor, int p, int sx, int sy, int sz, int sa
|
|||
|
||||
if (hitact)
|
||||
{
|
||||
fi.checkhitsprite(hitact->GetIndex(), spark->GetIndex());
|
||||
fi.checkhitsprite(hitact, spark);
|
||||
if (hitact->s.picnum == TILE_APLAYER && (ud.coop != 1 || ud.ffire == 1))
|
||||
{
|
||||
auto jib = spawn(spark, JIBS6);
|
||||
|
@ -536,7 +536,7 @@ static void shootweapon(DDukeActor *actor, int p, int sx, int sy, int sz, int sa
|
|||
|
||||
if (hitact)
|
||||
{
|
||||
fi.checkhitsprite(hitact->GetIndex(), spark->GetIndex());
|
||||
fi.checkhitsprite(hitact, spark);
|
||||
if (hitact->s.picnum != TILE_APLAYER)
|
||||
spawn(spark, SMALLSMOKE);
|
||||
else spark->s.xrepeat = spark->s.yrepeat = 0;
|
||||
|
@ -980,7 +980,7 @@ static void shootgrowspark(DDukeActor* actor, int p, int sx, int sy, int sz, int
|
|||
if (zvel < 0 && (sector[hitsect].ceilingstat & 1) == 0)
|
||||
fi.checkhitceiling(hitsect);
|
||||
}
|
||||
else if (hitsprt != nullptr) fi.checkhitsprite(hitsprt->GetIndex(), spark->GetIndex());
|
||||
else if (hitsprt != nullptr) fi.checkhitsprite(hitsprt, spark);
|
||||
else if (hitwall >= 0 && wall[hitwall].picnum != ACCESSSWITCH && wall[hitwall].picnum != ACCESSSWITCH2)
|
||||
{
|
||||
fi.checkhitwall(spark->GetIndex(), hitwall, hitx, hity, hitz, GROWSPARK);
|
||||
|
|
|
@ -174,7 +174,7 @@ static void shootmelee(DDukeActor *actor, int p, int sx, int sy, int sz, int sa,
|
|||
|
||||
if (hitsprt && hitsprt->s.picnum != ACCESSSWITCH && hitsprt->s.picnum != ACCESSSWITCH2)
|
||||
{
|
||||
fi.checkhitsprite(hitsprt->GetIndex(), wpn->GetIndex());
|
||||
fi.checkhitsprite(hitsprt, wpn);
|
||||
if (p >= 0) fi.checkhitswitch(p, hitsprt->GetIndex(), 1);
|
||||
}
|
||||
else if (hitwall >= 0)
|
||||
|
@ -341,7 +341,7 @@ static void shootweapon(DDukeActor* actor, int p, int sx, int sy, int sz, int sa
|
|||
{
|
||||
if (hitsprt->s.picnum == 1930)
|
||||
return;
|
||||
fi.checkhitsprite(hitsprt->GetIndex(), spark->GetIndex());
|
||||
fi.checkhitsprite(hitsprt, spark);
|
||||
if (hitsprt->s.picnum == TILE_APLAYER && (ud.coop != 1 || ud.ffire == 1))
|
||||
{
|
||||
auto l = spawn(spark, JIBS6);
|
||||
|
@ -441,7 +441,7 @@ static void shootweapon(DDukeActor* actor, int p, int sx, int sy, int sz, int sa
|
|||
|
||||
if (hitsprt)
|
||||
{
|
||||
fi.checkhitsprite(hitsprt->GetIndex(), spark->GetIndex());
|
||||
fi.checkhitsprite(hitsprt, spark);
|
||||
if (hitsprt->s.picnum != TILE_APLAYER)
|
||||
spawn(spark, SMALLSMOKE);
|
||||
else spark->s.xrepeat = spark->s.yrepeat = 0;
|
||||
|
|
|
@ -1486,11 +1486,6 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj)
|
|||
}
|
||||
}
|
||||
|
||||
void checkhitsprite_d(int targ, int proj)
|
||||
{
|
||||
checkhitsprite_d(&hittype[targ], &hittype[proj]);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
|
|
|
@ -2417,11 +2417,6 @@ void checkhitsprite_r(DDukeActor* targ, DDukeActor* proj)
|
|||
}
|
||||
}
|
||||
|
||||
void checkhitsprite_r(int targ, int proj)
|
||||
{
|
||||
checkhitsprite_r(&hittype[targ], &hittype[proj]);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue