Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7488 in orxonox.OLD


Ignore:
Timestamp:
May 3, 2006, 12:03:47 AM (18 years ago)
Author:
patrick
Message:

orxonox: mission manager less verbose and more secure now

Location:
trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/story_entities/game_world_data.cc

    r7482 r7488  
    352352  /* unload the shaders */
    353353  Shader::suspendShader();
     354
     355  State::setGameRules(NULL);
    354356}
    355357
  • trunk/src/util/game_rules.cc

    r7462 r7488  
    6060  while( element != NULL)
    6161  {
    62     PRINTF(2)("============ MissionGoal\n");
    63     PRINTF(2)("Adding Mission Goal:%s\n", element->Value());
     62    PRINTF(4)("============ MissionGoal\n");
     63    PRINTF(4)("Adding Mission Goal:%s\n", element->Value());
    6464    BaseObject* created = Factory::fabricate(element);
    6565    if (created != NULL /*&& created->isA(CL_GAME_RULES)*/)
  • trunk/src/util/game_rules.h

    r7486 r7488  
    3434    inline void addMissionGoal(MissionGoal* missionGoal) { this->missionList.push_back(missionGoal); }
    3535    /** adding a kill event to the kill list @param kill the kill object containing all infos */
    36     inline void registerKill(const Kill& kill) { this->killList.push_back(kill); }
     36    inline void registerKill(const Kill& kill) { PRINTF(0)("Received Event: Kill\n"); this->killList.push_back(kill); }
    3737
    3838    virtual void onPlayerSpawn() {}
  • trunk/src/util/singleplayer_shootemup.cc

    r7464 r7488  
    107107void SingleplayerShootemup::checkGameRules(float dt)
    108108{
    109   PRINTF(0)("===========| Printing Mission State:\n");
     109//   PRINTF(0)("===========| Printing Mission State:\n");
    110110  for (std::vector<MissionGoal*>::iterator it = this->missionList.begin(); it != this->missionList.end(); it++)
    111111  {
    112112    if( (*it)->checkMissionGoal(dt) != MS_ACCOMPLISHED)
    113113    {
    114       PRINTF(0)("  Mission \"%s\" is not finished yet\n", (*it)->getMissionName().c_str());
     114//       PRINTF(0)("  Mission \"%s\" is not finished yet\n", (*it)->getMissionName().c_str());
    115115    }
    116116  }
  • trunk/src/world_entities/test_entity.cc

    r7198 r7488  
    2121#include "util/loading/factory.h"
    2222#include "util/loading/load_param.h"
     23
     24#include "kill.h"
     25#include "game_rules.h"
    2326
    2427#include "test_entity.h"
     
    99102    this->dieHard();
    100103    this->lastCollided = entity;
     104
     105    if(State::getGameRules())
     106      State::getGameRules()->registerKill(Kill(entity, this));
    101107  }
    102108}
     
    108114  if( this->bDeath)
    109115    return;
     116
    110117  this->bDeath = true;
    111118  float anim;
Note: See TracChangeset for help on using the changeset viewer.