From fa747a27db452f36312311c6a0f262773f1b8d92 Mon Sep 17 00:00:00 2001 From: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com> Date: Sat, 22 Jan 2022 17:39:54 -0800 Subject: [PATCH 1/2] Added missing script for Gate Crasher mission --- dScripts/CppScripts.cpp | 3 +++ dScripts/FvBounceOverWall.cpp | 9 +++++++++ dScripts/FvBounceOverWall.h | 21 +++++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 dScripts/FvBounceOverWall.cpp create mode 100644 dScripts/FvBounceOverWall.h diff --git a/dScripts/CppScripts.cpp b/dScripts/CppScripts.cpp index 27f5e225..1201af6d 100644 --- a/dScripts/CppScripts.cpp +++ b/dScripts/CppScripts.cpp @@ -145,6 +145,7 @@ #include "ImgBrickConsoleQB.h" #include "ActParadoxPipeFix.h" #include "FvNinjaGuard.h" +#include "FvBounceOverWall.h" // FB Scripts #include "AgJetEffectServer.h" @@ -556,6 +557,8 @@ CppScripts::Script* CppScripts::GetScript(Entity* parent, const std::string& scr script = new ActParadoxPipeFix(); else if (scriptName == "scripts\\ai\\FV\\L_FV_NINJA_GUARDS.lua") script = new FvNinjaGuard(); + else if (scriptName == "scripts\\ai\\FV\\L_ACT_BOUNCE_OVER_WALL.lua") + script = new FvBounceOverWall(); //Misc: if (scriptName == "scripts\\02_server\\Map\\General\\L_EXPLODING_ASSET.lua") diff --git a/dScripts/FvBounceOverWall.cpp b/dScripts/FvBounceOverWall.cpp new file mode 100644 index 00000000..348bc36c --- /dev/null +++ b/dScripts/FvBounceOverWall.cpp @@ -0,0 +1,9 @@ +#include "FvBounceOverWall.h" + +void FvBounceOverWall::OnCollisionPhantom(Entity* self, Entity* target) { + auto missionComponent = target->GetComponent(); + if (missionComponent == nullptr) return; + + // We force progress here to the Gate Crasher mission due to an overlap in LOTs with the 'Shark Bite' missions. + missionComponent->ForceProgress(GateCrasherMissionId, GateCrasherMissionUid, 1); +} \ No newline at end of file diff --git a/dScripts/FvBounceOverWall.h b/dScripts/FvBounceOverWall.h new file mode 100644 index 00000000..c0a6e6d0 --- /dev/null +++ b/dScripts/FvBounceOverWall.h @@ -0,0 +1,21 @@ +#include "CppScripts.h" + +class FvBounceOverWall : public CppScripts::Script +{ + /** + * @brief When a collision has been made with self this method is called. + * + * @param self The Entity that called this function. + * @param target The target Entity of self. + */ + void OnCollisionPhantom(Entity* self, Entity* target) override; +private: + /** + * MissionId for the Gate Crasher mission. + */ + int32_t GateCrasherMissionId = 849; + /** + * MissionUid for the Gate Crasher mission. + */ + int32_t GateCrasherMissionUid = 1241; +}; \ No newline at end of file From f6054516935e935352987698536d2753de34ebcb Mon Sep 17 00:00:00 2001 From: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com> Date: Sat, 22 Jan 2022 17:48:09 -0800 Subject: [PATCH 2/2] Added pragma once to header file --- dScripts/FvBounceOverWall.h | 1 + 1 file changed, 1 insertion(+) diff --git a/dScripts/FvBounceOverWall.h b/dScripts/FvBounceOverWall.h index c0a6e6d0..875122c9 100644 --- a/dScripts/FvBounceOverWall.h +++ b/dScripts/FvBounceOverWall.h @@ -1,3 +1,4 @@ +#pragma once #include "CppScripts.h" class FvBounceOverWall : public CppScripts::Script