diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index e0d0fa541..7b5f33875 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -2008,15 +2008,13 @@ static bool DoGiveInventory(AActor *receiver, bool orresult, VM_ARGS) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_GiveInventory) { PARAM_ACTION_PROLOGUE; - bool result = DoGiveInventory(self, false, VM_ARGS_NAMES); - ACTION_RETURN_BOOL(result); + ACTION_RETURN_BOOL(DoGiveInventory(self, false, VM_ARGS_NAMES)); } DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_GiveToTarget) { PARAM_ACTION_PROLOGUE; - bool result = DoGiveInventory(self->target, false, VM_ARGS_NAMES); - ACTION_RETURN_BOOL(result); + ACTION_RETURN_BOOL(DoGiveInventory(self->target, false, VM_ARGS_NAMES)); } DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_GiveToChildren) @@ -2096,15 +2094,13 @@ bool DoTakeInventory(AActor *receiver, bool orresult, VM_ARGS) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_TakeInventory) { PARAM_ACTION_PROLOGUE; - bool result = DoTakeInventory(self, false, VM_ARGS_NAMES); - ACTION_RETURN_BOOL(result); + ACTION_RETURN_BOOL(DoTakeInventory(self, false, VM_ARGS_NAMES)); } DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_TakeFromTarget) { PARAM_ACTION_PROLOGUE; - bool result = DoTakeInventory(self->target, false, VM_ARGS_NAMES); - ACTION_RETURN_BOOL(result); + ACTION_RETURN_BOOL(DoTakeInventory(self->target, false, VM_ARGS_NAMES)); } DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_TakeFromChildren) @@ -2405,8 +2401,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SpawnItem) AActor *mo = Spawn( missile, self->Vec3Angle(distance, self->angle, -self->floorclip + self->GetBobOffset() + zheight), ALLOW_REPLACE); int flags = (transfer_translation ? SIXF_TRANSFERTRANSLATION : 0) + (useammo ? SIXF_SETMASTER : 0); - bool result = InitSpawnedItem(self, mo, flags); - ACTION_RETURN_BOOL(result); // for an inventory item's use state + ACTION_RETURN_BOOL(InitSpawnedItem(self, mo, flags)); // for an inventory item's use state } //=========================================================================== @@ -3255,8 +3250,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_JumpIf) PARAM_BOOL (condition); PARAM_STATE (jump); - if (!condition) jump = NULL; - ACTION_RETURN_STATE(jump); + ACTION_RETURN_STATE(condition ? jump : NULL); } //===========================================================================