fix error C2440: 'initializing': cannot convert from 'void' to 'bool' when engine versio is < 5.2
This commit is contained in:
@@ -1141,6 +1141,7 @@ void ASGPawn::Grab(USGVirtualHandComponent* Hand, AActor* Actor)
|
||||
Pimpl->DisableActorPhysics(Actor);
|
||||
}
|
||||
|
||||
#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2
|
||||
const bool bAttached = Actor->AttachToComponent(Hand, MoveTemp(AttachmentRules), SocketName);
|
||||
if (bAttached)
|
||||
{
|
||||
@@ -1150,6 +1151,10 @@ void ASGPawn::Grab(USGVirtualHandComponent* Hand, AActor* Actor)
|
||||
{
|
||||
SGLOG_ERROR("Failed to grab the actor with the left hand!", Actor, SocketName);
|
||||
}
|
||||
#else
|
||||
Actor->AttachToComponent(Hand, MoveTemp(AttachmentRules), SocketName);
|
||||
LeftHandGrabState.GrabbedActor = Actor;
|
||||
#endif /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2 */
|
||||
}
|
||||
|
||||
void ASGPawn::ReleaseLeft()
|
||||
|
||||
Reference in New Issue
Block a user