mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 15:02:01 +00:00
Revert "- fixed a few occurences where ACTION_RETURN_* eliminated the side effect of its argument when no return value was requested."
This reverts commit 7ede77c1d2
.
This commit is contained in:
parent
d2630dee8c
commit
81314a6cd6
1 changed files with 6 additions and 12 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
Loading…
Reference in a new issue