Download

Inconsistency in source and behaviour for binary engine download

UE4 v13.2

browsing github I found the following code in Chracter.cpp


void ACharacter::CheckJumpInput(float DeltaTime)
{
*	**if (CharacterMovement)**
	{
		**if (bPressedJump)***
		{
			// Increment our timer first so calls to IsJumpProvidingForce() will return true
			JumpKeyHoldTime += DeltaTime;

			if (CharacterMovement->IsFalling() && JumpCurrentCount == 0)
			{
				JumpCurrentCount++;
			}
***
			const bool bDidJump = CanJump() && CharacterMovement->DoJump(bClientUpdating);***
			if (!bWasJumping && bDidJump)
			{
				JumpCurrentCount++;
				OnJumped();
			}

			bWasJumping = bDidJump;
		}

		// If the jump key is no longer pressed and the character is no longer falling,
		// but it still "looks" like the character was jumping, reset the counters.
		else if (bWasJumping && !CharacterMovement->IsFalling())
		{
			ResetJumpState();
		}
	}
}

However this is not how the compiled engine downloaded from launcher works!
In the code only conditions to call DoJump are if (CharacterMovement) and if (bPressedJump) , but even with those condition satisfying the DoJump function is not called.
**
Now when I Override the function and copy paste the exact code from github then it works as intended! So this looks like the code on github is different from what’s on the binary builds!**

what is happening here?

Looks to me as the code pasted above is the same as in v14.3 and when i look at the version 13.2 on github is does not reflect the pasted code above. I have not checked the binary downloaded source as i dont have v13.2 binary download.

You sure you are not mixing up different version sources?

Character.cpp from version 13.2 on github: https://github.com/EpicGames/UnrealEngine/blob/4.13.2-release/Engine/Source/Runtime/Engine/Private/Character.cpp

Character.cpp from version 14.3 on github: https://github.com/EpicGames/UnrealEngine/blob/4.14.3-release/Engine/Source/Runtime/Engine/Private/Character.cpp