Originally posted by Rama
View Post

[/Script/Engine.Engine] UnrealEdEngine=/Script/VictoryEdEngine.VictoryEdEngine
;[/Script/Engine.Engine] ;UnrealEdEngine=/Script/VictoryEdEngine.VictoryEdEngine
DECLARE_FUNCTION(execArray_IsValidIndex) { Stack.MostRecentProperty = nullptr; Stack.StepCompiledIn<UArrayProperty>(NULL); void* ArrayAddr = Stack.MostRecentPropertyAddress; UArrayProperty* ArrayProperty = Cast<UArrayProperty>(Stack.MostRecentProperty); if (!ArrayProperty) { Stack.bArrayContextFailed = true; return; } P_GET_PROPERTY(UIntProperty, Index); P_FINISH; bool WasValid = GenericArray_IsValidIndex(ArrayAddr, ArrayProperty, Index); *(bool*)RESULT_PARAM = WasValid; }
bool UVictoryBPFunctionLibrary::GenericArray_IsValidIndex(void* TargetArray, const UArrayProperty* ArrayProp, int32 Index) { bool bResult = false; if (TargetArray) { FScriptArrayHelper ArrayHelper(ArrayProp, TargetArray); bResult = ArrayHelper.IsValidIndex(Index); } return bResult; }
DECLARE_FUNCTION(execArray_IsValidIndex) { Stack.MostRecentProperty = nullptr; Stack.StepCompiledIn<UArrayProperty>(NULL); void* ArrayAddr = Stack.MostRecentPropertyAddress; UArrayProperty* ArrayProperty = Cast<UArrayProperty>(Stack.MostRecentProperty); if (!ArrayProperty) { Stack.bArrayContextFailed = true; return; } P_GET_PROPERTY(UIntProperty, Index); P_FINISH; bool WasValid = GenericArray_IsValidIndex(ArrayAddr, ArrayProperty, Index); *(bool*)RESULT_PARAM = WasValid; }
bool UVictoryBPFunctionLibrary::GenericArray_IsValidIndex(void* TargetArray, const UArrayProperty* ArrayProp, int32 Index) { bool bResult = false; if (TargetArray) { FScriptArrayHelper ArrayHelper(ArrayProp, TargetArray); bResult = ArrayHelper.IsValidIndex(Index); } return bResult; }
diff --git a/GameProject/Plugins/VictoryPlugin/Source/VictoryBPLibrary/Private/VictoryBPFunctionLibrary.cpp b/GameProject/Plugins/VictoryPlugin/Source/VictoryBPLibrary/Private/VictoryBPFunctionLibrary.cpp index 014cab1..6fe8e0e 100644 --- a/GameProject/Plugins/VictoryPlugin/Source/VictoryBPLibrary/Private/VictoryBPFunctionLibrary.cpp +++ b/GameProject/Plugins/VictoryPlugin/Source/VictoryBPLibrary/Private/VictoryBPFunctionLibrary.cpp @@ -2711,13 +2711,13 @@ AActor* UVictoryBPFunctionLibrary::Traces__CharacterMeshTrace___ClosestSocket( //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //Check All Bones Locations - for (int32 Itr = 0; Itr < SocketNames.Num(); Itr++ ) + for (int32 SItr = 0; SItr < SocketNames.Num(); SItr++ ) { //Is this a Bone not a socket? - if(SocketNames[Itr].Type == EComponentSocketType::Bone) continue; + if(SocketNames[SItr].Type == EComponentSocketType::Bone) continue; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - CurLoc = AsCharacter->Mesh->GetSocketLocation(SocketNames[Itr].Name); + CurLoc = AsCharacter->Mesh->GetSocketLocation(SocketNames[SItr].Name); //Dist CurDist = FVector::Dist(OutImpactPoint, CurLoc); @@ -2725,7 +2725,7 @@ AActor* UVictoryBPFunctionLibrary::Traces__CharacterMeshTrace___ClosestSocket( //Min if (ClosestDistance < 0 || ClosestDistance >= CurDist) { - ClosestVibe = Itr; + ClosestVibe = SItr; ClosestDistance = CurDist; } }
Building DescentServer... Using clang version '3.5.0' (string), 3 (major), 5 (minor), 0 (patch) Linux dedicated server is made to depend on UElibPNG. We want to avoid this, please correct module dependencies. ERROR: Exception thrown while processing dependent modules of VictoryBPLibrary Exception thrown while processing dependent modules of ImageWrapper ERROR: Unable to instantiate instance of 'UElibPNG' object type from compiled assembly 'DescentServerModuleRules'. Unreal Build Tool creates an instance of your module's 'Rules' object in order to find out about your module's requirements. The CLR exception details may provide more information: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> ERROR: Linux dedicated server is made to depend on UElibPNG. We want to avoid this, please correct module dependencies.
UTexture2D* UVictoryBPFunctionLibrary::LoadTexture2D_FromFileByExtension(const FString& ImagePath, bool& IsValid, int32& OutWidth, int32& OutHeight) { UTexture2D* Texture = nullptr; IsValid = false; // To avoid log spam, make sure it exists before doing anything else. if (!FPlatformFileManager::Get().GetPlatformFile().FileExists(*ImagePath)) { return nullptr; } TArray<uint8> CompressedData; if (!FFileHelper::LoadFileToArray(CompressedData, *ImagePath)) { return nullptr; } IImageWrapperPtr ImageWrapper = GetImageWrapperByExtention(ImagePath); if (ImageWrapper.IsValid() && ImageWrapper->SetCompressed(CompressedData.GetData(), CompressedData.Num())) { const TArray<uint8>* UncompressedRGBA = nullptr; if (ImageWrapper->GetRaw(ERGBFormat::RGBA, 8, UncompressedRGBA)) { Texture = UTexture2D::CreateTransient(ImageWrapper->GetWidth(), ImageWrapper->GetHeight(), PF_R8G8B8A8); if (Texture != nullptr) { IsValid = true; OutWidth = ImageWrapper->GetWidth(); OutHeight = ImageWrapper->GetHeight(); void* TextureData = Texture->PlatformData->Mips[0].BulkData.Lock(LOCK_READ_WRITE); FMemory::Memcpy(TextureData, UncompressedRGBA->GetData(), UncompressedRGBA->Num()); Texture->PlatformData->Mips[0].BulkData.Unlock(); Texture->UpdateResource(); } } } return Texture; }
Comment