From 935d49d75fe148702af3d197fd55339695a56621 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 22 Jan 2017 13:51:22 +0200 Subject: [PATCH] Fixed returning of value from TakeInventory() function Issuing take CCMD no longer causes assertion failure at src/scripting/vm/vmexec.h:662 assert(numret == C && "Number of parameters returned differs from what was expected by the caller") --- src/p_mobj.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 210c0cd5b..807326d78 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -924,8 +924,7 @@ DEFINE_ACTION_FUNCTION(AActor, TakeInventory) PARAM_INT(amount); PARAM_BOOL_DEF(fromdecorate); PARAM_BOOL_DEF(notakeinfinite); - self->TakeInventory(item, amount, fromdecorate, notakeinfinite); - return 0; + ACTION_RETURN_BOOL(self->TakeInventory(item, amount, fromdecorate, notakeinfinite)); } //============================================================================