Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 14, 2008, 3:42:49 AM (16 years ago)
Author:
landauf
Message:

merged core2 back to trunk
there might be some errors, wasn't able to test it yet due to some strange g++ and linker behaviour.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/objects/SpaceShip.cc

    r1039 r1052  
    4141#include "util/Math.h"
    4242#include "core/CoreIncludes.h"
     43#include "core/ConfigValueIncludes.h"
    4344#include "core/Debug.h"
    4445#include "GraphicsEngine.h"
     
    4748#include "Projectile.h"
    4849#include "core/XMLPort.h"
     50#include "core/ConsoleCommand.h"
    4951
    5052namespace orxonox
    5153{
     54    ConsoleCommand(SpaceShip, setMaxSpeedTest, AccessLevel::Debug, false);
     55    ConsoleCommandGeneric(test1, SpaceShip, createExecutor(createFunctor(&SpaceShip::setMaxSpeedTest), "setMaxSpeed", AccessLevel::Debug), false);
     56    ConsoleCommandGeneric(test2, SpaceShip, createExecutor(createFunctor(&SpaceShip::setMaxSpeedTest), "setMaxBlubber", AccessLevel::Debug), false);
     57    ConsoleCommandGeneric(test3, SpaceShip, createExecutor(createFunctor(&SpaceShip::setMaxSpeedTest), "setRofl", AccessLevel::Debug), false);
     58
    5259    CreateFactory(SpaceShip);
     60
     61    SpaceShip* SpaceShip::instance_s;
    5362
    5463    SpaceShip::SpaceShip()
     
    5665        RegisterObject(SpaceShip);
    5766        this->registerAllVariables();
     67
     68        SpaceShip::instance_s = this;
    5869
    5970        this->setConfigValues();
     
    309320        @return The XML-element
    310321    */
    311     void SpaceShip::XMLPort(Element& xmlelement, bool loading)
    312     {
    313         Model::XMLPort(xmlelement, loading);
    314 
    315         XMLPortParamLoadOnly(SpaceShip, "camera", setCamera, xmlelement, loading);
    316         XMLPortParamLoadOnly(SpaceShip, "maxSpeed", setMaxSpeed, xmlelement, loading);
    317         XMLPortParamLoadOnly(SpaceShip, "maxSideAndBackSpeed", setMaxSideAndBackSpeed, xmlelement, loading);
    318         XMLPortParamLoadOnly(SpaceShip, "maxRotation", setMaxRotation, xmlelement, loading);
    319         XMLPortParamLoadOnly(SpaceShip, "transAcc", setTransAcc, xmlelement, loading);
    320         XMLPortParamLoadOnly(SpaceShip, "rotAcc", setRotAcc, xmlelement, loading);
    321         XMLPortParamLoadOnly(SpaceShip, "transDamp", setTransDamp, xmlelement, loading);
    322         XMLPortParamLoadOnly(SpaceShip, "rotDamp", setRotDamp, xmlelement, loading);
     322    void SpaceShip::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     323    {
     324        Model::XMLPort(xmlelement, mode);
     325
     326        XMLPortParamLoadOnly(SpaceShip, "camera", setCamera, xmlelement, mode);
     327        XMLPortParamLoadOnly(SpaceShip, "maxSpeed", setMaxSpeed, xmlelement, mode);
     328        XMLPortParamLoadOnly(SpaceShip, "maxSideAndBackSpeed", setMaxSideAndBackSpeed, xmlelement, mode);
     329        XMLPortParamLoadOnly(SpaceShip, "maxRotation", setMaxRotation, xmlelement, mode);
     330        XMLPortParamLoadOnly(SpaceShip, "transAcc", setTransAcc, xmlelement, mode);
     331        XMLPortParamLoadOnly(SpaceShip, "rotAcc", setRotAcc, xmlelement, mode);
     332        XMLPortParamLoadOnly(SpaceShip, "transDamp", setTransDamp, xmlelement, mode);
     333        XMLPortParamLoadOnly(SpaceShip, "rotDamp", setRotDamp, xmlelement, mode);
    323334    }
    324335
Note: See TracChangeset for help on using the changeset viewer.