Compare commits
3 commits
ff10e884dc
...
27095ae6c7
Author | SHA1 | Date | |
---|---|---|---|
27095ae6c7 | |||
8521e33d05 | |||
6998fb1e1e |
4 changed files with 15 additions and 4 deletions
|
@ -15,7 +15,7 @@ void FSkyPortalModule::ShutdownModule()
|
|||
// This function may be called during shutdown to clean up your module. For modules that support dynamic reloading,
|
||||
// we call this function before unloading the module.
|
||||
|
||||
if (GEngine->GetEngineSubsystem<USkyPortalSubsystem>()) {
|
||||
if (GEngine && GEngine->GetEngineSubsystem<USkyPortalSubsystem>()) {
|
||||
GEngine->GetEngineSubsystem<USkyPortalSubsystem>()->Deinitialize();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -206,7 +206,11 @@ uint8* USkyPortalIO::QueryBlock(uint8 FigureIndex, uint8 BlockIndex)
|
|||
}
|
||||
}
|
||||
|
||||
} while (write == false && (output[0] != 'Q' || (output[1] % 0x10 != FigureIndex && output[1] != 0x01) || output[2] != BlockIndex) && attempt < 10);
|
||||
} while (write == false && output && (output[0] != 'Q' || (output[1] % 0x10 != FigureIndex && output[1] != 0x01) || output[2] != BlockIndex) && attempt < 10);
|
||||
if (output == nullptr) {
|
||||
UE_LOG(LogSkyportalIO, Error, TEXT("Query failed after %d attempts"), attempt);
|
||||
return 0; // Return early if the loop failed to get valid output
|
||||
}
|
||||
UE_LOG(LogSkyportalIO, Verbose, TEXT("Querying block %d - success"), BlockIndex);
|
||||
UE_LOG(LogSkyportalIO, VeryVerbose, TEXT("Data block %d = \n %s"), BlockIndex,*OutputToString(output));
|
||||
return output;
|
||||
|
|
|
@ -71,6 +71,8 @@ void FPortalStatusChecker::CheckPortalStatus()
|
|||
if (
|
||||
//!FalsePositive() //filter conflicting infos
|
||||
true) {
|
||||
int32 figID = 0;
|
||||
UFigureData* figData = NewObject<UFigureData>();
|
||||
//FigureDataBlock FigureData;
|
||||
switch (CurrentStatusData.StatusArray[i])
|
||||
{
|
||||
|
@ -78,8 +80,12 @@ void FPortalStatusChecker::CheckPortalStatus()
|
|||
case EFigureStatus::PRESENT:
|
||||
break;
|
||||
case EFigureStatus::ADDED:
|
||||
//figData = PortalHandleRef->ReadFigureBlocks(i);
|
||||
subref->OnSkylanderAdded.Broadcast(00, i);
|
||||
figData = PortalHandleRef->ReadFigureBlocks(i);
|
||||
if (figData)
|
||||
{
|
||||
figID = figData->GetFigureID();
|
||||
}
|
||||
subref->OnSkylanderAdded.Broadcast(figID, i);
|
||||
break;
|
||||
case EFigureStatus::REMOVED:
|
||||
subref->OnSkylanderRemoved.Broadcast(00, i);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "SkyPortalDefinitions.h"
|
||||
#include "HAL/Runnable.h"
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue