mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-10 19:01:50 +00:00
Merge branch 'trick-prisons' into 'master'
Trick prisons Closes #784 See merge request KartKrew/Kart!1673
This commit is contained in:
commit
6639db90f3
4 changed files with 21 additions and 4 deletions
|
|
@ -30299,7 +30299,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
100, // mass
|
100, // mass
|
||||||
0, // damage
|
0, // damage
|
||||||
sfx_None, // activesound
|
sfx_None, // activesound
|
||||||
MF_SOLID|MF_SHOOTABLE|MF_DONTENCOREMAP, // flags
|
MF_SOLID|MF_SHOOTABLE|MF_DONTENCOREMAP|MF_DONTPUNT, // flags
|
||||||
S_NULL // raisestate
|
S_NULL // raisestate
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1233,7 +1233,8 @@ void K_PuntHazard(mobj_t *t1, mobj_t *t2)
|
||||||
|
|
||||||
boolean K_PuntCollide(mobj_t *t1, mobj_t *t2)
|
boolean K_PuntCollide(mobj_t *t1, mobj_t *t2)
|
||||||
{
|
{
|
||||||
if (t1->flags & MF_DONTPUNT)
|
// MF_SHOOTABLE will get damaged directly, instead
|
||||||
|
if (t1->flags & (MF_DONTPUNT | MF_SHOOTABLE))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13160,6 +13160,11 @@ boolean K_IsPlayingDisplayPlayer(player_t *player)
|
||||||
|
|
||||||
boolean K_PlayerCanPunt(player_t *player)
|
boolean K_PlayerCanPunt(player_t *player)
|
||||||
{
|
{
|
||||||
|
if (player->trickpanel > TRICKSTATE_READY)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (player->invincibilitytimer > 0)
|
if (player->invincibilitytimer > 0)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
15
src/p_map.c
15
src/p_map.c
|
|
@ -1472,11 +1472,11 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing)
|
||||||
// The bump has to happen last
|
// The bump has to happen last
|
||||||
if (P_IsObjectOnGround(thing) && tm.thing->momz < 0 && tm.thing->player->trickpanel)
|
if (P_IsObjectOnGround(thing) && tm.thing->momz < 0 && tm.thing->player->trickpanel)
|
||||||
{
|
{
|
||||||
P_DamageMobj(thing, tm.thing, tm.thing, 1, DMG_WIPEOUT|DMG_STEAL);
|
P_DamageMobj(thing, tm.thing, tm.thing, 1, DMG_TUMBLE);
|
||||||
}
|
}
|
||||||
else if (P_IsObjectOnGround(tm.thing) && thing->momz < 0 && thing->player->trickpanel)
|
else if (P_IsObjectOnGround(tm.thing) && thing->momz < 0 && thing->player->trickpanel)
|
||||||
{
|
{
|
||||||
P_DamageMobj(tm.thing, thing, thing, 1, DMG_WIPEOUT|DMG_STEAL);
|
P_DamageMobj(tm.thing, thing, thing, 1, DMG_TUMBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (K_KartBouncing(tm.thing, thing) == true)
|
if (K_KartBouncing(tm.thing, thing) == true)
|
||||||
|
|
@ -1616,6 +1616,17 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing)
|
||||||
K_KartBouncing(tm.thing, thing);
|
K_KartBouncing(tm.thing, thing);
|
||||||
return BMIT_CONTINUE;
|
return BMIT_CONTINUE;
|
||||||
}
|
}
|
||||||
|
else if ((thing->flags & MF_SHOOTABLE) && K_PlayerCanPunt(tm.thing->player))
|
||||||
|
{
|
||||||
|
// see if it went over / under
|
||||||
|
if (tm.thing->z > thing->z + thing->height)
|
||||||
|
return BMIT_CONTINUE; // overhead
|
||||||
|
if (tm.thing->z + tm.thing->height < thing->z)
|
||||||
|
return BMIT_CONTINUE; // underneath
|
||||||
|
|
||||||
|
P_DamageMobj(thing, tm.thing, tm.thing, 1, DMG_NORMAL);
|
||||||
|
return BMIT_CONTINUE;
|
||||||
|
}
|
||||||
else if (thing->flags & MF_SOLID)
|
else if (thing->flags & MF_SOLID)
|
||||||
{
|
{
|
||||||
// see if it went over / under
|
// see if it went over / under
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue