Crossfire Server, Branches 1.12
R18729
|
Go to the source code of this file.
Functions | |
method_ret | common_process_projectile (ob_methods *context, object *op) |
method_ret | common_projectile_move_on (ob_methods *context, object *trap, object *victim, object *originator) |
void | stop_projectile (object *op) |
This file contains code common to projectile objects. For now it is limited to arrows and thrown objects.
Definition in file projectile.c.
method_ret common_process_projectile | ( | ob_methods * | context, |
object * | op | ||
) |
Move an arrow or thrown object along its course.
context | The method context |
op | The arrow or thrown object being moved. |
Definition at line 62 of file projectile.c.
References obj::above, absdir(), obj::direction, DIRX, DIRY, obj::face, FLAG_ALIVE, FLAG_REFL_MISSILE, FLAG_REFLECTING, free_object(), freearr_x, freearr_y, GET_ANIM_ID, GET_ANIMATION, get_map_flags(), GET_MAP_MOVE_BLOCK, GET_MAP_OB, hit_with_arrow(), insert_ob_in_map(), obj::level, llevError, LOG(), obj::map, METHOD_ERROR, METHOD_OK, new_faces, new_face_struct::number, OB_TYPE_MOVE_BLOCK, obj::owner, P_IS_ALIVE, P_OUT_OF_MAP, QUERY_FLAG, remove_ob(), rndm(), SET_ANIMATION, obj::speed, obj::state, stop_projectile(), obj::x, and obj::y.
Referenced by arrow_type_process(), and thrown_object_type_process().
method_ret common_projectile_move_on | ( | ob_methods * | context, |
object * | trap, | ||
object * | victim, | ||
object * | originator | ||
) |
Move on this Thrown Object object.
context | The method context |
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 219 of file projectile.c.
References common_post_ob_move_on(), common_pre_ob_move_on(), FLAG_ALIVE, hit_with_arrow(), obj::inv, METHOD_ERROR, METHOD_OK, obj::owner, QUERY_FLAG, and obj::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 36 of file projectile.c.
References clear_owner(), EVENT_STOP, execute_event(), fix_stopped_arrow(), free_object(), insert_ob_in_map(), obj::inv, obj::map, merge_ob(), remove_ob(), and SCRIPT_FIX_NOTHING.
Referenced by arrow_type_process(), common_process_projectile(), and thrown_object_type_process().