mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
quake = Z_Calloc(sizeof(quake_t), PU_LEVEL, NULL);
|
quake = PushQuake();
|
||||||
|
|
||||||
quake->next = g_quakes;
|
|
||||||
g_quakes->prev = quake;
|
|
||||||
g_quakes = quake;
|
|
||||||
|
|
||||||
quake->time = quake->startTime = time;
|
quake->time = quake->startTime = time;
|
||||||
quake->intensity = intensity;
|
quake->intensity = intensity;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue