mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Create a quick P_StartQuake without epicenter/radius support and clean up the grand total of 4 earthquake uses in the code
This commit is contained in:
parent
f467791161
commit
fc789790bb
5 changed files with 18 additions and 13 deletions
|
|
@ -3157,10 +3157,7 @@ void K_ExplodePlayer(player_t *player, mobj_t *source, mobj_t *inflictor) // A b
|
||||||
K_PlayPainSound(player->mo);
|
K_PlayPainSound(player->mo);
|
||||||
|
|
||||||
if (P_IsDisplayPlayer(player))
|
if (P_IsDisplayPlayer(player))
|
||||||
{
|
P_StartQuake(64<<FRACBITS, 5);
|
||||||
quake.intensity = 64*FRACUNIT;
|
|
||||||
quake.time = 5;
|
|
||||||
}
|
|
||||||
|
|
||||||
player->kartstuff[k_instashield] = 15;
|
player->kartstuff[k_instashield] = 15;
|
||||||
K_DropItems(player);
|
K_DropItems(player);
|
||||||
|
|
|
||||||
|
|
@ -1518,8 +1518,7 @@ static int lib_pStartQuake(lua_State *L)
|
||||||
quake.radius = luaL_optinteger(L, 4, 512*FRACUNIT);
|
quake.radius = luaL_optinteger(L, 4, 512*FRACUNIT);
|
||||||
|
|
||||||
// These things are actually used in 2.1.
|
// These things are actually used in 2.1.
|
||||||
quake.intensity = q_intensity;
|
P_StartQuake(q_intensity, q_time);
|
||||||
quake.time = q_time;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3192,10 +3192,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
||||||
K_KartPainEnergyFling(player);
|
K_KartPainEnergyFling(player);
|
||||||
|
|
||||||
if (P_IsDisplayPlayer(player))
|
if (P_IsDisplayPlayer(player))
|
||||||
{
|
P_StartQuake(32<<FRACBITS, 5);
|
||||||
quake.intensity = 32*FRACUNIT;
|
|
||||||
quake.time = 5;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
K_SpinPlayer(player, source, 0, inflictor, false);
|
K_SpinPlayer(player, source, 0, inflictor, false);
|
||||||
|
|
|
||||||
|
|
@ -8273,3 +8273,11 @@ static void P_SearchForDisableLinedefs(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Rudimentary function to start a earthquake.
|
||||||
|
// epicenter and radius are not yet used.
|
||||||
|
void P_StartQuake(fixed_t intensity, tic_t time)
|
||||||
|
{
|
||||||
|
quake.intensity = intensity;
|
||||||
|
quake.time = time;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,10 @@
|
||||||
|
|
||||||
extern mobj_t *skyboxmo[2];
|
extern mobj_t *skyboxmo[2];
|
||||||
|
|
||||||
|
// Something that should've been done long ago???
|
||||||
|
// We won't be using epicenter or radius anytime soon so I don't think it's worth it yet.
|
||||||
|
void P_StartQuake(fixed_t intensity, tic_t time);
|
||||||
|
|
||||||
// GETSECSPECIAL (specialval, section)
|
// GETSECSPECIAL (specialval, section)
|
||||||
//
|
//
|
||||||
// Pulls out the special # from a particular section.
|
// Pulls out the special # from a particular section.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue