From c2ac2bda420be2edeb0cc81dd53b6d56b6f81d1e Mon Sep 17 00:00:00 2001 From: Maikel de Vries Date: Sun, 25 Feb 2018 21:32:18 +0100 Subject: [PATCH] item spawn: instantly pick carry heavy items --- planet/Objects.ocd/Environment.ocd/ItemSpawn.ocd/Script.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/planet/Objects.ocd/Environment.ocd/ItemSpawn.ocd/Script.c b/planet/Objects.ocd/Environment.ocd/ItemSpawn.ocd/Script.c index 0597f597a..af16f15d0 100644 --- a/planet/Objects.ocd/Environment.ocd/ItemSpawn.ocd/Script.c +++ b/planet/Objects.ocd/Environment.ocd/ItemSpawn.ocd/Script.c @@ -109,7 +109,11 @@ private func FxSpawnTimer(object target, proplist effect, int time) { if (crew->ContentsCount() < crew.MaxContentsCount || (spawn_id->~IsCarryHeavy() && !crew->IsCarryingHeavy())) { - spawn_list[plr] = crew->CreateContents(spawn_id); + // Special way to pick up carry heavy objects instantly without animation. + if (spawn_id->~IsCarryHeavy()) + spawn_list[plr] = crew->CreateCarryHeavyContents(spawn_id); + else + spawn_list[plr] = crew->CreateContents(spawn_id); UpdateVisibility(plr); crew->~Get(spawn_list[plr]); // for sound }