Crossfire Server  1.75.0
projectile.cpp File Reference

This file contains code common to projectile objects. More...

#include <global.h>
#include <sproto.h>
#include <ob_methods.h>
#include <ob_types.h>

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...
 

Detailed Description

This file contains code common to projectile objects.

For now it is limited to arrows and thrown objects.

Definition in file projectile.cpp.

Function Documentation

◆ common_process_projectile()

method_ret common_process_projectile ( object op)

◆ common_projectile_move_on()

method_ret common_projectile_move_on ( object trap,
object victim,
object originator 
)

Move on this Thrown Object object.

Parameters
trapThe thrown object or arrow we're moving on
victimThe object moving over this one
originatorThe object that caused the move_on event
Returns
METHOD_OK

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().

◆ stop_projectile()