![]() |
Crossfire Server, Trunk
1.75.0
|
Go to the source code of this file.
Functions | |
method_ret | common_process_projectile (object *op) |
Move an arrow or thrown object along its course. More... | |
method_ret | common_projectile_move_on (object *trap, object *victim, object *originator) |
Move on this Thrown Object object. More... | |
void | stop_projectile (object *op) |
Handle an arrow or thrown object stopping. More... | |
This file contains code common to projectile objects. For now it is limited to arrows and thrown objects.
Definition in file projectile.cpp.
method_ret common_process_projectile | ( | object * | op | ) |
Move an arrow or thrown object along its course.
op | The arrow or thrown object being moved. |
Definition at line 77 of file projectile.cpp.
References absdir(), object::direction, DIRX, DIRY, FLAG_ALIVE, FLAG_REFL_MISSILE, FLAG_REFLECTING, freearr_x, freearr_y, GET_ANIM_ID, get_map_flags(), GET_MAP_MOVE_BLOCK, hit_with_arrow(), object::level, llevError, LOG(), m, object::map, map_find_by_flag(), METHOD_ERROR, METHOD_OK, OB_TYPE_MOVE_BLOCK, object_free_drop_inventory(), object_get_owner(), object_insert_in_map_at(), object_remove(), object_update_turn_face(), P_IS_ALIVE, P_OUT_OF_MAP, QUERY_FLAG, rndm(), object::speed, object::state, stop_projectile(), object::x, and object::y.
Referenced by arrow_type_process(), and thrown_object_type_process().
method_ret common_projectile_move_on | ( | object * | trap, |
object * | victim, | ||
object * | originator | ||
) |
Move on this Thrown Object object.
trap | The thrown object or arrow we're moving on |
victim | The object moving over this one |
originator | The object that caused the move_on event |
Definition at line 222 of file projectile.cpp.
References common_post_ob_move_on(), common_pre_ob_move_on(), FLAG_ALIVE, hit_with_arrow(), object::inv, METHOD_ERROR, METHOD_OK, object_get_owner(), QUERY_FLAG, and object::speed.
Referenced by init_type_arrow(), and init_type_thrown_object().
void stop_projectile | ( | object * | op | ) |
Handle an arrow or thrown object stopping.
op | The arrow or thrown object that is stopping. |
Definition at line 37 of file projectile.cpp.
References object::count, EVENT_STOP, events_execute_object_event(), fix_stopped_arrow(), FREE_OBJ_FREE_INVENTORY, object::inv, object::map, object_clear_owner(), object_free(), object_free_drop_inventory(), object_insert_in_map_at(), object_merge(), object_remove(), object_was_destroyed, SCRIPT_FIX_NOTHING, object::x, and object::y.
Referenced by arrow_type_process(), common_process_projectile(), and thrown_object_type_process().