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..875122c9 --- /dev/null +++ b/dScripts/FvBounceOverWall.h @@ -0,0 +1,22 @@ +#pragma once +#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