Crossfire Server, Branches 1.12  R18729
detector.c File Reference
#include <global.h>
#include <ob_methods.h>
#include <ob_types.h>
#include <sounds.h>
#include <sproto.h>
+ Include dependency graph for detector.c:

Go to the source code of this file.

Functions

static method_ret detector_type_process (ob_methods *context, object *op)
 
void init_type_detector (void)
 
static void move_detector (object *op)
 

Detailed Description

The implementation of detector objects.

Definition in file detector.c.

Function Documentation

static method_ret detector_type_process ( ob_methods context,
object op 
)
static

Processes a detector.

Parameters
contextThe method context, ignored
opThe detector to process
Return values
METHOD_OK

Definition at line 128 of file detector.c.

References METHOD_OK, and move_detector().

Referenced by init_type_detector().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void init_type_detector ( void  )

Initializer for the detector object type.

Definition at line 39 of file detector.c.

References DETECTOR, detector_type_process(), and register_process().

Referenced by register_all_ob_types().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void move_detector ( object op)
static

Move a detector.

  • slaying: name of the thing the detector is to look for
  • speed: frequency of 'glances'
  • connected: connected value of detector
  • sp: 1 if detection sets buttons -1 if detection unsets buttons
Parameters
opdetector to move.

Definition at line 55 of file detector.c.

References obj::above, obj::below, obj::env, FORCE, GET_MAP_OB, liv::hp, obj::inv, llevError, LOG(), obj::map, obj::name, mapdef::path, PLAYER, push_button(), obj::slaying, liv::sp, SPECIAL_KEY, obj::speed, obj::stats, obj::type, update_ob_speed(), obj::value, obj::x, and obj::y.

Referenced by detector_type_process().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: