mirror of
https://github.com/Ed94/Cog.git
synced 2026-06-13 08:02:23 -07:00
hud initialization fixes
This commit is contained in:
@@ -305,3 +305,26 @@ bool UCogSampleCharacterMovementComponent::ClientUpdatePositionAfterServerUpdate
|
||||
return Result;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void UCogSampleCharacterMovementComponent::PossessedBy(AController* NewController)
|
||||
{
|
||||
if (NewController != nullptr && NewController->IsPlayerController())
|
||||
{
|
||||
bWasAvoidanceEnabled = bUseRVOAvoidance;
|
||||
SetAvoidanceEnabled(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetAvoidanceEnabled(bWasAvoidanceEnabled);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void UCogSampleCharacterMovementComponent::UnPossessed()
|
||||
{
|
||||
//---------------------------------------------------------------------------------------
|
||||
// Make sure the character doesn't keep his velocity while not controlled anymore.
|
||||
//---------------------------------------------------------------------------------------
|
||||
ConsumeInputVector();
|
||||
}
|
||||
Reference in New Issue
Block a user