Fix stick being thrown when picking up casette
This commit is contained in:
parent
f6e14e0ec4
commit
d577b7ef9c
@ -67,10 +67,12 @@ public class ItemGrabber : MonoBehaviour {
|
||||
CanIgniteTorch |= Campfire != null && TorchableItem != null;
|
||||
}
|
||||
|
||||
bool JustPickedUpCasette = false;
|
||||
if (Casette != null && Input.GetButtonDown("Grab")) {
|
||||
Casette.Play(PreviousCasette);
|
||||
PreviousCasette = Casette;
|
||||
Casette = null;
|
||||
JustPickedUpCasette = true;
|
||||
} else if (Campfire == null && LookedAtItem != null && Input.GetButtonDown("Grab")) {
|
||||
LookedAtItem.PickUp(HandTransform);
|
||||
GrabbedItems.Add(LookedAtItem);
|
||||
@ -91,7 +93,7 @@ public class ItemGrabber : MonoBehaviour {
|
||||
}
|
||||
}
|
||||
|
||||
if (Input.GetButtonDown("Grab") && (LookedAtItem == null || Campfire != null) && ThrowableItem != null) {
|
||||
if (Input.GetButtonDown("Grab") && (LookedAtItem == null || Campfire != null) && ThrowableItem != null && !JustPickedUpCasette) {
|
||||
Vector3 DropPosition;
|
||||
if (Campfire != null) {
|
||||
DropPosition = Campfire.transform.position + Vector3.up * 0.7f;
|
||||
|
Loading…
Reference in New Issue
Block a user