Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion AsaApi/Core/Public/API/ARK/Other.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ struct UVictoryCoreHighest : UObject
static UClass* StaticClass() { return NativeCall<UClass*>(nullptr, "UVictoryCoreHighest.StaticClass()"); }
};

struct FMaxItemQuantityOverride
{
int MaxItemQuantity;
bool bIgnoreMultiplier;
};

struct FTrackedActorOverallContainer
{
// Fields
Expand Down Expand Up @@ -3843,4 +3849,4 @@ struct FStructureVariant

FStructureVariant& operator=(FStructureVariant* __that) { return NativeCall<FStructureVariant&, FStructureVariant*>(this, "FStructureVariant.operator=(FStructureVariant&&)", __that); }
static UScriptStruct* StaticStruct() { return FindScriptStruct<FStructureVariant>(); }
};
};
2 changes: 1 addition & 1 deletion AsaApi/Core/Public/API/ARK/PrimalStructure.h
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ struct APrimalStructure : APrimalTargetableActor
void ClearStructureLinks(APlayerController* ForPC) { NativeCall<void, APlayerController*>(this, "APrimalStructure.ClearStructureLinks(APlayerController*)", ForPC); }
bool CanAttachToExosuit_Implementation(AShooterPlayerController* ForPC) { return NativeCall<bool, AShooterPlayerController*>(this, "APrimalStructure.CanAttachToExosuit_Implementation(AShooterPlayerController*)", ForPC); }
bool CanBeStoredByExosuit_Implementation(AShooterPlayerController* ForPC) { return NativeCall<bool, AShooterPlayerController*>(this, "APrimalStructure.CanBeStoredByExosuit_Implementation(AShooterPlayerController*)", ForPC); }
void PickupStructureAndDependingLinkedStructures(APlayerController* ForPC, bool IsFirstPickup) { NativeCall<void, APlayerController*, bool>(this, "APrimalStructure.PickupStructureAndDependingLinkedStructures(APlayerController*,bool)", ForPC, IsFirstPickup); }
void PickupStructureAndDependingLinkedStructures(APlayerController* ForPC, bool IsFirstPickup, UPrimalInventoryComponent* OverrideInventory) { NativeCall<void, APlayerController*, bool, UPrimalInventoryComponent*>(this, "APrimalStructure.PickupStructureAndDependingLinkedStructures(APlayerController*,bool,UPrimalInventoryComponent*)", ForPC, IsFirstPickup, OverrideInventory); }
//void DemolishStructureAndDependingLinkedStructures(APlayerController* ForPC, TMap<TSubclassOf<UPrimalItem>, int, FDefaultSetAllocator, TDefaultMapHashableKeyFuncs<TSubclassOf<UPrimalItem>, int, 0> >* CollectedResources, bool IsFirst, bool bUseResourceMap) { NativeCall<void, APlayerController*, TMap<TSubclassOf<UPrimalItem>, int, FDefaultSetAllocator, TDefaultMapHashableKeyFuncs<TSubclassOf<UPrimalItem>, int, 0> >*, bool, bool>(this, "APrimalStructure.DemolishStructureAndDependingLinkedStructures(APlayerController*,TMap<TSubclassOf<UPrimalItem>,int,FDefaultSetAllocator,TDefaultMapHashableKeyFuncs<TSubclassOf<UPrimalItem>,int,0>>&,bool,bool)", ForPC, CollectedResources, IsFirst, bUseResourceMap); }
TArray<APrimalStructure*, TSizedDefaultAllocator<32> >* PreviewCulledStructures(TArray<APrimalStructure*, TSizedDefaultAllocator<32> >* result, TArray<APrimalStructure*, TSizedDefaultAllocator<32> >* InOutStructuresOnFloors) { return NativeCall<TArray<APrimalStructure*, TSizedDefaultAllocator<32> >*, TArray<APrimalStructure*, TSizedDefaultAllocator<32> >*, TArray<APrimalStructure*, TSizedDefaultAllocator<32> >*>(this, "APrimalStructure.PreviewCulledStructures(TArray<APrimalStructure*,TSizedDefaultAllocator<32>>&)", result, InOutStructuresOnFloors); }
void GatherStructuresPlacedOnFloor(APrimalStructure* ForStructure, TArray<APrimalStructure*, TSizedDefaultAllocator<32> >* StructuresOnFloors) { NativeCall<void, APrimalStructure*, TArray<APrimalStructure*, TSizedDefaultAllocator<32> >*>(this, "APrimalStructure.GatherStructuresPlacedOnFloor(APrimalStructure*,TArray<APrimalStructure*,TSizedDefaultAllocator<32>>&)", ForStructure, StructuresOnFloors); }
Expand Down
2 changes: 1 addition & 1 deletion AsaApi/Core/Public/API/Base.h
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ struct FLocRot;
struct FMassTeleportData {};
struct FMatineeActorFinished;
struct FMatineeActorStopped;
struct FMaxItemQuantityOverride {};
struct FMaxItemQuantityOverride;
struct FMaxStatScaler;
struct FMeleeHitInfo;
struct FMemoryArchive;
Expand Down
33 changes: 31 additions & 2 deletions AsaApi/Core/Public/API/UE/GenericPlatform/GenericPlatformMath.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
*/
struct FGenericPlatformMath
{
// Local type-safe constant matching UE_SMALL_NUMBER definition, declared to avoid header dependency on UnrealMathUtility.h.
static constexpr float SmallNumber = 1.e-8f;

// Local type-safe constant matching UE_DOUBLE_SMALL_NUMBER definition, declared to avoid header dependency on UnrealMathUtility.h.
static constexpr double DoubleSmallNumber = 1.e-8;

// load half (F16) to float
//https://gist.github.com/rygorous/2156668
static FORCEINLINE float LoadHalf(const uint16* Ptr)
Expand Down Expand Up @@ -504,10 +510,33 @@ struct FGenericPlatformMath
*
* This is forced to *NOT* inline so that divisions by constant Y does not get optimized in to an inverse scalar multiply,
* which is not consistent with the intent nor with the vectorized version.
*
* Note: Direct CRT fabsf/fabs is used instead of Abs() or FMath::Abs() to prevent
* early implicit template instantiation of Abs<T> before its specialization,
* as well as to avoid incomplete type issues with FMath.
*/

static FORCENOINLINE float Fmod(float X, float Y);
static FORCENOINLINE double Fmod(double X, double Y);
static FORCENOINLINE float Fmod(float X, float Y)
{
const float AbsY = fabsf(Y);
if (AbsY <= SmallNumber) // Note: this constant should match that used by VectorMod() implementations
{
return 0.0;
}

return fmodf(X, Y);
}

static FORCENOINLINE double Fmod(double X, double Y)
{
const double AbsY = fabs(Y);
if (AbsY <= DoubleSmallNumber) // Note: this constant should match that used by VectorMod() implementations
{
return 0.0;
}

return fmod(X, Y);
}
RESOLVE_FLOAT_AMBIGUITY_2_ARGS(Fmod);

static FORCEINLINE float Sin( float Value ) { return sinf(Value); }
Expand Down
15 changes: 15 additions & 0 deletions AsaApi/Core/Public/API/UE/Math/Rotator.h
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,21 @@ FORCEINLINE bool TRotator<T>::Equals(const TRotator<T>& R, T Tolerance) const
#endif
}

template<typename T>
FORCEINLINE TVector<T> TRotator<T>::Vector() const
{
// Remove winding and clamp to [-360, 360]
const T PitchNoWinding = FMath::Fmod(Pitch, (T)360.0);
const T YawNoWinding = FMath::Fmod(Yaw, (T)360.0);

T CP, SP, CY, SY;
FMath::SinCos(&SP, &CP, FMath::DegreesToRadians(PitchNoWinding));
FMath::SinCos(&SY, &CY, FMath::DegreesToRadians(YawNoWinding));
UE::Math::TVector<T> V = UE::Math::TVector<T>(CP * CY, CP * SY, SP);

return V;
}

template<typename T>
FORCEINLINE TRotator<T> TRotator<T>::Add( T DeltaPitch, T DeltaYaw, T DeltaRoll )
{
Expand Down
4 changes: 2 additions & 2 deletions AsaApi/Core/Public/API/UE/Math/UnrealMathUtility.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class TRange;
#undef UE_INCLUDETOOL_IGNORE_INCONSISTENT_STATE

#define UE_PI (3.1415926535897932f) /* Extra digits if needed: 3.1415926535897932384626433832795f */
#define UE_SMALL_NUMBER (1.e-8f)
#define UE_SMALL_NUMBER FGenericPlatformMath::SmallNumber
#define UE_KINDA_SMALL_NUMBER (1.e-4f)
#define UE_BIG_NUMBER (3.4e+38f)
#define UE_EULERS_NUMBER (2.71828182845904523536f)
Expand All @@ -136,7 +136,7 @@ class TRange;


#define UE_DOUBLE_PI (3.141592653589793238462643383279502884197169399)
#define UE_DOUBLE_SMALL_NUMBER (1.e-8)
#define UE_DOUBLE_SMALL_NUMBER FGenericPlatformMath::DoubleSmallNumber
#define UE_DOUBLE_KINDA_SMALL_NUMBER (1.e-4)
#define UE_DOUBLE_BIG_NUMBER (3.4e+38)
#define UE_DOUBLE_EULERS_NUMBER (2.7182818284590452353602874713526624977572)
Expand Down