do checks against the right hand which is cleaner to read
This commit is contained in:
@@ -573,19 +573,19 @@ public:
|
|||||||
|
|
||||||
FORCEINLINE bool CanGrab(const USGVirtualHandComponent* Hand, const AActor* Actor) const
|
FORCEINLINE bool CanGrab(const USGVirtualHandComponent* Hand, const AActor* Actor) const
|
||||||
{
|
{
|
||||||
return Hand == HandLeft ? CanLeftHandGrab(Actor) : CanRightHandGrab(Actor);
|
return Hand == HandRight ? CanRightHandGrab(Actor) : CanLeftHandGrab(Actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
FORCEINLINE bool IsGrabbing(const USGVirtualHandComponent* Hand, const AActor* Actor) const
|
FORCEINLINE bool IsGrabbing(const USGVirtualHandComponent* Hand, const AActor* Actor) const
|
||||||
{
|
{
|
||||||
return Hand == HandLeft ? IsLeftHandGrabbing(Actor) : IsRightHandGrabbing(Actor);
|
return Hand == HandRight ? IsRightHandGrabbing(Actor) : IsLeftHandGrabbing(Actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsGrabbing(const USGVirtualHandComponent* Hand, AActor*& OutActor) const;
|
bool IsGrabbing(const USGVirtualHandComponent* Hand, AActor*& OutActor) const;
|
||||||
|
|
||||||
FORCEINLINE bool IsGrabbing(const USGVirtualHandComponent* Hand) const
|
FORCEINLINE bool IsGrabbing(const USGVirtualHandComponent* Hand) const
|
||||||
{
|
{
|
||||||
return Hand == HandLeft ? IsLeftHandGrabbing() : IsRightHandGrabbing();
|
return Hand == HandRight ? IsRightHandGrabbing() : IsLeftHandGrabbing();
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -607,6 +607,6 @@ public:
|
|||||||
|
|
||||||
FORCEINLINE void Release(const USGVirtualHandComponent* Hand)
|
FORCEINLINE void Release(const USGVirtualHandComponent* Hand)
|
||||||
{
|
{
|
||||||
return Hand == HandLeft ? ReleaseLeft() : ReleaseRight();
|
return Hand == HandRight ? ReleaseRight() : ReleaseLeft();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Reference in New Issue
Block a user