mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-22 13:37:22 +00:00
Merge pull request #405 from EmosewaMC/FvGateCrasherFix
Added missing script for Gate Crasher mission
This commit is contained in:
commit
344af924fe
@ -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")
|
||||
|
9
dScripts/FvBounceOverWall.cpp
Normal file
9
dScripts/FvBounceOverWall.cpp
Normal file
@ -0,0 +1,9 @@
|
||||
#include "FvBounceOverWall.h"
|
||||
|
||||
void FvBounceOverWall::OnCollisionPhantom(Entity* self, Entity* target) {
|
||||
auto missionComponent = target->GetComponent<MissionComponent>();
|
||||
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);
|
||||
}
|
22
dScripts/FvBounceOverWall.h
Normal file
22
dScripts/FvBounceOverWall.h
Normal file
@ -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;
|
||||
};
|
Loading…
Reference in New Issue
Block a user