|
Planeshift
|
This class handles generation of any and all weather events in the game, including rain, snow, locust storms, day/night cycles, etc. More...
#include <weathermanager.h>
Public Member Functions | |
| void | BroadcastGameTime () |
| void | BroadcastGameTimeSuperclients () |
| int | GetGameTODDay () |
| int | GetGameTODHour () |
| int | GetGameTODMinute () |
| int | GetGameTODMonth () |
| int | GetGameTODYear () |
| void | HandleWeatherEvent (psWeatherGameEvent *event) |
| void | Initialize () |
| void | QueueNextEvent (int delayticks, int eventtype, int eventvalue, int duration, int fade, const char *sector, psSectorInfo *si, uint clientnum=0, int r=0, int g=0, int b=0) |
| void | SaveGameTime () |
| void | SendClientGameTime (int cnum) |
| void | SetGameTime (int hour, int minute) |
| void | StartGameTime () |
| Look into the database for the saved time. | |
| void | StartWeather (psSectorInfo *si, unsigned int type=0) |
| Starts automatic weather in a sector Allocates new events for snow, rain and fog. | |
| void | StopWeather (psSectorInfo *si, unsigned int type=0) |
| Stops automatic weather in a sector Puts all events from the automatic weather (rain and snow for now) in the sector into the ignored array, removing them from the events array. | |
| void | UpdateClient (uint32_t cnum) |
| WeatherManager (CacheManager *cachemanager) | |
| ~WeatherManager () | |
Protected Attributes | |
| CacheManager * | cacheManager |
| csArray< psWeatherGameEvent * > | events |
| CS::Threading::Mutex | eventsMutex |
| int | gameTimeDay |
| int | gameTimeHour |
| int | gameTimeMinute |
| int | gameTimeMonth |
| int | gameTimeYear |
| csArray< psWeatherGameEvent * > | ignored |
| Used for overriding commands like /rain. | |
| csRandomGen * | randomgen |
This class handles generation of any and all weather events in the game, including rain, snow, locust storms, day/night cycles, etc.
Definition at line 48 of file weathermanager.h.
| WeatherManager::WeatherManager | ( | CacheManager * | cachemanager | ) |
| WeatherManager::~WeatherManager | ( | ) |
| void WeatherManager::BroadcastGameTime | ( | ) |
| void WeatherManager::BroadcastGameTimeSuperclients | ( | ) |
| int WeatherManager::GetGameTODDay | ( | ) | [inline] |
Definition at line 97 of file weathermanager.h.
| int WeatherManager::GetGameTODHour | ( | ) | [inline] |
Definition at line 93 of file weathermanager.h.
| int WeatherManager::GetGameTODMinute | ( | ) | [inline] |
Definition at line 89 of file weathermanager.h.
| int WeatherManager::GetGameTODMonth | ( | ) | [inline] |
Definition at line 101 of file weathermanager.h.
| int WeatherManager::GetGameTODYear | ( | ) | [inline] |
Definition at line 105 of file weathermanager.h.
| void WeatherManager::HandleWeatherEvent | ( | psWeatherGameEvent * | event | ) |
| void WeatherManager::Initialize | ( | ) |
| void WeatherManager::QueueNextEvent | ( | int | delayticks, |
| int | eventtype, | ||
| int | eventvalue, | ||
| int | duration, | ||
| int | fade, | ||
| const char * | sector, | ||
| psSectorInfo * | si, | ||
| uint | clientnum = 0, |
||
| int | r = 0, |
||
| int | g = 0, |
||
| int | b = 0 |
||
| ) |
| void WeatherManager::SaveGameTime | ( | ) |
| void WeatherManager::SendClientGameTime | ( | int | cnum | ) |
| void WeatherManager::StartGameTime | ( | ) |
Look into the database for the saved time.
This starts the event pushing for the time.
| void WeatherManager::StartWeather | ( | psSectorInfo * | si, |
| unsigned int | type = 0 |
||
| ) |
Starts automatic weather in a sector Allocates new events for snow, rain and fog.
| si | The sector in which we start the automatic weather |
| type | The weather type we will start. The default 0 does it for all. |
| void WeatherManager::StopWeather | ( | psSectorInfo * | si, |
| unsigned int | type = 0 |
||
| ) |
Stops automatic weather in a sector Puts all events from the automatic weather (rain and snow for now) in the sector into the ignored array, removing them from the events array.
| si | The sector in which we stop the automatic weather |
| type | The weather type we will stop. The default 0 does it for all. |
| void WeatherManager::UpdateClient | ( | uint32_t | cnum | ) |
CacheManager* WeatherManager::cacheManager [protected] |
Definition at line 131 of file weathermanager.h.
csArray<psWeatherGameEvent*> WeatherManager::events [protected] |
Definition at line 129 of file weathermanager.h.
CS::Threading::Mutex WeatherManager::eventsMutex [protected] |
Definition at line 128 of file weathermanager.h.
int WeatherManager::gameTimeDay [protected] |
Definition at line 122 of file weathermanager.h.
int WeatherManager::gameTimeHour [protected] |
Definition at line 121 of file weathermanager.h.
int WeatherManager::gameTimeMinute [protected] |
Definition at line 120 of file weathermanager.h.
int WeatherManager::gameTimeMonth [protected] |
Definition at line 123 of file weathermanager.h.
int WeatherManager::gameTimeYear [protected] |
Definition at line 124 of file weathermanager.h.
csArray<psWeatherGameEvent*> WeatherManager::ignored [protected] |
Used for overriding commands like /rain.
Definition at line 126 of file weathermanager.h.
csRandomGen* WeatherManager::randomgen [protected] |
Definition at line 119 of file weathermanager.h.
1.7.3