RingRacers/src/k_collide.h
James R 61cad641bb Invincible player punts hazardous/solid things, unless MF_ELEMENTAL
If player is in one of these states:

- Invincibility
- Grow (K_IsBigger)
- Flame Shield dash
- Over 200% speed

And the other object:

- Does not have MF_DONTPUNT

Then, touching a solid object:

- Punts the object, unless the object has MF_ELEMENTAL
- Fizzles the object, if the object has MF_ELEMENTAL

Or, when an object damages the player:

- That object is punted, unless it has MF_ELEMENTAL
- The object fizzles, if it has MF_ELEMENTAL

Punting means:

- A copy of the object is made
- Both the player and copy receive 5 tics of hitlag
- The copy is thrust away from the player at a minimum of
  60 FU, or 2x either the player's or object's momentum,
  whichever is ultimately greater
- The copy despawns after 2 seconds
- The copy flickers constantly, while thrust away

Fizzling means:

- The object disappears completely
- A puff of smoke is spawned in place of the object
- No hitlag is applied to the player

Both punting and fizzling:

- Hide the original object (intangible and invisible)
- The original object reppears after 30 seconds
- For 2 seconds before reappearing, the object flickers
  back in, but is still intangible
2023-11-13 22:18:35 -08:00

43 lines
1.1 KiB
C

#ifndef __K_COLLIDE__
#define __K_COLLIDE__
#include "doomtype.h"
#include "p_mobj.h"
#ifdef __cplusplus
extern "C" {
#endif
angle_t K_GetCollideAngle(mobj_t *t1, mobj_t *t2);
boolean K_BananaBallhogCollide(mobj_t *t1, mobj_t *t2);
boolean K_EggItemCollide(mobj_t *t1, mobj_t *t2);
void K_DoMineSearch(mobj_t *actor, fixed_t size);
tic_t K_MineExplodeAttack(mobj_t *actor, fixed_t size, boolean spin);
boolean K_MineCollide(mobj_t *t1, mobj_t *t2);
boolean K_LandMineCollide(mobj_t *t1, mobj_t *t2);
boolean K_DropTargetCollide(mobj_t *t1, mobj_t *t2);
void K_LightningShieldAttack(mobj_t *actor, fixed_t size);
boolean K_BubbleShieldCollide(mobj_t *t1, mobj_t *t2);
boolean K_InstaWhipCollide(mobj_t *shield, mobj_t *victim);
boolean K_KitchenSinkCollide(mobj_t *t1, mobj_t *t2);
boolean K_FallingRockCollide(mobj_t *t1, mobj_t *t2);
boolean K_SMKIceBlockCollide(mobj_t *t1, mobj_t *t2);
boolean K_PvPTouchDamage(mobj_t *t1, mobj_t *t2);
void K_PuntHazard(mobj_t *t1, mobj_t *t2);
boolean K_PuntCollide(mobj_t *t1, mobj_t *t2);
#ifdef __cplusplus
} // extern "C"
#endif
#endif