Planeshift
Classes | Public Member Functions | Public Attributes

psSectorInfo Class Reference

Contains information about sectors from the server perspective. More...

#include <pssectorinfo.h>

List of all members.

Classes

struct  weatherTypeData
 Structure used to store informations for various weather types in this sector. More...

Public Member Functions

void AddWeatherTypeData (weatherTypeData newWeatherData, unsigned int id)
 Adds informations about a weather type defined by id.
double CalcFunction (MathEnvironment *env, const char *functionName, const double *params)
 This is used by the math scripting engine to get calculated values.
csVector3 GetDeathCord ()
 Gets the sector cordinates we will teleport to when dieing in this sector.
bool GetDeathRestoreHP ()
 Checks if a teleporting sector will trigger the death penalty when used.
bool GetDeathRestoreMana ()
 Checks if a teleporting sector will trigger the death penalty when used.
float GetDeathRot ()
 Gets the rotation we will teleport to when dieing in this sector.
csString GetDeathSector ()
 Gets the sector name we will teleport to when dieing in this sector.
bool GetHasPenalty ()
 Checks if a teleporting sector will trigger the death penalty when used.
bool GetIsColliding ()
bool GetIsNonTransient ()
bool GetIsTeleporting ()
 Checks if this is set as a teleporting sector.
double GetProperty (MathEnvironment *env, const char *ptr)
 This is used by the math scripting engine to get various values.
unsigned int GetRandomWeatherDensity (unsigned int id)
 Gets a random value between the max and min density for this weather type.
unsigned int GetRandomWeatherDuration (unsigned int id)
 Gets a random value between the max and min Duration for this weather type.
unsigned int GetRandomWeatherFadeIn (unsigned int id)
 Gets a random value between the max and min Fade In for this weather type.
unsigned int GetRandomWeatherFadeOut (unsigned int id)
 Gets a random value between the max and min Fade Out for this weather type.
unsigned int GetRandomWeatherGap (unsigned int id)
 Gets a random value between the max and min Gap for this weather type.
csVector3 GetTeleportingCord ()
 Gets the sector cordinates we will teleport to when entering this sector.
float GetTeleportingRot ()
 Gets the rotation we will teleport to when entering this sector.
csString GetTeleportingSector ()
 Gets the sector name we will teleport to when entering this sector.
bool GetWeatherEnabled (unsigned int id)
 Gets the enabled status of a weather event type for this sector.
 psSectorInfo ()
void SetWeatherEnabled (unsigned int id, bool newStatus)
 Sets the enabled status of a weather event type for this sector.
const char * ToString ()
 ~psSectorInfo ()

Public Attributes

int b
unsigned int current_rain_drops
 Drops.
csVector3 deathCords
 the destination cordinates where to teleport on death from this sector
bool deathRestoreHP
 Sets if this sector will restore hp when the player dies in it.
bool deathRestoreMana
 Sets if this sector will restore mana when the player dies in it.
float deathRot
 The destination rotation where to teleport on death from this sector.
csString deathSector
 The sector where to teleport on death from this sector. Note if empty it will be the default one.
bool densitySaved
unsigned int fog_density
unsigned int fog_density_old
unsigned int fogFade
int g
csString god_name
bool has_penalty
 This sector will apply the death penalty if it's a teleporting sector.
bool is_colliding
bool is_non_transient
bool is_raining
bool is_snowing
bool is_teleporting
 This sector will immediately teleport the player somewhere else when entered if true.
csString name
int r
float say_range
csVector3 teleportingCords
 The destination cordinates when this sector is a teleporting sector.
float teleportingRot
 The destination rotation when this sector is a teleporting sector.
csString teleportingSector
 The destination sector when this sector is a teleporting sector. Note if empty it will be spawn.
unsigned int uid
csHash< weatherTypeData,
unsigned int
weatherData
 An hash containing all the various possible weather data.

Detailed Description

Contains information about sectors from the server perspective.

