A_SetReactionTime is an action that sets the actor's reaction time, which is a timer that is used for various purposes by some actions. If Var1 is set to 0, the reaction time will be set to the value of the actor's ReactionTime
property. If Var1 is set to 1, the reaction time will be set to the value of Var2.
Code – A_SetReactionTime
|
|
// Function: A_SetReactionTime
//
// Description: Sets the object's reaction time.
//
// var1 = 1 (use value in var2); 0 (use info table value)
// var2 = if var1 = 1, then value to set
//
void A_SetReactionTime(mobj_t *actor)
{
#ifdef HAVE_BLUA
if (LUA_CallAction("A_SetReactionTime", actor))
return;
#endif
if (var1)
actor->reactiontime = var2;
else
actor->reactiontime = actor->info->reactiontime;
}
|
|