summaryrefslogtreecommitdiff
path: root/mm/2s2h/Rando/ActorBehavior/EnInvadepoh.cpp
diff options
context:
space:
mode:
authorEblo <7004497+Eblo@users.noreply.github.com>2025-03-31 11:46:08 -0400
committerGitHub <noreply@github.com>2025-03-31 10:46:08 -0500
commit63e30e7ab21736f40f08d8e66964d12ce3bd3c2e (patch)
tree6a6b3e6ecb6b9fdf374d3ba60c3107a07d4145f1 /mm/2s2h/Rando/ActorBehavior/EnInvadepoh.cpp
parent05047c859c3eec6cd582017973081264452e1466 (diff)
Fix free roam behavior with Romani reward (#1101)
Diffstat (limited to 'mm/2s2h/Rando/ActorBehavior/EnInvadepoh.cpp')
-rw-r--r--mm/2s2h/Rando/ActorBehavior/EnInvadepoh.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/mm/2s2h/Rando/ActorBehavior/EnInvadepoh.cpp b/mm/2s2h/Rando/ActorBehavior/EnInvadepoh.cpp
new file mode 100644
index 000000000..91b11b7ba
--- /dev/null
+++ b/mm/2s2h/Rando/ActorBehavior/EnInvadepoh.cpp
@@ -0,0 +1,18 @@
+#include "ActorBehavior.h"
+#include <libultraship/libultraship.h>
+
+void Rando::ActorBehavior::InitEnInvadepohBehavior() {
+ // This is the same block found for non-scripted actors in OfferGetItem.cpp, but without Player_TalkWithPlayer().
+ COND_VB_SHOULD(VB_GIVE_ITEM_FROM_OFFER, IS_RANDO, {
+ GetItemId* item = va_arg(args, GetItemId*);
+ Actor* actor = va_arg(args, Actor*);
+ if (actor->id == ACTOR_EN_INVADEPOH) { // Romani Ranch invasion actor
+ *should = false;
+ Player* player = GET_PLAYER(gPlayState);
+ actor->parent = &player->actor;
+ player->talkActor = actor;
+ player->talkActorDistance = actor->xzDistToPlayer;
+ player->exchangeItemAction = PLAYER_IA_MINUS1;
+ }
+ });
+} \ No newline at end of file