mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-26 07:21:48 +00:00
P_StartQuake: Use PushQuake
- Consistency - Prevents memory corruption when the quakes list is empty
This commit is contained in:
parent
99a1e47487
commit
ca416a3b7f
1 changed files with 1 additions and 5 deletions
|
|
@ -9395,11 +9395,7 @@ void P_StartQuake(tic_t time, fixed_t intensity, fixed_t radius, mappoint_t *epi
|
|||
return;
|
||||
}
|
||||
|
||||
quake = Z_Calloc(sizeof(quake_t), PU_LEVEL, NULL);
|
||||
|
||||
quake->next = g_quakes;
|
||||
g_quakes->prev = quake;
|
||||
g_quakes = quake;
|
||||
quake = PushQuake();
|
||||
|
||||
quake->time = quake->startTime = time;
|
||||
quake->intensity = intensity;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue