timiimit / UT4UU-Public

Unreal Tournament 4 Unofficial Update
73 stars 1 forks source link

Fix slope bug #4

Open timiimit opened 1 year ago

timiimit commented 1 year ago

Feature request to fix UT4's slope bug usually experienced in BunnyTrack.

timiimit commented 1 year ago

The source of this bug seems to be function UUTCharacterMovement::ComputeSlideVectorUT. Specifically this:

else if (bAllowSlopeDodgeBoost && (((CharacterOwner->GetActorLocation() - Hit.ImpactPoint).Size2D() > 0.93f * PawnRadius) || (Hit.ImpactNormal.Z > 0.2f))) // @TODO FIXMESTEVE tweak magic numbers
{
    if (Result.Z > Delta.Z*Time)
    {
        Result.Z = FMath::Max(Result.Z * SlopeDodgeScaling, Delta.Z*Time);
    }
}

if Result.Z does not change, bug dissapears. But player also becomes capable of going further up the slides. Now it's only the matter of understanding these lines and then making them work as expected.