mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
quite a bit
llamas, fix some ltm specific stuff, add auto bus start for auto restart, work in progress lategame on 1.11, fix a crash, performance
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "reboot.h"
|
||||
#include "FortPlayerStateAthena.h"
|
||||
#include "FortGameModeAthena.h"
|
||||
#include "FortAthenaMutator.h"
|
||||
|
||||
/* void AFortGameStateAthena::AddPlayerStateToGameMemberInfo(class AFortPlayerStateAthena* PlayerState)
|
||||
{
|
||||
@@ -36,6 +37,33 @@ TScriptInterface<UFortSafeZoneInterface> AFortGameStateAthena::GetSafeZoneInterf
|
||||
return ScriptInterface;
|
||||
}
|
||||
|
||||
void AFortGameStateAthena::SetGamePhaseStep(EAthenaGamePhaseStep NewGamePhaseStep)
|
||||
{
|
||||
this->GetGamePhaseStep() = NewGamePhaseStep;
|
||||
|
||||
std::vector<std::pair<AFortAthenaMutator*, UFunction*>> FunctionsToCall;
|
||||
|
||||
LoopMutators([&](AFortAthenaMutator* Mutator) { FunctionsToCall.push_back(std::make_pair(Mutator, Mutator->FindFunction("OnGamePhaseStepChanged"))); });
|
||||
|
||||
for (auto& FunctionToCallPair : FunctionsToCall)
|
||||
{
|
||||
// On newer versions there is a second param.
|
||||
|
||||
LOG_INFO(LogDev, "A1: {} FunctionToCallPair.second: {}", FunctionToCallPair.first->IsValidLowLevel() ? FunctionToCallPair.first->GetFullName() : "BadRead", __int64(FunctionToCallPair.second));
|
||||
|
||||
if (FunctionToCallPair.second->IsValidLowLevel() && FunctionToCallPair.first->IsValidLowLevel())
|
||||
{
|
||||
auto Params = ConstructOnGamePhaseStepChangedParams(NewGamePhaseStep);
|
||||
|
||||
if (Params)
|
||||
{
|
||||
FunctionToCallPair.first->ProcessEvent(FunctionToCallPair.second, Params);
|
||||
VirtualFree(Params, 0, MEM_RELEASE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UFortPlaylist*& AFortGameStateAthena::GetCurrentPlaylist()
|
||||
{
|
||||
static auto CurrentPlaylistInfoOffset = GetOffset("CurrentPlaylistInfo", false);
|
||||
|
||||
Reference in New Issue
Block a user