mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'shield-shenanigans' into 'master'
Fix various shield checks using item instead of curshield Closes #1501 See merge request kart-krew-dev/ring-racers-internal!2544
This commit is contained in:
commit
3e9d6858bf
4 changed files with 9 additions and 9 deletions
|
|
@ -1224,7 +1224,7 @@ boolean K_PvPTouchDamage(mobj_t *t1, mobj_t *t2)
|
||||||
// Ring sting, this is a bit more unique
|
// Ring sting, this is a bit more unique
|
||||||
auto doSting = [](mobj_t *t1, mobj_t *t2)
|
auto doSting = [](mobj_t *t1, mobj_t *t2)
|
||||||
{
|
{
|
||||||
if (K_GetShieldFromItem(t2->player->itemtype) != KSHIELD_NONE)
|
if (t2->player->curshield != KSHIELD_NONE)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
12
src/k_kart.c
12
src/k_kart.c
|
|
@ -697,7 +697,7 @@ static fixed_t K_PlayerWeight(mobj_t *mobj, mobj_t *against)
|
||||||
}
|
}
|
||||||
else if (against && !P_MobjWasRemoved(against) && against->player
|
else if (against && !P_MobjWasRemoved(against) && against->player
|
||||||
&& ((!P_PlayerInPain(against->player) && P_PlayerInPain(mobj->player)) // You're hurt
|
&& ((!P_PlayerInPain(against->player) && P_PlayerInPain(mobj->player)) // You're hurt
|
||||||
|| (against->player->itemtype == KITEM_BUBBLESHIELD && mobj->player->itemtype != KITEM_BUBBLESHIELD))) // They have a Bubble Shield
|
|| (against->player->curshield == KSHIELD_BUBBLE && mobj->player->curshield != KSHIELD_BUBBLE))) // They have a Bubble Shield
|
||||||
{
|
{
|
||||||
weight = 0; // This player does not cause any bump action
|
weight = 0; // This player does not cause any bump action
|
||||||
}
|
}
|
||||||
|
|
@ -721,7 +721,7 @@ static fixed_t K_PlayerWeight(mobj_t *mobj, mobj_t *against)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (mobj->player->itemtype == KITEM_BUBBLESHIELD)
|
if (mobj->player->curshield == KSHIELD_BUBBLE)
|
||||||
weight += 9*FRACUNIT;
|
weight += 9*FRACUNIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -814,8 +814,8 @@ static void K_SpawnBumpForObjs(mobj_t *mobj1, mobj_t *mobj2)
|
||||||
|
|
||||||
P_SetScale(fx, (fx->destscale = avgScale));
|
P_SetScale(fx, (fx->destscale = avgScale));
|
||||||
|
|
||||||
if ((mobj1->player && mobj1->player->itemtype == KITEM_BUBBLESHIELD)
|
if ((mobj1->player && mobj1->player->curshield == KSHIELD_BUBBLE)
|
||||||
|| (mobj2->player && mobj2->player->itemtype == KITEM_BUBBLESHIELD))
|
|| (mobj2->player && mobj2->player->curshield == KSHIELD_BUBBLE))
|
||||||
{
|
{
|
||||||
S_StartSound(mobj1, sfx_s3k44);
|
S_StartSound(mobj1, sfx_s3k44);
|
||||||
}
|
}
|
||||||
|
|
@ -7461,7 +7461,7 @@ void K_UpdateHnextList(player_t *player, boolean clean)
|
||||||
// For getting hit!
|
// For getting hit!
|
||||||
void K_PopPlayerShield(player_t *player)
|
void K_PopPlayerShield(player_t *player)
|
||||||
{
|
{
|
||||||
INT32 shield = K_GetShieldFromItem(player->itemtype);
|
INT32 shield = player->curshield;
|
||||||
|
|
||||||
// Doesn't apply if player is invalid.
|
// Doesn't apply if player is invalid.
|
||||||
if (player->mo == NULL || P_MobjWasRemoved(player->mo))
|
if (player->mo == NULL || P_MobjWasRemoved(player->mo))
|
||||||
|
|
@ -10566,7 +10566,7 @@ void K_KartPlayerAfterThink(player_t *player)
|
||||||
player->jawztargetdelay = 0;
|
player->jawztargetdelay = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->itemtype == KITEM_LIGHTNINGSHIELD || ((gametyperules & GTR_POWERSTONES) && K_IsPlayerWanted(player)))
|
if (player->curshield == KSHIELD_LIGHTNING || ((gametyperules & GTR_POWERSTONES) && K_IsPlayerWanted(player)))
|
||||||
{
|
{
|
||||||
K_LookForRings(player->mo);
|
K_LookForRings(player->mo);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1078,7 +1078,7 @@ static boolean K_IsItemUselessAlone(kartitems_t item)
|
||||||
case KRITEM_TRIPLEORBINAUT:
|
case KRITEM_TRIPLEORBINAUT:
|
||||||
case KRITEM_QUADORBINAUT:
|
case KRITEM_QUADORBINAUT:
|
||||||
case KITEM_BALLHOG:
|
case KITEM_BALLHOG:
|
||||||
case KITEM_BUBBLESHIELD:
|
case KITEM_BUBBLESHIELD: // shhhhhh
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -3640,7 +3640,7 @@ void A_AttractChase(mobj_t *actor)
|
||||||
if (
|
if (
|
||||||
actor->tracer->player && actor->tracer->health
|
actor->tracer->player && actor->tracer->health
|
||||||
&& ((gametyperules & GTR_SPHERES)
|
&& ((gametyperules & GTR_SPHERES)
|
||||||
|| (actor->tracer->player->itemtype == KITEM_LIGHTNINGSHIELD
|
|| (actor->tracer->player->curshield == KSHIELD_LIGHTNING
|
||||||
&& RINGTOTAL(actor->tracer->player) < 20
|
&& RINGTOTAL(actor->tracer->player) < 20
|
||||||
&& !(actor->tracer->player->pflags & PF_RINGLOCK)))
|
&& !(actor->tracer->player->pflags & PF_RINGLOCK)))
|
||||||
//&& P_CheckSight(actor, actor->tracer)
|
//&& P_CheckSight(actor, actor->tracer)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue