mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Obj_IsSuperFlickyWhippable: pass target
- Old behavior: if flicky is chasing itself. What? Why did I write this??
This commit is contained in:
parent
bfe3e72d3c
commit
b1c0f6647e
3 changed files with 4 additions and 4 deletions
|
|
@ -925,7 +925,7 @@ boolean K_InstaWhipCollide(mobj_t *shield, mobj_t *victim)
|
|||
}
|
||||
else if (victim->type == MT_SUPER_FLICKY)
|
||||
{
|
||||
if (Obj_IsSuperFlickyWhippable(victim))
|
||||
if (Obj_IsSuperFlickyWhippable(victim, attacker))
|
||||
{
|
||||
K_AddHitLag(victim, victimHitlag, true);
|
||||
K_AddHitLag(attacker, attackerHitlag, false);
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ void Obj_BlockSuperFlicky(mobj_t *flicky);
|
|||
void Obj_SuperFlickyPlayerCollide(mobj_t *flicky, mobj_t *player);
|
||||
void Obj_SuperFlickyLanding(mobj_t *flicky);
|
||||
mobj_t *Obj_SuperFlickyOwner(const mobj_t *flicky);
|
||||
boolean Obj_IsSuperFlickyWhippable(const mobj_t *flicky);
|
||||
boolean Obj_IsSuperFlickyWhippable(const mobj_t *flicky, const mobj_t *target);
|
||||
boolean Obj_IsSuperFlickyTargettingYou(const mobj_t *flicky, mobj_t *player);
|
||||
|
||||
/* Battle/Power-UP UFO */
|
||||
|
|
|
|||
|
|
@ -768,11 +768,11 @@ mobj_t *Obj_SuperFlickyOwner(const mobj_t* mobj)
|
|||
return x->valid() ? x->source() : nullptr;
|
||||
}
|
||||
|
||||
boolean Obj_IsSuperFlickyWhippable(const mobj_t* mobj)
|
||||
boolean Obj_IsSuperFlickyWhippable(const mobj_t* mobj, const mobj_t* target)
|
||||
{
|
||||
const Flicky* x = static_cast<const Flicky*>(mobj);
|
||||
|
||||
return mobj == x->chasing() && !x->stunned();
|
||||
return target == x->chasing() && !x->stunned();
|
||||
}
|
||||
|
||||
boolean Obj_IsSuperFlickyTargettingYou(const mobj_t* mobj, mobj_t *player)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue