mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-10-30 08:01:01 +00:00
Fix pokey death issue (#702)
This commit is contained in:
parent
14313a5cb1
commit
dae7854c3c
2 changed files with 6 additions and 2 deletions
|
|
@ -46,7 +46,11 @@ void bhv_pokey_body_part_update(void) {
|
|||
f32 baseHeight;
|
||||
|
||||
if (o->parentObj == NULL || o->parentObj->behavior != smlua_override_behavior(bhvPokey) || o->parentObj->activeFlags == ACTIVE_FLAG_DEACTIVATED) {
|
||||
obj_mark_for_deletion(o);
|
||||
if (o->oBehParams2ndByte == 0) {
|
||||
obj_die_if_health_non_positive();
|
||||
} else {
|
||||
obj_mark_for_deletion(o);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -650,7 +650,7 @@ s32 obj_resolve_collisions_and_turn(s16 targetYaw, s16 turnSpeed) {
|
|||
|
||||
void obj_die_if_health_non_positive(void) {
|
||||
if (!o) { return; }
|
||||
if (o->oHealth <= 0) {
|
||||
if (o->oHealth <= 0 || o->oSyncDeath) {
|
||||
if (o->oDeathSound == 0) {
|
||||
spawn_mist_particles_with_sound(SOUND_OBJ_DEFAULT_DEATH);
|
||||
} else if (o->oDeathSound > 0) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue