Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/story_entities/game_world.cc @ 8894

Last change on this file since 8894 was 8894, checked in by patrick, 18 years ago

merged the branche single_player_map with the trunk

File size: 17.2 KB
RevLine 
[6352]1/*
2   orxonox - the future of 3D-vertical-scrollers
3
4   Copyright (C) 2004 orx
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2, or (at your option)
9   any later version.
10
11   ### File Specific:
12   main-programmer: Patrick Boenzli
13   co-programmer: Christian Meyer
14   co-programmer: Benjamin Grauer
15*/
16
17#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD
18
[6358]19#include "game_world.h"
[6402]20#include "game_world_data.h"
[6352]21
[7287]22#include "util/loading/resource_manager.h"
[6352]23#include "state.h"
[6404]24#include "class_list.h"
[6352]25
[7193]26#include "util/loading/game_loader.h"
[7919]27#include "util/timer.h"
[6404]28
[6352]29#include "player.h"
30#include "camera.h"
31#include "environment.h"
32#include "terrain.h"
[7287]33#include "test_entity.h"
34#include "terrain.h"
[6404]35#include "playable.h"
[7785]36#include "environments/mapped_water.h"
[6404]37
[6352]38#include "light.h"
[6404]39
[7193]40#include "util/loading/factory.h"
[7368]41#include "util/loading/load_param.h"
[6404]42#include "fast_factory.h"
43#include "shell_command.h"
[6352]44
45#include "graphics_engine.h"
[7810]46#include "effects/atmospheric_engine.h"
[6404]47#include "event_handler.h"
48#include "sound_engine.h"
49#include "cd_engine.h"
50#include "network_manager.h"
[6352]51#include "physics_engine.h"
[7287]52#include "fields.h"
[6352]53
54#include "glmenu_imagescreen.h"
[6404]55#include "shell.h"
[6352]56
57#include "ogg_player.h"
[6404]58#include "shader.h"
[6352]59
[7369]60#include "animation_player.h"
61
[7035]62#include "game_rules.h"
[6352]63
[6404]64using namespace std;
[6352]65
66
[7412]67SHELL_COMMAND(speed, GameWorld, setSpeed) ->describe("set the Speed of the Level");
68SHELL_COMMAND(playmode, GameWorld, setPlaymode)
[7723]69->describe("Set the Playmode of the current Level")
70->completionPlugin(0, OrxShell::CompletorStringArray(Playable::playmodeNames, Playable::PlaymodeCount));
[7412]71
[7739]72SHELL_COMMAND(togglePNodeVisibility, GameWorld, togglePNodeVisibility);
73SHELL_COMMAND(showBVLevel, GameWorld, toggleBVVisibility);
[6352]74
75
76
[6989]77GameWorld::GameWorld()
[6402]78    : StoryEntity()
[6352]79{
[6368]80  this->setClassID(CL_GAME_WORLD, "GameWorld");
81  this->setName("Preloaded World - no name yet");
82
83  this->gameTime = 0.0f;
[6370]84  this->setSpeed(1.0f);
[6368]85  this->shell = NULL;
86
87  this->showPNodes = false;
88  this->showBV = false;
[7739]89  this->showBVLevel = 3;
[6368]90
[6845]91  this->dataXML = NULL;
[7391]92  this->gameRules = NULL;
[6352]93}
94
95/**
[6358]96 *  remove the GameWorld from memory
[6352]97 *
98 *  delete everything explicitly, that isn't contained in the parenting tree!
99 *  things contained in the tree are deleted automaticaly
100 */
[6358]101GameWorld::~GameWorld ()
[6352]102{
[6408]103  PRINTF(4)("Deleted GameWorld\n");
[7283]104
[6352]105}
106
107
108
109/**
[6358]110 * loads the parameters of a GameWorld from an XML-element
[6352]111 * @param root the XML-element to load from
112 */
[6358]113void GameWorld::loadParams(const TiXmlElement* root)
[6352]114{
[6512]115  StoryEntity::loadParams(root);
[6352]116
[6376]117  PRINTF(4)("Loaded GameWorld specific stuff\n");
[6352]118}
119
[6368]120
[6352]121/**
122 * this is executed just before load
123 *
124 * since the load function sometimes needs data, that has been initialized
125 * before the load and after the proceeding storyentity has finished
126*/
[6370]127ErrorMessage GameWorld::init()
[6352]128{
129  /* init the world interface */
[7374]130  this->shell = new OrxShell::Shell();
[6352]131
[6498]132  State::setCurrentStoryEntity(dynamic_cast<StoryEntity*>(this));
[6407]133  this->dataTank->init();
[7369]134
135  /* initialize some engines and graphical elements */
136  AnimationPlayer::getInstance();
137  PhysicsEngine::getInstance();
[8190]138  CREngine::getInstance();
[8408]139
140  State::setScriptManager(&this->scriptManager);
141
[8717]142  return ErrorMessage();
[6352]143}
144
145/**
[6358]146 *  loads the GameWorld by initializing all resources, and set their default values.
[6352]147 */
[6372]148ErrorMessage GameWorld::loadData()
[6352]149{
[8408]150  this->displayLoadScreen();  State::setScriptManager(&this->scriptManager);
[6370]151
[8408]152
[6407]153  PRINTF(0)("Loading the GameWorld\n");
154
[7677]155  PRINTF(3)("> Loading world: '%s'\n", getLoadFile().c_str());
[8717]156//  TiXmlElement* element;
157//  GameLoader* loader = GameLoader::getInstance();
[6352]158
[7221]159  if( getLoadFile().empty())
[6402]160  {
[6634]161    PRINTF(1)("GameWorld has no path specified for loading\n");
[8717]162    return (ErrorMessage(213,"Path not specified","GameWorld::load()"));
[6402]163  }
[6352]164
[7287]165  TiXmlDocument* XMLDoc = new TiXmlDocument( getLoadFile());
[6402]166  // load the xml world file for further loading
[7287]167  if( !XMLDoc->LoadFile())
[6352]168  {
[7287]169    PRINTF(1)("loading XML File: %s @ %s:l%d:c%d\n", XMLDoc->ErrorDesc(), this->getLoadFile().c_str(), XMLDoc->ErrorRow(), XMLDoc->ErrorCol());
170    delete XMLDoc;
[8717]171    return ErrorMessage(213,"XML File parsing error","GameWorld::load()");
[6352]172  }
173  // check basic validity
[7287]174  TiXmlElement* root = XMLDoc->RootElement();
[6352]175  assert( root != NULL);
176  if( root == NULL || root->Value() == NULL || strcmp( root->Value(), "WorldDataFile"))
177  {
[6402]178    // report an error
179    PRINTF(1)("Specified XML File is not an orxonox world data file (WorldDataFile element missing)\n");
[7287]180    delete XMLDoc;
[8717]181    return ErrorMessage(213,"Path not a WorldDataFile","GameWorld::load()");
[6352]182  }
[6402]183  /* the whole loading process for the GameWorld */
[6407]184  this->dataTank->loadData(root);
[6845]185  this->dataXML = (TiXmlElement*)root->Clone();
[6352]186
[8408]187  //remove this after finished testing !!!!
[8711]188  //Object* obj= new Object();
189  //obj->setName("Obj");
190  //Account* a = new Account();
191  //a->setName("a");
192  //Account *b = new Account(30);
193  //b->setName("b");
[8717]194
[8740]195
[8271]196  LoadParamXML(root, "ScriptManager", &this->scriptManager, ScriptManager, loadParams);
197
[7287]198  delete XMLDoc;
[6386]199  this->releaseLoadScreen();
[8717]200
201  return ErrorMessage();
[6352]202}
203
204
205/**
[6387]206 *  unload the data of this GameWorld
207 */
208ErrorMessage GameWorld::unloadData()
209{
[8271]210
[7287]211  PRINTF(3)("GameWorld::~GameWorld() - unloading the current GameWorld\n");
[8271]212  this->scriptManager.flush();
213
[7370]214  delete this->shell;
[6387]215
[6981]216  this->dataTank->unloadData();
217
[7369]218  this->shell = NULL;
219  delete AnimationPlayer::getInstance();
220  delete PhysicsEngine::getInstance();
[8190]221  delete CREngine::getInstance();
[7369]222
[6988]223  State::setCurrentStoryEntity(NULL);
[6845]224  if (this->dataXML)
225    delete this->dataXML;
[8717]226
227  return ErrorMessage();
[6387]228}
229
230
231/**
[6358]232 *  starts the GameWorld
[6352]233 */
[6387]234bool GameWorld::start()
[6352]235{
[7283]236  this->bPaused = false;
237  this->bRunning = true;
[8408]238  State::setScriptManager(&this->scriptManager); //make sure we have the right script manager
[6387]239  this->run();
[8717]240
241  return true;
[6352]242}
243
[6402]244
[6352]245/**
246 *  stops the world.
[6402]247 */
[6387]248bool GameWorld::stop()
[6352]249{
[6358]250  PRINTF(3)("GameWorld::stop() - got stop signal\n");
[8408]251  State::setScriptManager(NULL);
[8717]252  return (this->bRunning = false);
[6352]253}
254
[6402]255
[6352]256/**
[6402]257 *  pauses the game
258 */
[6387]259bool GameWorld::pause()
[6352]260{
[8717]261  return (this->bPaused = true);
[6352]262}
263
[6402]264
[6352]265/**
266 *  ends the pause Phase
[6409]267 */
[6387]268bool GameWorld::resume()
[6352]269{
[8717]270  return(this->bPaused = false);
[6352]271}
272
273
274/**
[6402]275 *  main loop of the world: executing all world relevant function
276 *
277 * in this loop we synchronize (if networked), handle input events, give the heart-beat to
278 * all other member-entities of the world (tick to player, enemies etc.), checking for
279 * collisions drawing everything to the screen.
280 */
281void GameWorld::run()
[6352]282{
[6402]283  PRINTF(3)("GameWorld::mainLoop() - Entering main loop\n");
[6352]284
[7131]285  // initialize Timing
286  this->cycle = 0;
287  for (unsigned int i = 0; i < TICK_SMOOTH_VALUE; i++)
[7919]288    this->frameTimes[i] = 0.01f;
[7131]289  this->dtS = 0.0f;
[7919]290  this->lastFrame = Timer::getNow();
[7131]291
[7304]292  if (this->dataTank->music != NULL)
293    this->dataTank->music->play();
294
[7283]295  while( this->bRunning) /* @todo implement pause */
[6402]296  {
297    /* process intput */
298    this->handleInput ();
[7322]299    if( !this->bRunning)
300      break;
[6386]301
[6402]302    /* network synchronisation */
303    this->synchronize ();
304    /* process time */
305    this->tick ();
[8490]306
[8740]307
[8724]308    /* update the state */
[8740]309    //this->update (); /// LESS REDUNDANCY.
[8894]310//     PNode::getNullParent()->updateNode(this->dtS);
[8724]311
[8740]312
[8190]313    /* collision detection */
314    this->collisionDetection ();
315    /* collision reaction */
316    this->collisionReaction ();
[8490]317
[8724]318    /* check the game rules */
319    this->checkGameRules();
[8740]320
[6402]321    /* update the state */
322    this->update ();
323    /* draw everything */
324    this->display ();
[7306]325
[6402]326  }
327
[7330]328  PRINTF(0)("GameWorld::mainLoop() - Exiting the main loop\n");
[6352]329}
330
331
[7338]332void GameWorld::setPlaymode(Playable::Playmode playmode)
333{
334  if (this->dataTank->localPlayer &&
335      this->dataTank->localPlayer->getPlayable() &&
[7339]336      this->dataTank->localPlayer->getPlayable()->setPlaymode(playmode))
[7338]337  {
[7412]338    PRINTF(3)("Set Playmode to %d:%s\n", playmode, Playable::playmodeToString(playmode).c_str());
[7338]339  }
[7339]340  else
341  {
[7414]342    PRINTF(1)("Unable to set Playmode %d:'%s'\n", playmode, Playable::playmodeToString(playmode).c_str());
[7339]343  }
[7338]344}
345
[7339]346void GameWorld::setPlaymode(const std::string& playmode)
347{
348  this->setPlaymode(Playable::stringToPlaymode(playmode));
349}
[7338]350
[6352]351/**
352 *  synchronize local data with remote data
353*/
[6358]354void GameWorld::synchronize ()
[6402]355{}
[6352]356
357
358/**
359 *  run all input processing
360
361   the command node is the central input event dispatcher. the node uses the even-queue from
362   sdl and has its own event-passing-queue.
363*/
[6358]364void GameWorld::handleInput ()
[6352]365{
366  EventHandler::getInstance()->process();
367}
368
[6402]369
370/**
[7370]371 * @brief ticks a WorldEntity list
[6402]372 * @param entityList list of the WorldEntities
373 * @param dt time passed since last frame
374 */
[7370]375void GameWorld::tick(ObjectManager::EntityList entityList, float dt)
[6352]376{
[7370]377  ObjectManager::EntityList::iterator entity, next;
[6710]378  next = entityList.begin();
379  while (next != entityList.end())
380  {
381    entity = next++;
[6352]382    (*entity)->tick(dt);
[6710]383  }
[6352]384}
385
[7131]386
[6352]387/**
388 *  advance the timeline
[6402]389 *
390 * this calculates the time used to process one frame (with all input handling, drawing, etc)
391 * the time is mesured in ms and passed to all world-entities and other classes that need
392 * a heart-beat.
393 */
[6358]394void GameWorld::tick ()
[6352]395{
[7283]396  if( !this->bPaused)
[6402]397  {
[7131]398    // CALCULATE FRAMERATE
399    Uint32 frameTimesIndex;
400    Uint32 i;
[7919]401    double currentFrame = Timer::getNow();
[6402]402
[7131]403    frameTimesIndex = this->cycle % TICK_SMOOTH_VALUE;
[7919]404    this->frameTimes[frameTimesIndex] = currentFrame - this->lastFrame;
405    this->lastFrame = currentFrame;
[7132]406    ++this->cycle;
[7919]407    this->dtS = 0.0;
[7132]408    for (i = 0; i < TICK_SMOOTH_VALUE; i++)
[7131]409      this->dtS += this->frameTimes[i];
[7919]410    this->dtS = this->dtS / TICK_SMOOTH_VALUE * speed;
[6352]411
[7131]412    // TICK everything
[7370]413    for (i = 0; i < this->dataTank->tickLists.size(); ++i)
414      this->tick(this->dataTank->objectManager->getObjectList(this->dataTank->tickLists[i]), this->dtS);
[6352]415
[6402]416    /* update tick the rest */
[6407]417    this->dataTank->localCamera->tick(this->dtS);
[6402]418    AnimationPlayer::getInstance()->tick(this->dtS);
419    PhysicsEngine::getInstance()->tick(this->dtS);
[6352]420
[6402]421    GraphicsEngine::getInstance()->tick(this->dtS);
[7810]422    AtmosphericEngine::getInstance()->tick(this->dtS);
[7035]423
424    if( likely(this->dataTank->gameRule != NULL))
425      this->dataTank->gameRule->tick(this->dtS);
[8717]426
[6402]427  }
[6352]428}
429
430
431/**
432 *  this function gives the world a consistant state
[6402]433 *
434 * after ticking (updating the world state) this will give a constistant
435 * state to the whole system.
436 */
[6358]437void GameWorld::update()
[6352]438{
439  PNode::getNullParent()->updateNode (this->dtS);
[7460]440  OrxSound::SoundEngine::getInstance()->update();
[8740]441
442  this->applyCameraSettings();
[7871]443  GraphicsEngine::getInstance()->update(this->dtS);
[6352]444}
445
446
[6402]447/**
448 * kicks the CDEngine to detect the collisions between the object groups in the world
449 */
[8190]450void GameWorld::collisionDetection()
[6352]451{
[8490]452  // object-object collision detection
[6407]453  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_00),
[7004]454      this->dataTank->objectManager->getObjectList(OM_GROUP_01_PROJ));
[6407]455  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_01),
[7004]456      this->dataTank->objectManager->getObjectList(OM_GROUP_00_PROJ));
[7078]457  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_00),
[7288]458      this->dataTank->objectManager->getObjectList(OM_GROUP_01));
[6433]459
[7083]460  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_00),
461      this->dataTank->objectManager->getObjectList(OM_COMMON));
[6433]462  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_01),
[6407]463      this->dataTank->objectManager->getObjectList(OM_COMMON));
[7083]464
[8490]465  // ground collision detection: BSP Model
466  CDEngine::getInstance()->checkCollisionGround(this->dataTank->objectManager->getObjectList(OM_GROUP_00));
467  CDEngine::getInstance()->checkCollisionGround(this->dataTank->objectManager->getObjectList(OM_GROUP_01));
[6352]468}
469
[7391]470
[8190]471void GameWorld::collisionReaction()
472{
473  CREngine::getInstance()->handleCollisions();
474}
475
476
[6352]477/**
[7391]478 *  check the game rules: winning conditions, etc.
479 *
480 */
481void GameWorld::checkGameRules()
482{
483  if( this->gameRules)
484    this->gameRules->tick(this->dtS);
485}
486
487
488/**
[6352]489 *  render the current frame
[6402]490 *
491 * clear all buffers and draw the world
492 */
[6358]493void GameWorld::display ()
[6352]494{
[7785]495  // render the reflection texture
496  this->renderPassReflection();
497  // redner the refraction texture
498  this->renderPassRefraction();
499  // render all
500  this->renderPassAll();
501
[6352]502  // flip buffers
503  GraphicsEngine::swapBuffers();
504}
505
506
507/**
[7370]508 * @brief draws all entities in the list drawList
509 * @param drawList the List of entities to draw.
[6352]510 */
[7370]511void GameWorld::drawEntityList(const ObjectManager::EntityList& drawList) const
512{
513  ObjectManager::EntityList::const_iterator entity;
514  for (entity = drawList.begin(); entity != drawList.end(); entity++)
515    if ((*entity)->isVisible())
516      (*entity)->draw();
517}
518
[7785]519
[8740]520void GameWorld::applyCameraSettings()
521{
522  this->dataTank->localCamera->apply ();
523  this->dataTank->localCamera->project ();
524  GraphicsEngine::storeMatrices();
525}
[7785]526
[8740]527
528
[7370]529/**
[7785]530 * reflection rendering for water surfaces
[7370]531 */
[7785]532void GameWorld::renderPassReflection()
[6352]533{
[7785]534    // clear buffer
535  glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
[8740]536//  glLoadIdentity();
[7785]537
538  const std::list<BaseObject*>* reflectedWaters;
539  MappedWater* mw;
540
541  if( (reflectedWaters = ClassList::getList(CL_MAPPED_WATER)) != NULL)
542  {
543    std::list<BaseObject*>::const_iterator it;
544    for (it = reflectedWaters->begin(); it != reflectedWaters->end(); it++)
545    {
546      mw =  dynamic_cast<MappedWater*>(*it);
547
548      //camera and light
[8740]549      //this->dataTank->localCamera->apply ();
550      //this->dataTank->localCamera->project ();
[8312]551
[7785]552      LightManager::getInstance()->draw();
[8312]553
554
555      // prepare for reflection rendering
556      mw->activateReflection();
557
[7785]558      // draw everything to be included in the reflection
[8037]559      this->drawEntityList(State::getObjectManager()->getReflectionList());
560//       for (unsigned int i = 0; i < this->dataTank->drawLists.size(); ++i)
561//         this->drawEntityList(State::getObjectManager()->getObjectList(this->dataTank->drawLists[i]));
[7785]562
563      // clean up from reflection rendering
564      mw->deactivateReflection();
565    }
566  }
567
568}
569
570
571/**
572 *  refraction rendering for water surfaces
573 */
574void GameWorld::renderPassRefraction()
[8037]575{
576    // clear buffer
577  glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
[8740]578  //glLoadIdentity();
[7785]579
[8037]580  const std::list<BaseObject*>* reflectedWaters;
581  MappedWater* mw;
582
583  if( (reflectedWaters = ClassList::getList(CL_MAPPED_WATER)) != NULL)
584  {
585    std::list<BaseObject*>::const_iterator it;
586    for (it = reflectedWaters->begin(); it != reflectedWaters->end(); it++)
587    {
588      mw =  dynamic_cast<MappedWater*>(*it);
589
[8312]590      //camera and light
[8740]591      //this->dataTank->localCamera->apply ();
592      //this->dataTank->localCamera->project ();
[8037]593      // prepare for reflection rendering
594      mw->activateRefraction();
595
[8312]596
[8037]597      LightManager::getInstance()->draw();
598      // draw everything to be included in the reflection
599      this->drawEntityList(State::getObjectManager()->getReflectionList());
600//       for (unsigned int i = 0; i < this->dataTank->drawLists.size(); ++i)
601//         this->drawEntityList(State::getObjectManager()->getObjectList(this->dataTank->drawLists[i]));
602
603      // clean up from reflection rendering
604      mw->deactivateRefraction();
605    }
606  }
607}
608
609
[7785]610/**
611 *  this render pass renders the whole wolrd
612 */
613void GameWorld::renderPassAll()
614{
615  // clear buffer
616  glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
[6352]617  GraphicsEngine* engine = GraphicsEngine::getInstance();
[6402]618
[7919]619
[8740]620  // glEnable(GL_DEPTH_TEST);
621  // glEnable(GL_LIGHTING);
[7919]622
[8740]623  // set Lighting
[7108]624  LightManager::getInstance()->draw();
[6416]625
[8740]626  /* Draw the BackGround */
[7840]627  this->drawEntityList(State::getObjectManager()->getObjectList(OM_BACKGROUND));
628  engine->drawBackgroundElements();
629
[6416]630  /* draw all WorldEntiy groups */
[7370]631  for (unsigned int i = 0; i < this->dataTank->drawLists.size(); ++i)
[7723]632    this->drawEntityList(State::getObjectManager()->getObjectList(this->dataTank->drawLists[i]));
[6416]633
[8255]634  AtmosphericEngine::getInstance()->draw();
[8408]635
[6402]636  if( unlikely( this->showBV))
637  {
638    CDEngine* engine = CDEngine::getInstance();
[7370]639    for (unsigned int i = 0; i < this->dataTank->drawLists.size(); ++i)
[7739]640      engine->drawBV(State::getObjectManager()->getObjectList(this->dataTank->drawLists[i]), this->showBVLevel);
[6402]641  }
[6416]642
[6402]643  if( unlikely(this->showPNodes))
644    PNode::getNullParent()->debugDraw(0);
645
[6780]646  engine->draw();
[7035]647
648  // draw the game ruls
649  if( likely(this->dataTank->gameRule != NULL))
650    this->dataTank->gameRule->draw();
[6352]651}
652
[7785]653
[6352]654/**
[6402]655 *  shows the loading screen
656 */
657void GameWorld::displayLoadScreen ()
[6387]658{
[6402]659  PRINTF(3)("GameWorld::displayLoadScreen - start\n");
[6407]660  this->dataTank->glmis = new GLMenuImageScreen();
661  this->dataTank->glmis->setMaximum(8);
[6402]662  PRINTF(3)("GameWorld::displayLoadScreen - end\n");
[6387]663}
664
665
[6402]666/**
667 *  removes the loadscreen, and changes over to the game
668 */
669void GameWorld::releaseLoadScreen ()
[6387]670{
[6402]671  PRINTF(3)("GameWorld::releaseLoadScreen - start\n");
[6407]672  this->dataTank->glmis->setValue(this->dataTank->glmis->getMaximum());
[6402]673  PRINTF(3)("GameWorld::releaseLoadScreen - end\n");
[6387]674}
675
[7004]676
677
678/**
679 * @brief toggles the PNode visibility in the world (drawn as boxes)
680 */
681void GameWorld::togglePNodeVisibility()
682{
[7723]683  this->showPNodes = !this->showPNodes;
[7004]684};
685
686
687/**
688 * @brief toggles the bounding volume (BV) visibility
689*/
[7739]690void GameWorld::toggleBVVisibility(int level)
[7004]691{
[7739]692  if( level < 1)
693    this->showBV = false;
694  else
695  {
696    this->showBV = true;
697    this->showBVLevel = level;
698  }
699
[7004]700};
701
Note: See TracBrowser for help on using the repository browser.