Crossfire Server, Branches 1.12
R18729
|
#include <global.h>
#include <ob_methods.h>
#include <ob_types.h>
#include <sounds.h>
#include <sproto.h>
Go to the source code of this file.
Functions | |
void | init_type_marker (void) |
static method_ret | marker_type_process (ob_methods *context, object *op) |
static method_ret | marker_type_trigger (ob_methods *context, object *op, object *cause, int state) |
void | move_marker (object *op) |
void init_type_marker | ( | void | ) |
Initializer for the marker object type.
Definition at line 40 of file marker.c.
References MARKER, marker_type_process(), marker_type_trigger(), register_process(), register_trigger(), and TRIGGER_MARKER.
Referenced by register_all_ob_types().
|
static |
Processes a marker.
context | The method context |
op | The marker to process |
METHOD_OK |
Definition at line 122 of file marker.c.
References METHOD_OK, and move_marker().
Referenced by init_type_marker().
|
static |
A marker is triggered.
context | Ignored. |
op | The object being triggered |
cause | Ignored. |
state | Ignored. |
METHOD_OK |
Definition at line 135 of file marker.c.
References METHOD_OK, and move_marker().
Referenced by init_type_marker().
void move_marker | ( | object * | op | ) |
Move function for marker objects.
When moved, a marker will search for a player sitting above it, and insert an invisible, weightless force into him with a specific code as the slaying field.
At that time, it writes the contents of its own message field to the player. The marker will decrement hp to 0 and then delete itself every time it grants a mark. unless hp was zero to start with, in which case it is infinite.
op | marker to move. Can be removed if it reached its marking limit. |
Definition at line 61 of file marker.c.
References obj::above, add_string(), obj::below, create_archetype(), draw_ext_info(), liv::food, FORCE, FORCE_NAME, free_object(), GET_MAP_OB, liv::hp, insert_ob_in_ob(), obj::inv, obj::lore, obj::map, obj::msg, MSG_SUBTYPE_NONE, MSG_TYPE_MISC, NDI_NAVY, NDI_UNIQUE, PLAYER, remove_ob(), obj::slaying, obj::speed, obj::speed_left, obj::stats, obj::type, update_ob_speed(), obj::x, and obj::y.
Referenced by marker_type_process(), and marker_type_trigger().