diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 3e113bd76..ecb7f7436 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -39,6 +39,7 @@ #include "../f_finale.h" #include "../r_things.h" // R_GetShadowZ #include "../p_slopes.h" +#include "../k_kart.h" // HITLAGJITTERS #include "hw_md2.h" #ifdef NEWCLIP @@ -3645,7 +3646,7 @@ static void HWR_DrawDropShadow(mobj_t *thing, fixed_t scale) // hitlag vibrating if (thing->hitlag > 0 && (thing->eflags & MFE_DAMAGEHITLAG)) { - fixed_t mul = thing->hitlag * (FRACUNIT / 10); + fixed_t mul = thing->hitlag * HITLAGJITTERS; if (leveltime & 1) { @@ -5064,7 +5065,7 @@ static void HWR_ProjectSprite(mobj_t *thing) // hitlag vibrating if (thing->hitlag > 0 && (thing->eflags & MFE_DAMAGEHITLAG)) { - fixed_t mul = thing->hitlag * (FRACUNIT / 10); + fixed_t mul = thing->hitlag * HITLAGJITTERS; if (leveltime & 1) { diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c index 4b8d1de6f..69f00d898 100644 --- a/src/hardware/hw_md2.c +++ b/src/hardware/hw_md2.c @@ -45,6 +45,7 @@ // SRB2Kart #include "../k_color.h" +#include "../k_kart.h" // HITLAGJITTERS #ifdef HAVE_PNG @@ -1374,7 +1375,7 @@ boolean HWR_DrawModel(gl_vissprite_t *spr) // hitlag vibrating if (spr->mobj->hitlag > 0 && (spr->mobj->eflags & MFE_DAMAGEHITLAG)) { - fixed_t mul = spr->mobj->hitlag * (FRACUNIT / 10); + fixed_t mul = spr->mobj->hitlag * HITLAGJITTERS; if (leveltime & 1) { diff --git a/src/k_hud.c b/src/k_hud.c index 25b437f5c..39ce118e8 100644 --- a/src/k_hud.c +++ b/src/k_hud.c @@ -3744,7 +3744,7 @@ static void K_drawKartFirstPerson(void) // hitlag vibrating if (stplyr->mo->hitlag > 0 && (stplyr->mo->eflags & MFE_DAMAGEHITLAG)) { - fixed_t mul = stplyr->mo->hitlag * (FRACUNIT / 10); + fixed_t mul = stplyr->mo->hitlag * HITLAGJITTERS; if (r_splitscreen && mul > FRACUNIT) mul = FRACUNIT; diff --git a/src/k_kart.h b/src/k_kart.h index 540e6845c..1efc5fb2f 100644 --- a/src/k_kart.h +++ b/src/k_kart.h @@ -20,6 +20,7 @@ Make sure this matches the actual number of states #define KART_NUMINVSPARKLESANIM 12 #define MAXHITLAGTICS 18 //12 +#define HITLAGJITTERS (FRACUNIT / 32) player_t *K_GetItemBoxPlayer(mobj_t *mobj); angle_t K_ReflectAngle(angle_t angle, angle_t against, fixed_t maxspeed, fixed_t yourspeed); diff --git a/src/r_things.c b/src/r_things.c index defd02a5f..197100470 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -35,7 +35,6 @@ #include "p_slopes.h" #include "d_netfil.h" // blargh. for nameonly(). #include "m_cheat.h" // objectplace -#include "k_color.h" // SRB2kart #include "p_local.h" // stplyr #ifdef HWRENDER #include "hardware/hw_md2.h" @@ -44,6 +43,10 @@ #include "hardware/hw_drv.h" #endif +// SRB2kart +#include "k_color.h" +#include "k_kart.h" // HITLAGJITTERS + #define MINZ (FRACUNIT*4) #define BASEYCENTER (BASEVIDHEIGHT/2) @@ -1438,7 +1441,7 @@ static void R_ProjectSprite(mobj_t *thing) // hitlag vibrating if (thing->hitlag > 0 && (thing->eflags & MFE_DAMAGEHITLAG)) { - fixed_t mul = thing->hitlag * (FRACUNIT / 10); + fixed_t mul = thing->hitlag * HITLAGJITTERS; if (leveltime & 1) {