Atrinik Server  4.0
Functions
lightning.c File Reference
#include <global.h>
#include <object.h>
#include <object_methods.h>

Go to the source code of this file.

Functions

static void lightning_fork (object *op, object *tmp)
 
static objectprojectile_move_func (object *op)
 
static objectprojectile_stop_func (object *op, int reason)
 
 OBJECT_TYPE_INIT_DEFINE (lightning)
 

Detailed Description

Handles code related to lightning.

Definition in file lightning.c.

Function Documentation

static void lightning_fork ( object op,
object tmp 
)
static

Causes lightning to fork.

Parameters
opOriginal bolt.
tmpFirst piece of the fork.

Definition at line 43 of file lightning.c.

OBJECT_TYPE_INIT_DEFINE ( lightning  )

Initialize the lightning type object methods.

Definition at line 149 of file lightning.c.

static object* projectile_move_func ( object op)
static

Function to handle a fired object moving, eg, arrow moving to the next square along its path.

Parameters
opThe fired object.
Returns
The fired object, NULL if it was destroyed for some reason.

Definition at line 101 of file lightning.c.

static object* projectile_stop_func ( object op,
int  reason 
)
static

Called to stop a fired object.

Parameters
opThe fired object.
reasonReason for stopping, one of Projectile stop reasons.
Returns
The fired object if it still exists, NULL otherwise.

Definition at line 135 of file lightning.c.