Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 12, 2011, 7:50:43 PM (13 years ago)
Author:
jo
Message:

Ai and tutorial improvements merged back to the trunk. AI features: all weapons are used, the ai-firestrength is configurable, bots are able to collect pickups . I've set the tutorial level as default level.

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/worldentities/pawns/SpaceShip.cc

    r8858 r8891  
    298298    }
    299299
    300         /**
    301     @brief
    302         Add an Engine to the SpaceShip.
    303     @param engine
    304         A pointer to the Engine to be added.
    305     */
    306300    void SpaceShip::addEngine(orxonox::Engine* engine)
    307301    {
     
    504498    void SpaceShip::resetCamera()
    505499    {
    506         Camera *camera = this->getCamera();
    507         if (camera == 0)
    508         {
    509             orxout(internal_warning) << "Failed to reset camera!" << endl;
    510             return;
    511         }
    512 
    513         this->shakeDt_ = 0.0f;
    514         camera->setPosition(this->cameraOriginalPosition_);
    515         camera->setOrientation(this->cameraOriginalOrientation_);
     500        if(this->hasLocalController() && this->hasHumanController())
     501        {
     502            Camera *camera = this->getCamera();
     503            if (camera == 0)
     504            {
     505                orxout(internal_warning) << "Failed to reset camera!" << endl;
     506                return;
     507            }
     508            this->shakeDt_ = 0.0f;
     509            camera->setPosition(this->cameraOriginalPosition_);
     510            camera->setOrientation(this->cameraOriginalOrientation_);
     511        }
    516512    }
    517513
Note: See TracChangeset for help on using the changeset viewer.