mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 20:41:46 +00:00
Broly screen shake is done on the source object
Screen shake was being done from the Broly vfx, which does scaling shenanigans so it caused Proximity Mine explosions to make the camera go apeshit. I'm also pretty sure the hitlag calcs Proximity Mine did for the broly effect was wrong, not sure though? I'm trying something else and I think it's better.
This commit is contained in:
parent
ca0b5902ba
commit
91955b1383
4 changed files with 16 additions and 10 deletions
|
|
@ -305,7 +305,7 @@ static inline BlockItReturn_t PIT_SSMineExplode(mobj_t *thing)
|
|||
|
||||
lagadded = (thing->hitlag - oldhitlag);
|
||||
|
||||
if (lagadded > 0)
|
||||
if (lagadded > minehitlag)
|
||||
{
|
||||
minehitlag = lagadded;
|
||||
}
|
||||
|
|
@ -337,19 +337,17 @@ tic_t K_MineExplodeAttack(mobj_t *actor, fixed_t size, boolean spin)
|
|||
// Set this flag to ensure that the inital action won't be triggered twice.
|
||||
actor->flags2 |= MF2_DEBRIS;
|
||||
|
||||
if (minehitlag == 0)
|
||||
{
|
||||
minehitlag = actor->hitlag;
|
||||
}
|
||||
|
||||
// Set this flag to ensure the hitbox timer doesn't get extended with every player hit
|
||||
actor->flags |= MF_NOHITLAGFORME;
|
||||
actor->hitlag = 0; // same deal
|
||||
|
||||
if (!spin)
|
||||
{
|
||||
if (minehitlag == 0)
|
||||
{
|
||||
minehitlag = actor->hitlag;
|
||||
}
|
||||
|
||||
Obj_SpawnBrolyKi(actor, minehitlag);
|
||||
|
||||
return minehitlag;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4499,6 +4499,11 @@ void K_MineFlashScreen(mobj_t *source)
|
|||
INT32 pnum;
|
||||
player_t *p;
|
||||
|
||||
if (P_MobjWasRemoved(source))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
S_StartSound(source, sfx_s3k4e);
|
||||
P_StartQuakeFromMobj(12, 55 * source->scale, MINEQUAKEDIST * source->scale, source);
|
||||
|
||||
|
|
@ -4608,6 +4613,8 @@ void K_SpawnMineExplosion(mobj_t *source, UINT8 color, tic_t delay)
|
|||
truc->hitlag += delay;
|
||||
truc->renderflags |= RF_DONTDRAW;
|
||||
}
|
||||
|
||||
Obj_SpawnBrolyKi(source, delay);
|
||||
}
|
||||
|
||||
#undef MINEQUAKEDIST
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@ Obj_SpawnBrolyKi
|
|||
x = P_SpawnMobjFromMobj(
|
||||
source, 0, 0, 0, MT_BROLY);
|
||||
|
||||
P_SetTarget(&x->target, source);
|
||||
|
||||
// Shrink into center of source object.
|
||||
x->z = (source->z + source->height / 2);
|
||||
|
||||
|
|
|
|||
|
|
@ -13063,12 +13063,11 @@ void A_SSMineExplode(mobj_t *actor)
|
|||
|
||||
void A_SSMineFlash(mobj_t *actor)
|
||||
{
|
||||
K_MineFlashScreen(actor);
|
||||
K_MineFlashScreen(actor->target);
|
||||
}
|
||||
|
||||
void A_LandMineExplode(mobj_t *actor)
|
||||
{
|
||||
|
||||
mobj_t *expl;
|
||||
INT32 colour = SKINCOLOR_KETCHUP; // we spell words properly here
|
||||
INT32 i;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue