Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 9, 2008, 4:25:52 AM (16 years ago)
Author:
landauf
Message:

merged core3 back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/objects/SpaceShip.cc

    r1735 r1747  
    3737#include "util/Convert.h"
    3838#include "util/Math.h"
    39 
     39#include "util/Debug.h"
    4040#include "core/CoreIncludes.h"
    4141#include "core/ConfigValueIncludes.h"
    42 #include "core/Debug.h"
     42#include "core/Iterator.h"
     43#include "core/input/InputManager.h"
    4344#include "core/XMLPort.h"
    4445#include "core/ConsoleCommand.h"
    45 #include "network/Host.h"
    46 
    4746#include "tools/ParticleInterface.h"
    48 
    49 #include "GraphicsEngine.h"
     47#include "network/Client.h"
     48#include "Backlight.h"
     49#include "CameraHandler.h"
     50#include "ParticleSpawner.h"
    5051#include "RotatingProjectile.h"
    5152#include "ParticleProjectile.h"
    52 #include "ParticleSpawner.h"
    53 #include "Backlight.h"
    54 #include "CameraHandler.h"
     53#include "GraphicsEngine.h"
    5554
    5655namespace orxonox
    5756{
    58     SetConsoleCommand(SpaceShip, setMaxSpeedTest, false).setAccessLevel(AccessLevel::Debug);
    59     SetConsoleCommand(SpaceShip, whereAmI, true).setAccessLevel(AccessLevel::User);
    60     SetConsoleCommand(SpaceShip, moveLongitudinal, true).setAccessLevel(AccessLevel::User).setDefaultValue(0, 1.0f).setAxisParamIndex(0).setKeybindMode(KeybindMode::OnHold);
    61     SetConsoleCommand(SpaceShip, moveLateral, true).setAccessLevel(AccessLevel::User).setDefaultValue(0, 1.0f).setAxisParamIndex(0).setKeybindMode(KeybindMode::OnHold);
    62     SetConsoleCommand(SpaceShip, moveYaw, true).setAccessLevel(AccessLevel::User).setDefaultValue(0, 1.0f).setAxisParamIndex(0).setKeybindMode(KeybindMode::OnHold);
    63     SetConsoleCommand(SpaceShip, movePitch, true).setAccessLevel(AccessLevel::User).setDefaultValue(0, 1.0f).setAxisParamIndex(0).setKeybindMode(KeybindMode::OnHold);
    64     SetConsoleCommand(SpaceShip, moveRoll, true).setAccessLevel(AccessLevel::User).setDefaultValue(0, 1.0f).setAxisParamIndex(0).setKeybindMode(KeybindMode::OnHold);
    65     SetConsoleCommand(SpaceShip, fire, true).setAccessLevel(AccessLevel::User).setKeybindMode(KeybindMode::OnHold);
    66     SetConsoleCommandGeneric(test1, SpaceShip, createConsoleCommand(createFunctor(&SpaceShip::setMaxSpeedTest), "setMaxSpeed"), false).setAccessLevel(AccessLevel::Debug);
    67     SetConsoleCommandGeneric(test2, SpaceShip, createConsoleCommand(createFunctor(&SpaceShip::setMaxSpeedTest), "setMaxBlubber"), false).setAccessLevel(AccessLevel::Debug);
    68     SetConsoleCommandGeneric(test3, SpaceShip, createConsoleCommand(createFunctor(&SpaceShip::setMaxSpeedTest), "setRofl"), false).setAccessLevel(AccessLevel::Debug);
     57    SetConsoleCommand(SpaceShip, setMaxSpeedTest, false).accessLevel(AccessLevel::Debug);
     58    SetConsoleCommand(SpaceShip, whereAmI, true).accessLevel(AccessLevel::User);
     59    SetConsoleCommand(SpaceShip, moveLongitudinal, true).accessLevel(AccessLevel::User).defaultValue(0, 1.0f).axisParamIndex(0).keybindMode(KeybindMode::OnHold);
     60    SetConsoleCommand(SpaceShip, moveLateral, true).accessLevel(AccessLevel::User).defaultValue(0, 1.0f).axisParamIndex(0).keybindMode(KeybindMode::OnHold);
     61    SetConsoleCommand(SpaceShip, moveYaw, true).accessLevel(AccessLevel::User).defaultValue(0, 1.0f).axisParamIndex(0).keybindMode(KeybindMode::OnHold);
     62    SetConsoleCommand(SpaceShip, movePitch, true).accessLevel(AccessLevel::User).defaultValue(0, 1.0f).axisParamIndex(0).keybindMode(KeybindMode::OnHold);
     63    SetConsoleCommand(SpaceShip, moveRoll, true).accessLevel(AccessLevel::User).defaultValue(0, 1.0f).axisParamIndex(0).keybindMode(KeybindMode::OnHold);
     64    SetConsoleCommand(SpaceShip, fire, true).accessLevel(AccessLevel::User).keybindMode(KeybindMode::OnHold);
     65    SetConsoleCommandAliasMulti(SpaceShip, setMaxSpeedTest, "setMaxSpeed", 1, false).accessLevel(AccessLevel::Debug);
     66    SetConsoleCommandAliasMulti(SpaceShip, setMaxSpeedTest, "setMaxBlubber", 2, false).accessLevel(AccessLevel::Debug);
     67    SetConsoleCommandAliasMulti(SpaceShip, setMaxSpeedTest, "setRofl", 3, false).accessLevel(AccessLevel::Debug);
    6968
    7069    CreateFactory(SpaceShip);
     
    7473
    7574    SpaceShip *SpaceShip::getLocalShip(){
    76       Iterator<SpaceShip> it;
    77       for(it = ObjectList<SpaceShip>::start(); it; ++it){
     75      ObjectList<SpaceShip>::iterator it;
     76      for(it = ObjectList<SpaceShip>::begin(); it; ++it){
    7877        if( (it)->myShip_ )
    7978          return *it;
     
    289288    void SpaceShip::changedVisibility()
    290289    {
    291         Model::changedVisibility();
     290        SUPER(SpaceShip, changedVisibility);
    292291
    293292        this->tt1_->setEnabled(this->isVisible());
     
    306305    void SpaceShip::changedActivity()
    307306    {
    308         Model::changedActivity();
     307        SUPER(SpaceShip, changedActivity);
    309308
    310309        this->tt1_->setEnabled(this->isVisible());
     
    392391    void SpaceShip::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    393392    {
    394         Model::XMLPort(xmlelement, mode);
    395 
    396         XMLPortParamLoadOnly(SpaceShip, "camera", setCamera, xmlelement, mode);
    397         XMLPortParamLoadOnly(SpaceShip, "maxSpeed", setMaxSpeed, xmlelement, mode);
    398         XMLPortParamLoadOnly(SpaceShip, "maxSideAndBackSpeed", setMaxSideAndBackSpeed, xmlelement, mode);
    399         XMLPortParamLoadOnly(SpaceShip, "maxRotation", setMaxRotation, xmlelement, mode);
    400         XMLPortParamLoadOnly(SpaceShip, "transAcc", setTransAcc, xmlelement, mode);
    401         XMLPortParamLoadOnly(SpaceShip, "rotAcc", setRotAcc, xmlelement, mode);
    402         XMLPortParamLoadOnly(SpaceShip, "transDamp", setTransDamp, xmlelement, mode);
    403         XMLPortParamLoadOnly(SpaceShip, "rotDamp", setRotDamp, xmlelement, mode);
     393        SUPER(SpaceShip, XMLPort, xmlelement, mode);
     394
     395        XMLPortParam(SpaceShip, "camera", setCamera, getCamera, xmlelement, mode);
     396        XMLPortParam(SpaceShip, "maxSpeed", setMaxSpeed, getMaxSpeed, xmlelement, mode);
     397        XMLPortParam(SpaceShip, "maxSideAndBackSpeed", setMaxSideAndBackSpeed, getMaxSideAndBackSpeed, xmlelement, mode);
     398        XMLPortParam(SpaceShip, "maxRotation", setMaxRotation, getMaxRotation, xmlelement, mode);
     399        XMLPortParam(SpaceShip, "transAcc", setTransAcc, getTransAcc, xmlelement, mode);
     400        XMLPortParam(SpaceShip, "rotAcc", setRotAcc, getRotAcc, xmlelement, mode);
     401        XMLPortParam(SpaceShip, "transDamp", setTransDamp, getTransDamp, xmlelement, mode);
     402        XMLPortParam(SpaceShip, "rotDamp", setRotDamp, getRotDamp, xmlelement, mode);
    404403
    405404        myShip_=true; //TODO: this is a hack
     
    535534
    536535
    537         WorldEntity::tick(dt);
     536        SUPER(SpaceShip, tick, dt);
    538537
    539538        this->roll(this->mouseXRotation_ * dt);
Note: See TracChangeset for help on using the changeset viewer.