mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-31 12:13:16 +00:00
Merge branch 'snapify-hitlag' into 'master'
Snapify Hitlag 2 See merge request KartKrew/Kart!461
This commit is contained in:
commit
d0caa79414
7 changed files with 20 additions and 11 deletions
|
|
@ -40,6 +40,7 @@
|
|||
#include "../r_things.h" // R_GetShadowZ
|
||||
#include "../d_main.h"
|
||||
#include "../p_slopes.h"
|
||||
#include "../k_kart.h" // HITLAGJITTERS
|
||||
#include "hw_md2.h"
|
||||
|
||||
#ifdef NEWCLIP
|
||||
|
|
@ -3655,7 +3656,7 @@ static void HWR_DrawDropShadow(mobj_t *thing, fixed_t scale)
|
|||
// hitlag vibrating (todo: interp somehow?)
|
||||
if (thing->hitlag > 0 && (thing->eflags & MFE_DAMAGEHITLAG))
|
||||
{
|
||||
fixed_t mul = thing->hitlag * (FRACUNIT / 10);
|
||||
fixed_t mul = thing->hitlag * HITLAGJITTERS;
|
||||
|
||||
if (leveltime & 1)
|
||||
{
|
||||
|
|
@ -5103,7 +5104,7 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
|||
// hitlag vibrating (todo: interp somehow?)
|
||||
if (thing->hitlag > 0 && (thing->eflags & MFE_DAMAGEHITLAG))
|
||||
{
|
||||
fixed_t mul = thing->hitlag * (FRACUNIT / 10);
|
||||
fixed_t mul = thing->hitlag * HITLAGJITTERS;
|
||||
|
||||
if (leveltime & 1)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@
|
|||
|
||||
// SRB2Kart
|
||||
#include "../k_color.h"
|
||||
#include "../k_kart.h" // HITLAGJITTERS
|
||||
|
||||
#ifdef HAVE_PNG
|
||||
|
||||
|
|
@ -1382,7 +1383,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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3861,7 +3861,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;
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ Make sure this matches the actual number of states
|
|||
#define KART_NUMINVSPARKLESANIM 12
|
||||
|
||||
#define MAXHITLAGTICS 18 //12
|
||||
#define HITLAGJITTERS (FRACUNIT / 20)
|
||||
|
||||
player_t *K_GetItemBoxPlayer(mobj_t *mobj);
|
||||
angle_t K_ReflectAngle(angle_t angle, angle_t against, fixed_t maxspeed, fixed_t yourspeed);
|
||||
|
|
|
|||
|
|
@ -11194,10 +11194,13 @@ void A_MineExplode(mobj_t *actor)
|
|||
A_Scream(actor);
|
||||
actor->flags = MF_NOGRAVITY|MF_NOCLIP;
|
||||
|
||||
/*
|
||||
quake.epicenter = NULL;
|
||||
quake.radius = 512*FRACUNIT;
|
||||
quake.intensity = 8*FRACUNIT;
|
||||
quake.time = TICRATE/3;
|
||||
*/
|
||||
P_StartQuake(8<<FRACBITS, TICRATE/3);
|
||||
|
||||
P_RadiusAttack(actor, actor->tracer, 192*FRACUNIT, 0, true);
|
||||
P_MobjCheckWater(actor);
|
||||
|
|
@ -12204,9 +12207,9 @@ void A_Boss5BombExplode(mobj_t *actor)
|
|||
|
||||
P_DustRing(locvar1, 4, actor->x, actor->y, actor->z+actor->height, 2*actor->radius, 0, FRACUNIT, actor->scale);
|
||||
P_DustRing(locvar1, 6, actor->x, actor->y, actor->z+actor->height/2, 3*actor->radius, FRACUNIT, FRACUNIT, actor->scale);
|
||||
//P_StartQuake(9*actor->scale, TICRATE/6, {actor->x, actor->y, actor->z}, 20*actor->radius);
|
||||
//P_StartQuake(9*FRACUNIT, TICRATE/6, {actor->x, actor->y, actor->z}, 20*actor->radius);
|
||||
// the above does not exist, so we set the quake values directly instead
|
||||
quake.intensity = 9*actor->scale;
|
||||
quake.intensity = 9*FRACUNIT;
|
||||
quake.time = TICRATE/6;
|
||||
// the following quake values have no effect atm? ah well, may as well set them anyway
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2982,9 +2982,9 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
|||
|
||||
// reasonable defaults.
|
||||
if (!quake.intensity)
|
||||
quake.intensity = 8<<FRACBITS;
|
||||
quake.intensity = 8*mapobjectscale;
|
||||
if (!quake.radius)
|
||||
quake.radius = 512<<FRACBITS;
|
||||
quake.radius = 512*mapobjectscale;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -8752,6 +8752,6 @@ static void P_SpawnPushers(void)
|
|||
// epicenter and radius are not yet used.
|
||||
void P_StartQuake(fixed_t intensity, tic_t time)
|
||||
{
|
||||
quake.intensity = intensity;
|
||||
quake.intensity = FixedMul(intensity, mapobjectscale);
|
||||
quake.time = time;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
@ -1453,7 +1456,7 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
// hitlag vibrating (todo: interp somehow?)
|
||||
if (thing->hitlag > 0 && (thing->eflags & MFE_DAMAGEHITLAG))
|
||||
{
|
||||
fixed_t mul = thing->hitlag * (FRACUNIT / 10);
|
||||
fixed_t mul = thing->hitlag * HITLAGJITTERS;
|
||||
|
||||
if (leveltime & 1)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue