Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sixze committed Feb 1, 2024
1 parent adff02c commit 3fde9f4
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions BuildPlugin.bat
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@echo off

set EngineVesion=5.3
set EngineVersion=5.3

for /f "skip=2 tokens=2*" %%a in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\EpicGames\Unreal Engine\%EngineVesion%" /v "InstalledDirectory"') do set "EngineDirectory=%%b"
for /f "skip=2 tokens=2*" %%a in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\EpicGames\Unreal Engine\%EngineVersion%" /v "InstalledDirectory"') do set "EngineDirectory=%%b"

set AutomationToolPath="%EngineDirectory%\Engine\Build\BatchFiles\RunUAT.bat"
set PluginPath="%cd%\ALS.uplugin"
Expand Down
2 changes: 1 addition & 1 deletion Config/DefaultEngine.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[SystemSettings]
Net.IsPushModelEnabled=1 ; Required for more efficient properties replication on the server.
p.NetUsePackedMovementRPCs=1 ; Required for view network smoothing on the listen server.
a.URO.DisableInterpolation=1 ; If interpolation is enabled, the character may jitter during rotation and foot locking will not be able to work properly.
a.URO.DisableInterpolation=1 ; If enabled, the character may jitter during rotation and foot locking will not be able to work properly.

[/Script/Engine.PhysicsSettings]
bTickPhysicsAsync=False ; If enabled, the character may fall through the ground when landing while the ragdoll is active.
2 changes: 1 addition & 1 deletion Source/ALS/Private/AlsCharacter_Actions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@ void AAlsCharacter::StopRagdollingImplementation()

GetWorldTimerManager().SetTimerForNextTick(FTimerDelegate::CreateWeakLambda(this, [this]
{
ensure(!GetMesh()->bEnableUpdateRateOptimizations);
ALS_ENSURE(!GetMesh()->bEnableUpdateRateOptimizations);
GetMesh()->bEnableUpdateRateOptimizations = true;
}));
}
Expand Down
4 changes: 2 additions & 2 deletions Source/ALS/Public/Utility/AlsEnumUtility.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

namespace AlsEnumUtility
{
template <typename EnumType>
template <typename EnumType> requires std::is_enum_v<EnumType>
int32 GetIndexByValue(const EnumType Value)
{
return StaticEnum<EnumType>()->GetIndexByValue(static_cast<int64>(Value));
}

template <typename EnumType>
template <typename EnumType> requires std::is_enum_v<EnumType>
FString GetNameStringByValue(const EnumType Value)
{
return StaticEnum<EnumType>()->GetNameStringByValue(static_cast<int64>(Value));
Expand Down
4 changes: 2 additions & 2 deletions Source/ALS/Public/Utility/AlsMath.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class ALS_API UAlsMath : public UBlueprintFunctionLibrary

// Remaps the angle from the [175, 180] range to [-185, -180]. Used to
// make the character rotate counterclockwise during a 180 degree turn.
template <typename ValueType>
template <typename ValueType> requires std::is_floating_point_v<ValueType>
static constexpr float RemapAngleForCounterClockwiseRotation(ValueType Angle);

UFUNCTION(BlueprintPure, Category = "ALS|Math|Vector", Meta = (AutoCreateRefTerm = "Vector", ReturnDisplayName = "Vector"))
Expand Down Expand Up @@ -153,7 +153,7 @@ class ALS_API UAlsMath : public UBlueprintFunctionLibrary
FVector& ProjectionLocation, FVector& Direction);
};

template <typename ValueType>
template <typename ValueType> requires std::is_floating_point_v<ValueType>
constexpr float UAlsMath::RemapAngleForCounterClockwiseRotation(const ValueType Angle)
{
if (Angle > 180.0f - CounterClockwiseRotationAngleThreshold)
Expand Down
3 changes: 1 addition & 2 deletions Source/ALSCamera/Private/AlsCameraComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,7 @@ bool UAlsCameraComponent::TryAdjustLocationBlockedByGeometry(FVector& Location,
auto AdjustmentDirection{Adjustment};

if (!AdjustmentDirection.Normalize() ||
UAlsMath::AngleBetweenSkipNormalization((GetOwner()->GetActorLocation() - Location).GetSafeNormal(),
AdjustmentDirection) > 90.0f + 1.0f)
((GetOwner()->GetActorLocation() - Location).GetSafeNormal() | AdjustmentDirection) < -UE_KINDA_SMALL_NUMBER)
{
return false;
}
Expand Down

0 comments on commit 3fde9f4

Please sign in to comment.