From 4257b84f84bf408046c1f976ca0467b8bd937d24 Mon Sep 17 00:00:00 2001 From: Sven Eberhardt Date: Sun, 24 Jan 2016 18:15:55 -0500 Subject: [PATCH] Fix HUD script errors when cursor does not include inventory control --- .../HUD.ocd/Controller.ocd/ControllerActionBar.ocd/Script.c | 2 +- .../HUD.ocd/Controller.ocd/ControllerInventoryBar.ocd/Script.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/planet/Objects.ocd/HUD.ocd/Controller.ocd/ControllerActionBar.ocd/Script.c b/planet/Objects.ocd/HUD.ocd/Controller.ocd/ControllerActionBar.ocd/Script.c index 7a4a4494f..08be7eefe 100644 --- a/planet/Objects.ocd/HUD.ocd/Controller.ocd/ControllerActionBar.ocd/Script.c +++ b/planet/Objects.ocd/HUD.ocd/Controller.ocd/ControllerActionBar.ocd/Script.c @@ -177,7 +177,7 @@ public func UpdateInteractionObject() } var interactables = cursor->~GetInteractableObjects(); - if (!GetLength(interactables)) + if (!interactables || !GetLength(interactables)) { HideInteraction(); return; diff --git a/planet/Objects.ocd/HUD.ocd/Controller.ocd/ControllerInventoryBar.ocd/Script.c b/planet/Objects.ocd/HUD.ocd/Controller.ocd/ControllerInventoryBar.ocd/Script.c index badaac14d..b1c5d0d09 100644 --- a/planet/Objects.ocd/HUD.ocd/Controller.ocd/ControllerInventoryBar.ocd/Script.c +++ b/planet/Objects.ocd/HUD.ocd/Controller.ocd/ControllerInventoryBar.ocd/Script.c @@ -118,7 +118,7 @@ private func UpdateInventory() UpdateInventoryButtons(clonk); // update inventory-slots - var hand_item_pos = clonk->GetHandItemPos(0); + var hand_item_pos = clonk->~GetHandItemPos(0); for (var slot_info in inventory_slots) {