Fix water droplet crash

This commit is contained in:
MysterD 2022-02-13 14:43:50 -08:00
parent bc2da85288
commit 15cdc199b5
1 changed files with 7 additions and 5 deletions

View File

@ -76,11 +76,13 @@ void bhv_water_droplet_loop(void) {
// Create the smaller splash
struct Object* small = try_to_spawn_object(0, 1.0f, o, MODEL_SMALL_WATER_SPLASH, bhvWaterDropletSplash);
if (small != NULL) {
// immediately update render position
small->parentObj = NULL;
small->header.gfx.pos[0] = o->oPosX;
small->header.gfx.pos[1] = o->oPosY;
small->header.gfx.pos[2] = o->oPosZ;
}
obj_mark_for_deletion(o);
} else if (o->oTimer > 20)