mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-01-23 21:45:00 +03:00
Fixed ItemDropEvent logic
This commit is contained in:
parent
dd29a496d6
commit
4d28f402e5
@ -1045,10 +1045,10 @@ void Scenery_CoStoneArch_Init(CoStoneArch* this, f32* hitboxData) {
|
|||||||
item->obj.pos.y = this->obj.pos.y;
|
item->obj.pos.y = this->obj.pos.y;
|
||||||
item->obj.pos.z = this->obj.pos.z;
|
item->obj.pos.z = this->obj.pos.z;
|
||||||
item->obj.rot.y = this->obj.rot.y;
|
item->obj.rot.y = this->obj.rot.y;
|
||||||
|
item->info.hitbox = LOAD_ASSET(hitboxData);
|
||||||
CALL_CANCELLABLE_EVENT(ItemDropEvent, item) {
|
CALL_CANCELLABLE_EVENT(ItemDropEvent, item) {
|
||||||
Object_SetInfo(&item->info, item->obj.id);
|
Object_SetInfo(&item->info, item->obj.id);
|
||||||
}
|
}
|
||||||
item->info.hitbox = LOAD_ASSET(hitboxData);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1703,8 +1703,6 @@ void func_enmy_800660F0(Actor* this) {
|
|||||||
|
|
||||||
CALL_CANCELLABLE_EVENT(ItemDropEvent, item) {
|
CALL_CANCELLABLE_EVENT(ItemDropEvent, item) {
|
||||||
Object_SetInfo(&item->info, item->obj.id);
|
Object_SetInfo(&item->info, item->obj.id);
|
||||||
}
|
|
||||||
|
|
||||||
if ((item->obj.id == OBJ_ITEM_SILVER_RING) || (item->obj.id == OBJ_ITEM_BOMB) ||
|
if ((item->obj.id == OBJ_ITEM_SILVER_RING) || (item->obj.id == OBJ_ITEM_BOMB) ||
|
||||||
(item->obj.id == OBJ_ITEM_LASERS)) {
|
(item->obj.id == OBJ_ITEM_LASERS)) {
|
||||||
item->unk_50 = 90.0f;
|
item->unk_50 = 90.0f;
|
||||||
@ -1718,6 +1716,8 @@ void func_enmy_800660F0(Actor* this) {
|
|||||||
AUDIO_PLAY_SFX(NA_SE_OB_WING, item->sfxSource, 0);
|
AUDIO_PLAY_SFX(NA_SE_OB_WING, item->sfxSource, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -598,8 +598,8 @@ void Corneria_CoGranga_1UpCheck(CoGranga* this) {
|
|||||||
|
|
||||||
CALL_CANCELLABLE_EVENT(ItemDropEvent, &gItems[i]) {
|
CALL_CANCELLABLE_EVENT(ItemDropEvent, &gItems[i]) {
|
||||||
Object_SetInfo(&gItems[i].info, gItems[i].obj.id);
|
Object_SetInfo(&gItems[i].info, gItems[i].obj.id);
|
||||||
}
|
|
||||||
Effect_Effect384_Spawn(gItems[i].obj.pos.x, gItems[i].obj.pos.y, gItems[i].obj.pos.z, 5.0f, 0);
|
Effect_Effect384_Spawn(gItems[i].obj.pos.x, gItems[i].obj.pos.y, gItems[i].obj.pos.z, 5.0f, 0);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1637,10 +1637,10 @@ void Andross_Effect396_Update(Effect396* this) {
|
|||||||
item->obj.pos.y = this->obj.pos.y;
|
item->obj.pos.y = this->obj.pos.y;
|
||||||
item->obj.pos.z = this->obj.pos.z;
|
item->obj.pos.z = this->obj.pos.z;
|
||||||
item->timer_4A = 8;
|
item->timer_4A = 8;
|
||||||
|
item->unk_50 = 90.0f;
|
||||||
CALL_CANCELLABLE_EVENT(ItemDropEvent, item) {
|
CALL_CANCELLABLE_EVENT(ItemDropEvent, item) {
|
||||||
Object_SetInfo(&item->info, item->obj.id);
|
Object_SetInfo(&item->info, item->obj.id);
|
||||||
}
|
}
|
||||||
item->unk_50 = 90.0f;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user