Atrinik Server  4.0
Functions
swap.c File Reference
#include <global.h>
#include <toolkit/string.h>
#include <plugin.h>

Go to the source code of this file.

Functions

void write_map_log (void)
 
void read_map_log (void)
 
static int swap_map_check (mapstruct *tiled, mapstruct *map)
 
void swap_map (mapstruct *map, int force_flag)
 
void check_active_maps (void)
 
void flush_old_maps (void)
 

Detailed Description

Controls map swap functions.

Definition in file swap.c.

Function Documentation

void check_active_maps ( void  )

Check active maps and swap them out.

Definition at line 176 of file swap.c.

void flush_old_maps ( void  )

Removes temporary files of maps which are going to be reset next time they are visited.

This is very useful if the tmp-disk is very full.

Definition at line 208 of file swap.c.

void read_map_log ( void  )

Read map log.

Definition at line 66 of file swap.c.

void swap_map ( mapstruct map,
int  force_flag 
)

Swaps a map to disk.

Parameters
mapMap to swap.
force_flagForce flag. If set, will not check for players.

Definition at line 128 of file swap.c.

static int swap_map_check ( mapstruct tiled,
mapstruct map 
)
static

Checks if the specified map can be swapped.

Parameters
tiledThe tiled map.
mapMap on the Z axis.
Returns
1 if the map cannot be swapped, 0 otherwise.

Definition at line 116 of file swap.c.

void write_map_log ( void  )

Write maps log.

Definition at line 37 of file swap.c.