Fixed crash in bhv_chain_chomp_gate_update()

This commit is contained in:
MysterD 2023-04-24 01:18:33 -07:00
parent 5cf9a835af
commit 17efa994da

View file

@ -558,7 +558,7 @@ void bhv_chain_chomp_gate_init(void) {
* Update function for chain chomp gate * Update function for chain chomp gate
*/ */
void bhv_chain_chomp_gate_update(void) { void bhv_chain_chomp_gate_update(void) {
if (o->parentObj && o->parentObj->oChainChompHitGate) { if (o && o->parentObj && o->parentObj->oChainChompHitGate) {
spawn_mist_particles_with_sound(SOUND_GENERAL_WALL_EXPLOSION); spawn_mist_particles_with_sound(SOUND_GENERAL_WALL_EXPLOSION);
set_camera_shake_from_point(SHAKE_POS_SMALL, o->oPosX, o->oPosY, o->oPosZ); set_camera_shake_from_point(SHAKE_POS_SMALL, o->oPosX, o->oPosY, o->oPosZ);
spawn_mist_particles_variable(0, 0x7F, 200.0f); spawn_mist_particles_variable(0, 0x7F, 200.0f);