Crossfire Server, Trunk  R20513
Functions
transport.c File Reference

The implementation of the Transport class of objects. More...

#include "global.h"
#include <stdlib.h>
#include "ob_methods.h"
#include "ob_types.h"
#include "shop.h"
#include "sounds.h"
#include "sproto.h"
Include dependency graph for transport.c:

Go to the source code of this file.

Functions

void init_type_transport (void)
 Initializer for the TRANSPORT object type. More...
 
static method_ret transport_type_apply (ob_methods *context, object *op, object *applier, int aflags)
 Player is trying to use a transport. More...
 
static method_ret transport_type_process (ob_methods *context, object *op)
 Processes a Transport. More...
 

Detailed Description

The implementation of the Transport class of objects.

A transport is basically little more than a container in which players can enter, and that can be moved around on the map.

Definition in file transport.c.

Function Documentation

void init_type_transport ( void  )

Initializer for the TRANSPORT object type.

Definition at line 37 of file transport.c.

References register_apply(), register_process(), TRANSPORT, transport_type_apply(), and transport_type_process().

Referenced by register_all_ob_types().

Here is the call graph for this function:

Here is the caller graph for this function:

static method_ret transport_type_apply ( ob_methods context,
object op,
object applier,
int  aflags 
)
static

Player is trying to use a transport.

This returns same values as apply_manual() does. This function basically checks to see if the player can use the transport, and if so, sets up the appropriate pointers.

Parameters
contextThe method context
opThe Transport to apply
applierThe object attempting to apply the Transport
aflagsSpecial flags (always apply/unapply)
Return values
0If the applier was not a player
1If the applier was a player

Definition at line 54 of file transport.c.

References obj::animation_id, AP_APPLY, AP_UNAPPLY, obj::arch, obj::carrying, archt::clone, obj::contr, draw_ext_info_format(), drop_object(), obj::env, esrv_map_scroll(), obj::face, find_animation(), find_face(), FOR_INV_FINISH, FOR_INV_PREPARE, socket_struct::look_position, obj::map, MAX_BUF, MSG_TYPE_APPLY, MSG_TYPE_APPLY_ERROR, MSG_TYPE_APPLY_SUCCESS, MSG_TYPE_APPLY_UNAPPLY, obj::name, NDI_UNIQUE, new_faces, new_face_struct::number, pl::ob, object_find_by_type(), object_get_value(), object_insert_in_map_at(), object_insert_in_ob(), object_remove(), object_sum_weight(), PLAYER, query_name(), shop_contains(), pl::socket, obj::speed, pl::transport, transport_can_hold(), obj::type, socket_struct::update_look, obj::weight_limit, obj::x, and obj::y.

Referenced by init_type_transport().

Here is the call graph for this function:

Here is the caller graph for this function:

static method_ret transport_type_process ( ob_methods context,
object op 
)
static

Processes a Transport.

Parameters
contextThe method context
opThe Transport to process
Return values
0If the remaining speed of the transport was > 0.0
1If the remaining speed of the transport was < 0.0

Definition at line 242 of file transport.c.

References obj::speed_left.

Referenced by init_type_transport().

Here is the caller graph for this function: