 |
Crossfire Server, Trunk
1.75.0
|
Go to the documentation of this file.
56 object *payload = op->
inv;
83 if (op->
map == NULL) {
91 new_x = op->
x+
DIRX(op);
92 new_y = op->
y+
DIRY(op);
150 int left, right, mflags;
182 new_x = x1, new_y = y1;
204 if (op->
speed < 0.05) {
225 if (trap->
inv == NULL) {
#define object_was_destroyed(op, old_tag)
Checks if an object still exists.
object * object_get_owner(object *op)
Returns the object which this object marks as being the owner.
void object_clear_owner(object *op)
Clears the owner of specified object.
void object_update_turn_face(object *op)
If an object with the IS_TURNABLE() flag needs to be turned due to the closest player being on the ot...
@ llevError
Error, serious thing.
void LOG(LogLevel logLevel, const char *format,...)
Logs a message to stderr, or to file.
object * inv
Pointer to the first object in the inventory.
#define QUERY_FLAG(xyz, p)
#define FLAG_REFL_MISSILE
Arrows will reflect from object.
object * object_merge(object *op, object *top)
This function goes through all objects below and including top, and merges op to the first matching o...
int absdir(int d)
Computes an absolute direction.
float speed
Frequency of object 'moves' relative to server tick rate.
struct mapstruct * map
Pointer to the map in which this object is present.
int8_t direction
Means the object is moving that way.
tag_t count
Unique object number for this object.
int rndm(int min, int max)
Returns a number between min and max.
#define P_IS_ALIVE
Something alive is on this space.
int16_t level
Level of creature or object.
int events_execute_object_event(object *op, int eventcode, object *activator, object *third, const char *message, int fix)
Execute an event on the specified object.
object * hit_with_arrow(object *op, object *victim)
hit_with_arrow() disassembles the missile, attacks the victim and reassembles the missile.
#define FLAG_ALIVE
Object can fight (or be fought)
int16_t y
Position in the map for this object.
static event_registration m
void object_free_drop_inventory(object *ob)
Frees everything allocated by an object, removes it from the list of used objects,...
short freearr_y[SIZEOFFREE]
Y offset when searching around a spot.
method_ret common_pre_ob_move_on(object *trap, object *victim, object *originator)
method_ret common_process_projectile(object *op)
Move an arrow or thrown object along its course.
void object_free(object *ob, int flags)
Frees everything allocated by an object, removes it from the list of used objects,...
#define GET_MAP_MOVE_BLOCK(M, X, Y)
Gets the blocking state of a square.
object * fix_stopped_arrow(object *op)
An ARROW stops moving.
uint32_t tag_t
Object tag, unique during the whole game.
object * map_find_by_flag(mapstruct *map, int x, int y, int flag)
Finds an object in a map tile by flag number.
object * object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
Same as object_insert_in_map() except it handle separate coordinates and do a clean job preparing mul...
#define P_OUT_OF_MAP
This space is outside the map.
char method_ret
Define some standard return values for callbacks which don't need to return any other results.
method_ret common_projectile_move_on(object *trap, object *victim, object *originator)
Move on this Thrown Object object.
#define SCRIPT_FIX_NOTHING
int get_map_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny)
This rolls up wall, blocks_magic, blocks_view, etc, all into one function that just returns a P_.
#define FLAG_REFLECTING
Object reflects from walls (lightning)
void stop_projectile(object *op)
Handle an arrow or thrown object stopping.
void object_remove(object *op)
This function removes the object op from the linked list of objects which it is currently tied to.
#define OB_TYPE_MOVE_BLOCK(ob1, type)
Basic macro to see if if ob1 can not move onto a space based on the 'type' move_block parameter Add c...
#define EVENT_STOP
Thrown object stopped.
#define FREE_OBJ_FREE_INVENTORY
Free inventory objects; if not set, drop inventory.
uint8_t state
How the object was last drawn (animation)
short freearr_x[SIZEOFFREE]
X offset when searching around a spot.
void common_post_ob_move_on(object *trap, object *victim, object *originator)