Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 20, 2010, 9:43:45 PM (14 years ago)
Author:
dafrick
Message:

No more seg-faults when restarting a game, quests still not working properly the second thime, though.
Also replaced QuestListener mode 'receive' with 'start' in quest_test, which appears to be the correct term.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation3/src/modules/questsystem/notifications/NotificationQueue.cc

    r6502 r6944  
    5656    NotificationQueue::NotificationQueue(BaseObject* creator) : OverlayGroup(creator)
    5757    {
     58        this->registered_ = false;
     59       
    5860        RegisterObject(NotificationQueue);
    5961        this->initialize();
     
    6870        this->targets_.clear();
    6971        this->clear();
     72
     73        if(this->registered_)
     74            NotificationManager::getInstance().unregisterListener(this);
    7075    }
    7176
     
    8186
    8287        NotificationManager::getInstance().registerListener(this);
     88        this->registered_ = true;
    8389    }
    8490
     
    423429            return false;
    424430
     431        NotificationManager::getInstance().unregisterNotification(container->notification, this);
     432       
    425433        this->removeElement(container->overlay);
    426434        this->containers_.erase(container);
     
    443451        {
    444452            this->removeContainer(*it);
    445             it = this->containers_.begin(); //TODO: Needed?
     453            it = this->containers_.begin();
    446454        }
    447455    }
Note: See TracChangeset for help on using the changeset viewer.