mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-22 10:02:01 +00:00
Let player kill shootable objects if player can punt
This commit is contained in:
parent
6a94d8cfa2
commit
38d9875d4c
2 changed files with 13 additions and 1 deletions
|
|
@ -1233,7 +1233,8 @@ void K_PuntHazard(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;
|
||||
}
|
||||
|
|
|
|||
11
src/p_map.c
11
src/p_map.c
|
|
@ -1616,6 +1616,17 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing)
|
|||
K_KartBouncing(tm.thing, thing);
|
||||
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)
|
||||
{
|
||||
// see if it went over / under
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue