mirror of
https://github.com/glest/glest-source.git
synced 2025-09-02 20:42:34 +02:00
- added proper constructor to init pointers to NULL in case or early game load problems to avoid a crash
This commit is contained in:
@@ -43,6 +43,18 @@ namespace Glest{ namespace Game{
|
|||||||
|
|
||||||
// ===================== PUBLIC ========================
|
// ===================== PUBLIC ========================
|
||||||
|
|
||||||
|
UnitUpdater::UnitUpdater() {
|
||||||
|
this->game= NULL;
|
||||||
|
this->gui= NULL;
|
||||||
|
this->gameCamera= NULL;
|
||||||
|
this->world= NULL;
|
||||||
|
this->map= NULL;
|
||||||
|
this->console= NULL;
|
||||||
|
this->scriptManager= NULL;
|
||||||
|
this->routePlanner = NULL;
|
||||||
|
this->pathFinder = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
void UnitUpdater::init(Game *game){
|
void UnitUpdater::init(Game *game){
|
||||||
|
|
||||||
this->game= game;
|
this->game= game;
|
||||||
|
@@ -60,6 +60,7 @@ private:
|
|||||||
RandomGen random;
|
RandomGen random;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
UnitUpdater();
|
||||||
void init(Game *game);
|
void init(Game *game);
|
||||||
~UnitUpdater();
|
~UnitUpdater();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user