Right now this class just includes the ID, name of a sector and rain parameters. Future versions may include parameters for a bounding box, portals to other sectors, or other information.

Definition at line 50 of file pssectorinfo.h.


Constructor & Destructor Documentation

psSectorInfo::psSectorInfo ( )
psSectorInfo::~psSectorInfo ( )

Member Function Documentation

void psSectorInfo::AddWeatherTypeData ( weatherTypeData  newWeatherData,
unsigned int  id 
)

Adds informations about a weather type defined by id.

Parameters:
newWeatherDataA weatherTypeData struct containing the informations about a weather type.
idThe id of the weather type we are adding.
double psSectorInfo::CalcFunction ( MathEnvironment env,
const char *  functionName,
const double *  params 
) [virtual]

This is used by the math scripting engine to get calculated values.

Implements iScriptableVar.

csVector3 psSectorInfo::GetDeathCord ( ) [inline]

Gets the sector cordinates we will teleport to when dieing in this sector.

Returns:
A csVector3 containing the sector cordinates.

Definition at line 142 of file pssectorinfo.h.

bool psSectorInfo::GetDeathRestoreHP ( ) [inline]

Checks if a teleporting sector will trigger the death penalty when used.

Note:
this can be TRUE even if the previous isn't but it won't do anything.
Returns:
TRUE if this is a sector with death penalty.

Definition at line 96 of file pssectorinfo.h.

bool psSectorInfo::GetDeathRestoreMana ( ) [inline]

Checks if a teleporting sector will trigger the death penalty when used.

Note:
this can be TRUE even if the previous isn't but it won't do anything.
Returns:
TRUE if this is a sector with death penalty.

Definition at line 105 of file pssectorinfo.h.

float psSectorInfo::GetDeathRot ( ) [inline]

Gets the rotation we will teleport to when dieing in this sector.

Returns:
A float containing the rotation.

Definition at line 149 of file pssectorinfo.h.

csString psSectorInfo::GetDeathSector ( ) [inline]

Gets the sector name we will teleport to when dieing in this sector.

Returns:
csString A csString containing the sector name.

Definition at line 135 of file pssectorinfo.h.

bool psSectorInfo::GetHasPenalty ( ) [inline]

Checks if a teleporting sector will trigger the death penalty when used.

Note:
this can be TRUE even if the previous isn't but it won't do anything.
Returns:
TRUE if this is a sector with death penalty.

Definition at line 87 of file pssectorinfo.h.

bool psSectorInfo::GetIsColliding ( ) [inline]

Definition at line 65 of file pssectorinfo.h.

bool psSectorInfo::GetIsNonTransient ( ) [inline]

Definition at line 69 of file pssectorinfo.h.

bool psSectorInfo::GetIsTeleporting ( ) [inline]

Checks if this is set as a teleporting sector.

A teleporting sector is a sector which teleports the player to defined sector (in teleportingSector/Cords/Rot) or spawn if not defined.

Returns:
TRUE if this is a teleporting sector.

Definition at line 79 of file pssectorinfo.h.

double psSectorInfo::GetProperty ( MathEnvironment env,
const char *  ptr 
) [virtual]

This is used by the math scripting engine to get various values.

Implements iScriptableVar.

unsigned int psSectorInfo::GetRandomWeatherDensity ( unsigned int  id)

Gets a random value between the max and min density for this weather type.

Parameters:
idThe id of the event
See also:
psWeatherMessage
Returns:
An unsigned int with a random density time.
unsigned int psSectorInfo::GetRandomWeatherDuration ( unsigned int  id)

Gets a random value between the max and min Duration for this weather type.

Parameters:
idThe id of the event
See also:
psWeatherMessage
Returns:
An unsigned int with a random duration time.
unsigned int psSectorInfo::GetRandomWeatherFadeIn ( unsigned int  id)

Gets a random value between the max and min Fade In for this weather type.

Parameters:
idThe id of the event
See also:
psWeatherMessage
Returns:
An unsigned int with a random Fade In time.
unsigned int psSectorInfo::GetRandomWeatherFadeOut ( unsigned int  id)

