Atrinik Server 2.5
Functions
types/waypoint.c File Reference
#include <global.h>

Go to the source code of this file.

Functions

objectget_active_waypoint (object *op)
objectget_aggro_waypoint (object *op)
objectget_return_waypoint (object *op)
static objectfind_waypoint (object *op, shstr *name)
static mapstructwaypoint_load_dest (object *op, object *waypoint)
void waypoint_compute_path (object *waypoint)
void waypoint_move (object *op, object *waypoint)

Detailed Description

Handles the code for waypoint objects.

Definition in file waypoint.c.


Function Documentation

static object* find_waypoint ( object op,
shstr name 
) [static]

Find a monster's waypoint by name (used for getting the next waypoint).

Parameters:
opThe monster.
nameThe waypoint name to find.
Returns:
The waypoint object if found, NULL otherwise.

Definition at line 95 of file waypoint.c.

object* get_active_waypoint ( object op)

Find a monster's currently active waypoint, if any.

Parameters:
opThe monster.
Returns:
Active waypoint of this monster, NULL if none found.

Definition at line 36 of file waypoint.c.

object* get_aggro_waypoint ( object op)

Find a monster's current aggro waypoint, if any.

Parameters:
opThe monster.
Returns:
Aggro waypoint of this monster, NULL if none found.

Definition at line 55 of file waypoint.c.

object* get_return_waypoint ( object op)

Find a monster's current return-home waypoint, if any.

Parameters:
opThe monster.
Returns:
Return-home waypoint of this monster, NULL if none found.

Definition at line 75 of file waypoint.c.

void waypoint_compute_path ( object waypoint)

Perform a path computation for the waypoint object.

This function is called whenever our path request is dequeued.

Parameters:
waypointThe waypoint object.

Definition at line 157 of file waypoint.c.

static mapstruct* waypoint_load_dest ( object op,
object waypoint 
) [static]

Find the destination map if specified in waypoint, otherwise use current map.

Parameters:
opMonster.
waypointWaypoint.
Returns:
Destination map.

Definition at line 121 of file waypoint.c.

void waypoint_move ( object op,
object waypoint 
)

Move towards waypoint target.

Parameters:
opObject to move.
waypointThe waypoint object.

Definition at line 245 of file waypoint.c.