Crossfire Server  1.75.0
transport.cpp 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"

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 (object *op, object *applier, int aflags)
 Player is trying to use a transport. More...
 
static method_ret transport_type_process (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.cpp.

Function Documentation

◆ init_type_transport()

void init_type_transport ( void  )

Initializer for the TRANSPORT object type.

Definition at line 37 of file transport.cpp.

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

Referenced by register_all_ob_types().

◆ transport_type_apply()

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

◆ transport_type_process()

static method_ret transport_type_process ( object op)
static

Processes a Transport.

Parameters
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 240 of file transport.cpp.

References object::speed_left.

Referenced by init_type_transport().