Fix water droplet crash
This commit is contained in:
parent
92ea8b78b3
commit
127a35d05b
|
@ -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);
|
||||
|
||||
// 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;
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue