91 if (detected && last == 0) {
95 if (!detected && last == 1) {
100 if (detected && last == 1) {
104 if (!detected && last == 0) {
void LOG(LogLevel logLevel, const char *format,...)
Logs a message to stderr, or to file.
object * object_find_by_name(const object *who, const char *name)
Finds an object in inventory name.
sstring slaying
Which race to do double damage to.
int32_t value
How much money it is worth (or contains)
object * above
Pointer to the object stacked above this one.
int16_t y
Position in the map for this object.
static void move_detector(object *op)
Move a detector.
Global type definitions and header inclusions.
peterm: detector is an object which notices the presense of another object and is triggered like butt...
object * object_find_by_type_and_slaying(const object *who, int type, const char *slaying)
Find object in inventory by type and slaying.
void register_process(int ob_type, process_func method)
Registers the process method for the given type.
char method_ret
Define some standard return values for callbacks which don't need to return any other results...
float speed
Frequency of object 'moves' relative to server tick rate.
void init_type_detector(void)
Initializer for the detector object type.
char path[HUGE_BUF]
Filename of the map.
object * env
Pointer to the object which is the environment.
static method_ret detector_type_process(object *op)
Processes a detector.
living stats
Str, Con, Dex, etc.
struct mapstruct * map
Pointer to the map in which this object is present.
sstring name
The name of the object, obviously...
uint8_t type
PLAYER, BULLET, etc.
void object_update_speed(object *op)
Updates the speed of an object.
#define GET_MAP_OB(M, X, Y)
Gets the bottom object on a map.
Object type functions and variables.