Crossfire Server, Trunk
trigger.c File Reference
#include <global.h>
#include <ob_methods.h>
#include <ob_types.h>
#include <sounds.h>
#include <sproto.h>
+ Include dependency graph for trigger.c:

Go to the source code of this file.

Functions

void init_type_trigger (void)
 
static method_ret trigger_type_apply (object *op, object *applier, int aflags)
 
static method_ret trigger_type_process (object *op)
 

Detailed Description

The implementation of the Trigger class of objects. Triggers are things like handles in the game.

Definition in file trigger.c.

Function Documentation

◆ init_type_trigger()

void init_type_trigger ( void  )

Initializer for the TRIGGER object type.

Definition at line 40 of file trigger.c.

References register_apply(), register_process(), TRIGGER, trigger_type_apply(), and trigger_type_process().

Referenced by register_all_ob_types().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ trigger_type_apply()

static method_ret trigger_type_apply ( object op,
object applier,
int  aflags 
)
static

Attempts to apply a trigger.

Parameters
opThe Trigger to apply
applierThe object attempting to apply the Trigger
aflagsSpecial flags (always apply/unapply)
Returns
The return value is always 1

Definition at line 52 of file trigger.c.

References check_trigger(), draw_ext_info(), MSG_TYPE_APPLY, MSG_TYPE_APPLY_FAILURE, MSG_TYPE_APPLY_SUCCESS, NDI_UNIQUE, give::op, play_sound_map(), SOUND_TYPE_GROUND, and nlohmann::detail::void().

Referenced by init_type_trigger().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ trigger_type_process()

static method_ret trigger_type_process ( object op)
static

Processes a Trigger.

Parameters
opThe Trigger to process
Returns
Always METHOD_OK

Definition at line 70 of file trigger.c.

References check_trigger(), METHOD_OK, NUM_ANIMATIONS, object_update(), give::op, SET_ANIMATION, and UP_OBJ_FACE.

Referenced by init_type_trigger().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: