mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Use scale for all grow/shrink interactions
This commit is contained in:
parent
c488fc79a5
commit
bd1faa3178
4 changed files with 20 additions and 9 deletions
|
|
@ -852,7 +852,7 @@ boolean K_SMKIceBlockCollide(mobj_t *t1, mobj_t *t2)
|
|||
|
||||
/*
|
||||
if (t2->player && (t2->player->invincibilitytimer > 0
|
||||
|| t2->player->growshrinktimer > 0))
|
||||
|| K_IsBigger(t2, t1) == true))
|
||||
return true;
|
||||
*/
|
||||
|
||||
|
|
@ -936,8 +936,8 @@ boolean K_PvPTouchDamage(mobj_t *t1, mobj_t *t2)
|
|||
}
|
||||
|
||||
// Cause stumble on scale difference
|
||||
t1Condition = (t1->scale > t2->scale + (mapobjectscale/8));
|
||||
t2Condition = (t2->scale > t1->scale + (mapobjectscale/8));
|
||||
t1Condition = K_IsBigger(t1, t2);
|
||||
t2Condition = K_IsBigger(t2, t1);
|
||||
|
||||
if (t1Condition == true && t2Condition == false)
|
||||
{
|
||||
|
|
|
|||
13
src/k_kart.c
13
src/k_kart.c
|
|
@ -1409,7 +1409,7 @@ fixed_t K_GetMobjWeight(mobj_t *mobj, mobj_t *against)
|
|||
case MT_FALLINGROCK:
|
||||
if (against->player)
|
||||
{
|
||||
if (against->player->invincibilitytimer || against->player->growshrinktimer > 0)
|
||||
if (against->player->invincibilitytimer || K_IsBigger(against, mobj) == true)
|
||||
weight = 0;
|
||||
else
|
||||
weight = K_PlayerWeight(against, NULL);
|
||||
|
|
@ -3935,6 +3935,17 @@ void K_RemoveGrowShrink(player_t *player)
|
|||
P_RestoreMusic(player);
|
||||
}
|
||||
|
||||
boolean K_IsBigger(mobj_t *compare, mobj_t *other)
|
||||
{
|
||||
if ((compare == NULL || P_MobjWasRemoved(compare) == true)
|
||||
|| (other == NULL || P_MobjWasRemoved(other) == true))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return (compare->scale > other->scale + (mapobjectscale/2));
|
||||
}
|
||||
|
||||
static fixed_t K_TumbleZ(mobj_t *mo, fixed_t input)
|
||||
{
|
||||
// Scales base tumble gravity to FRACUNIT
|
||||
|
|
|
|||
|
|
@ -387,7 +387,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
|
||||
// kill
|
||||
if (player->invincibilitytimer > 0
|
||||
|| player->growshrinktimer > 0
|
||||
|| K_IsBigger(toucher, special) == true
|
||||
|| player->flamedash > 0)
|
||||
{
|
||||
P_KillMobj(special, toucher, toucher, DMG_NORMAL);
|
||||
|
|
@ -1926,7 +1926,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
}
|
||||
}
|
||||
|
||||
if (player->invincibilitytimer > 0 || player->growshrinktimer > 0 || player->hyudorotimer > 0)
|
||||
if (player->invincibilitytimer > 0 || K_IsBigger(target, inflictor) == true || player->hyudorotimer > 0)
|
||||
{
|
||||
// Full invulnerability
|
||||
K_DoInstashield(player);
|
||||
|
|
|
|||
|
|
@ -1368,7 +1368,7 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing)
|
|||
return BMIT_CONTINUE; // dead
|
||||
|
||||
if (tmthing->player->invincibilitytimer > 0
|
||||
|| tmthing->player->growshrinktimer > 0)
|
||||
|| K_IsBigger(tmthing, thing) == true)
|
||||
{
|
||||
if (thing->type == MT_BLUEROBRA_JOINT)
|
||||
P_KillMobj(thing->target, tmthing, tmthing, DMG_NORMAL);
|
||||
|
|
@ -1394,7 +1394,7 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing)
|
|||
return BMIT_CONTINUE; // dead
|
||||
|
||||
if (tmthing->player->invincibilitytimer > 0
|
||||
|| tmthing->player->growshrinktimer > 0)
|
||||
|| K_IsBigger(tmthing, thing) == true)
|
||||
{
|
||||
P_KillMobj(thing, tmthing, tmthing, DMG_NORMAL);
|
||||
return BMIT_CONTINUE; // kill
|
||||
|
|
@ -1425,7 +1425,7 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing)
|
|||
|
||||
// kill
|
||||
if (tmthing->player->invincibilitytimer > 0
|
||||
|| tmthing->player->growshrinktimer > 0)
|
||||
|| K_IsBigger(tmthing, thing) == true)
|
||||
{
|
||||
P_KillMobj(thing, tmthing, tmthing, DMG_NORMAL);
|
||||
return BMIT_CONTINUE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue