Crossfire Server, Trunk  1.75.0
detector.cpp File Reference
#include "global.h"
#include <string.h>
#include "ob_methods.h"
#include "ob_types.h"
#include "sounds.h"
#include "sproto.h"
+ Include dependency graph for detector.cpp:

Go to the source code of this file.

Functions

static method_ret detector_type_process (object *op)
 Processes a detector. More...
 
void init_type_detector (void)
 Initializer for the detector object type. More...
 
static void move_detector (object *op)
 Move a detector. More...
 

Detailed Description

The implementation of detector objects.

Definition in file detector.cpp.

Function Documentation

◆ detector_type_process()

static method_ret detector_type_process ( object op)
static

Processes a detector.

Parameters
opThe detector to process
Return values
METHOD_OK

Definition at line 116 of file detector.cpp.

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:

◆ init_type_detector()

void init_type_detector ( void  )

Initializer for the detector object type.

Definition at line 33 of file detector.cpp.

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:

◆ move_detector()

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 49 of file detector.cpp.

References object::above, object::env, FORCE, GET_MAP_OB, living::hp, llevError, LOG(), object::map, object::name, object_find_by_name(), object_find_by_type_and_slaying(), object_update_speed(), mapstruct::path, PLAYER, push_button(), object::slaying, living::sp, SPECIAL_KEY, object::speed, object::stats, object::type, object::value, object::x, and object::y.

Referenced by detector_type_process().

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