Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 12290 for code/trunk/src


Ignore:
Timestamp:
Apr 11, 2019, 2:05:59 PM (6 years ago)
Author:
wiesep
Message:

Rolled back to r12201

Location:
code/trunk/src/modules
Files:
3 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/hover/Hover.cc

    r11495 r12290  
    5353
    5454        this->setHUDTemplate("HoverHUD");
     55
    5556    }
    5657
     
    112113        }
    113114        numberOfFlags_ = flags_.size();
     115
    114116    }
    115117}
  • code/trunk/src/modules/hover/HoverShip.cc

    r11495 r12290  
    3333#include "core/CoreIncludes.h"
    3434#include "core/XMLPort.h"
     35#include "graphics/Camera.h"
    3536
    3637#include <BulletCollision/NarrowPhaseCollision/btManifoldPoint.h>
     
    4546        enableCollisionCallback();
    4647        isFloor_ = false;
    47         jumpBoost_ = 0;
     48        jumpBoost_ = 0;   
    4849    }
    4950
    5051    void HoverShip::moveFrontBack(const Vector2& value)
    51         { this->steering_.z -= value.x; }
     52        { this->steering_.z -= value.x;
     53            Vector3 currentPosition = this->getPosition();
     54            currentPosition.y -= 2*value.y;
     55            this->setPosition(currentPosition);
     56        }
    5257
    5358    void HoverShip::moveRightLeft(const Vector2& value)
    54         { this->steering_.x += value.x; }
     59        {
     60            this->steering_.x += value.x;
     61            Vector3 currentPosition = this->getPosition();
     62            currentPosition.x -= 2*value.x;
     63            this->setPosition(currentPosition);
     64        }
    5565
    5666    void HoverShip::moveUpDown(const Vector2& value)
    57         { this->steering_.y += value.x; }
     67        {
     68            this->steering_.y += value.x;
     69            this->setPosition(Vector3(0, 0, 0));
     70        }
    5871
    5972    void HoverShip::rotateYaw(const Vector2& value)
     
    6982
    7083        XMLPortParam(HoverShip, "jumpBoost", setJumpBoost, getJumpBoost, xmlelement, mode);
     84    }
     85
     86    void HoverShip::tick(float dt)
     87    {
     88        SUPER(HoverShip, tick, dt);
     89                //Execute movement
     90        if (this->hasLocalController())
     91            {
     92             // Camera
     93            Camera* camera = this->getCamera();
     94            if (camera != nullptr)
     95            {
     96                camera->setPosition(0,1000,0);
     97                camera->setOrientation(Vector3::UNIT_X, Degree(-90));
     98
     99            }
     100        }
    71101    }
    72102
  • code/trunk/src/modules/hover/HoverShip.h

    r11495 r12290  
    6969            virtual void boost(bool bBoost) override;
    7070
     71            virtual void tick(float dt) override;
     72
    7173        private:
    7274            float jumpBoost_;
  • code/trunk/src/modules/pacman/CMakeLists.txt

    r12289 r12290  
    66  PacmanPointAfraid.cc
    77  PacmanHUDinfo.cc
    8   getShortestPath.cc
    9 
    108)
    119
  • code/trunk/src/modules/pacman/PacmanGhost.h

    r12289 r12290  
    5858            bool dontmove = false;
    5959
    60 
    6160        private:
    6261            int decision = 0;
Note: See TracChangeset for help on using the changeset viewer.