Don't allow k_flamedash to damage without flame shield

This commit is contained in:
Sally Cochenour 2020-03-26 01:14:57 -04:00
parent b6c282ec12
commit 4ddf1e4280
2 changed files with 13 additions and 11 deletions

View file

@ -7716,22 +7716,23 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
player->kartstuff[k_itemtype] = KITEM_NONE;
}
if (K_GetShieldFromItem(player->kartstuff[k_itemtype]) == KSHIELD_NONE)
{
player->kartstuff[k_curshield] = KSHIELD_NONE; // RESET shield type
player->kartstuff[k_bubbleblowup] = 0;
player->kartstuff[k_bubblecool] = 0;
player->kartstuff[k_flamelength] = 0;
player->kartstuff[k_flamemeter] = 0;
}
if (spbplace == -1 || player->kartstuff[k_position] != spbplace)
player->kartstuff[k_ringlock] = 0; // reset ring lock
if (K_GetShieldFromItem(player->kartstuff[k_itemtype]) == KSHIELD_NONE)
player->kartstuff[k_curshield] = KSHIELD_NONE; // RESET shield type
if (player->kartstuff[k_itemtype] == KITEM_SPB
|| player->kartstuff[k_itemtype] == KITEM_SHRINK
|| player->kartstuff[k_growshrinktimer] < 0)
indirectitemcooldown = 20*TICRATE;
if (player->kartstuff[k_itemtype] != KITEM_FLAMESHIELD)
{
player->kartstuff[k_flamelength] = 0;
}
if (player->kartstuff[k_hyudorotimer] > 0)
{
if (splitscreen)

View file

@ -1416,7 +1416,6 @@ static boolean PIT_CheckThing(mobj_t *thing)
// Make sure they aren't able to damage you ANYWHERE along the Z axis, you have to be TOUCHING the person.
&& !(thing->z + thing->height < tmthing->z || thing->z > tmthing->z + tmthing->height))
{
if (tmthing->scale > thing->scale + (mapobjectscale/8)) // SRB2kart - Handle squishes first!
K_SquishPlayer(thing->player, tmthing, tmthing);
else if (thing->scale > tmthing->scale + (mapobjectscale/8))
@ -1425,9 +1424,11 @@ static boolean PIT_CheckThing(mobj_t *thing)
P_DamageMobj(thing, tmthing, tmthing, 1);
else if (thing->player->kartstuff[k_invincibilitytimer] && !tmthing->player->kartstuff[k_invincibilitytimer])
P_DamageMobj(tmthing, thing, thing, 1);
else if (tmthing->player->kartstuff[k_flamedash] && !thing->player->kartstuff[k_flamedash]) // SRB2kart - Then flame shield!
else if ((tmthing->player->kartstuff[k_flamedash] && tmthing->player->kartstuff[k_itemtype] == KITEM_FLAMESHIELD)
&& !(thing->player->kartstuff[k_flamedash] && thing->player->kartstuff[k_itemtype] == KITEM_FLAMESHIELD)) // SRB2kart - Then flame shield!
P_DamageMobj(thing, tmthing, tmthing, 1);
else if (thing->player->kartstuff[k_flamedash] && !tmthing->player->kartstuff[k_flamedash])
else if ((thing->player->kartstuff[k_flamedash] && thing->player->kartstuff[k_itemtype] == KITEM_FLAMESHIELD)
&& !(tmthing->player->kartstuff[k_flamedash] && tmthing->player->kartstuff[k_itemtype] == KITEM_FLAMESHIELD)) // SRB2kart - Then flame shield!
P_DamageMobj(tmthing, thing, thing, 1);
/*if (G_BattleGametype() && (!G_GametypeHasTeams() || tmthing->player->ctfteam != thing->player->ctfteam))