Gets a random value between the max and min Fade Out for this weather type.

Parameters:
idThe id of the event
See also:
psWeatherMessage
Returns:
An unsigned int with a random Fade Out time.
unsigned int psSectorInfo::GetRandomWeatherGap ( unsigned int  id)

Gets a random value between the max and min Gap for this weather type.

Parameters:
idThe id of the event
See also:
psWeatherMessage
Returns:
An unsigned int with a random gap time.
csVector3 psSectorInfo::GetTeleportingCord ( ) [inline]

Gets the sector cordinates we will teleport to when entering this sector.

Returns:
A csVector3 containing the sector cordinates.

Definition at line 120 of file pssectorinfo.h.

float psSectorInfo::GetTeleportingRot ( ) [inline]

Gets the rotation we will teleport to when entering this sector.

Returns:
A float containing the rotation.

Definition at line 127 of file pssectorinfo.h.

csString psSectorInfo::GetTeleportingSector ( ) [inline]

Gets the sector name we will teleport to when entering this sector.

Returns:
A csString containing the sector name.

Definition at line 113 of file pssectorinfo.h.

bool psSectorInfo::GetWeatherEnabled ( unsigned int  id)

Gets the enabled status of a weather event type for this sector.

Parameters:
idThe id of the event
See also:
psWeatherMessage
Returns:
A Boolean saying if the weather type is enabled and activable (has valid data.)
void psSectorInfo::SetWeatherEnabled ( unsigned int  id,
bool  newStatus 
)

Sets the enabled status of a weather event type for this sector.

Parameters:
idThe id of the event
See also:
psWeatherMessage
Parameters:
newStatusThe new status to assign to the weather event type (false for disabled)
const char* psSectorInfo::ToString ( ) [inline, virtual]

Implements iScriptableVar.

Definition at line 60 of file pssectorinfo.h.


Member Data Documentation

Definition at line 260 of file pssectorinfo.h.

Drops.

Definition at line 225 of file pssectorinfo.h.

the destination cordinates where to teleport on death from this sector

Definition at line 250 of file pssectorinfo.h.

Sets if this sector will restore hp when the player dies in it.

Definition at line 235 of file pssectorinfo.h.

Sets if this sector will restore mana when the player dies in it.

Definition at line 233 of file pssectorinfo.h.

The destination rotation where to teleport on death from this sector.

Definition at line 252 of file pssectorinfo.h.

The sector where to teleport on death from this sector. Note if empty it will be the default one.

Definition at line 248 of file pssectorinfo.h.

Definition at line 258 of file pssectorinfo.h.

Definition at line 257 of file pssectorinfo.h.

Definition at line 257 of file pssectorinfo.h.

Definition at line 259 of file pssectorinfo.h.

Definition at line 260 of file pssectorinfo.h.

Definition at line 264 of file pssectorinfo.h.

This sector will apply the death penalty if it's a teleporting sector.

Definition at line 240 of file pssectorinfo.h.

Definition at line 229 of file pssectorinfo.h.

Definition at line 230 of file pssectorinfo.h.

Definition at line 227 of file pssectorinfo.h.

Definition at line 228 of file pssectorinfo.h.

This sector will immediately teleport the player somewhere else when entered if true.

Definition at line 238 of file pssectorinfo.h.

Definition at line 155 of file pssectorinfo.h.

Definition at line 260 of file pssectorinfo.h.

Definition at line 262 of file pssectorinfo.h.

The destination cordinates when this sector is a teleporting sector.

Definition at line 244 of file pssectorinfo.h.

The destination rotation when this sector is a teleporting sector.

Definition at line 246 of file pssectorinfo.h.

The destination sector when this sector is a teleporting sector. Note if empty it will be spawn.

Definition at line 242 of file pssectorinfo.h.

Definition at line 154 of file pssectorinfo.h.

An hash containing all the various possible weather data.

Definition at line 175 of file pssectorinfo.h.


The documentation for this class was generated from the following file: