Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7079 for code/branches


Ignore:
Timestamp:
Jun 2, 2010, 1:58:37 AM (14 years ago)
Author:
landauf
Message:

fixed a bug in NewHumanController - Ogre::any_cast can fail after raytracing (occurred in fps levels when looking at the floor - maybe someone can check why this happens)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation3/src/orxonox/controllers/NewHumanController.cc

    r7075 r7079  
    378378            {
    379379                // Try to cast the user pointer
    380                 WorldEntity* wePtr = dynamic_cast<WorldEntity*>(Ogre::any_cast<OrxonoxClass*>(itr->movable->getUserAny()));
     380                WorldEntity* wePtr;
     381                try
     382                {
     383                    wePtr = dynamic_cast<WorldEntity*>(Ogre::any_cast<OrxonoxClass*>(itr->movable->getUserAny()));
     384                }
     385                catch (...)
     386                {
     387                    continue;
     388                }
    381389
    382390                // make sure we don't shoot ourselves
Note: See TracChangeset for help on using the changeset viewer.