Skip to content

Commit

Permalink
fix compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rowechien committed Jan 2, 2020
1 parent 20f6ae0 commit 2a5b86d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
10 changes: 9 additions & 1 deletion Plugins/UnLua/Source/UnLua/Private/LuaContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,11 @@ bool FLuaContext::TryToBindLua(UObjectBaseUtility *Object)
/**
* Callback for FWorldDelegates::OnWorldTickStart
*/
#if ENGINE_MINOR_VERSION > 23
void FLuaContext::OnWorldTickStart(UWorld *World, ELevelTick TickType, float DeltaTime)
#else
void FLuaContext::OnWorldTickStart(ELevelTick TickType, float DeltaTime)
#endif
{
if (!Manager)
{
Expand Down Expand Up @@ -470,7 +474,11 @@ void FLuaContext::OnWorldCleanup(UWorld *World, bool bSessionEnded, bool bCleanu
{
bIsInSeamlessTravel = World->IsInSeamlessTravel();
}
#if ENGINE_MINOR_VERSION > 23
Cleanup(IsEngineExitRequested(), World); // clean up
#else
Cleanup(GIsRequestingExit, World); // clean up
#endif

#if WITH_EDITOR
int32 Index = LoadedWorlds.Find(World);
Expand Down Expand Up @@ -858,7 +866,7 @@ void FLuaContext::NotifyUObjectCreated(const UObjectBase *InObject, int32 Index)
{
Actor = Cast<APawn>(Object->GetOuter());
}
if (Actor && Actor->Role >= ROLE_AutonomousProxy)
if (Actor && Actor->GetLocalRole() >= ROLE_AutonomousProxy)
{
CandidateInputComponents.AddUnique((UInputComponent*)InObject);
if (!FWorldDelegates::OnWorldTickStart.IsBoundToObject(this))
Expand Down
4 changes: 4 additions & 0 deletions Plugins/UnLua/Source/UnLua/Private/LuaContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ class FLuaContext : public FUObjectArray::FUObjectCreateListener, public FUObjec
void AddLibraryName(const TCHAR *LibraryName) { LibraryNames.Add(LibraryName); }
void AddModuleName(const TCHAR *ModuleName) { ModuleNames.AddUnique(ModuleName); }

#if ENGINE_MINOR_VERSION > 23
void OnWorldTickStart(UWorld *World, ELevelTick TickType, float DeltaTime);
#else
void OnWorldTickStart(ELevelTick TickType, float DeltaTime);
#endif
void OnWorldCleanup(UWorld *World, bool bSessionEnded, bool bCleanupResources);
void OnPostWorldCleanup(UWorld *World, bool bSessionEnded, bool bCleanupResources);
void OnPreWorldInitialization(UWorld *World, const UWorld::InitializationValues);
Expand Down
2 changes: 1 addition & 1 deletion TPSProject.uproject
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FileVersion": 3,
"EngineAssociation": "{9F029042-456B-2495-DEBD-0683CFBC8BAD}",
"EngineAssociation": "{1335008A-4A94-9923-CF89-B6A5C67488F7}",
"Category": "",
"Description": "",
"Modules": [
Expand Down

0 comments on commit 2a5b86d

Please sign in to comment.