Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5557 in orxonox.OLD


Ignore:
Timestamp:
Nov 13, 2005, 3:00:18 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: more around the aim-class

Location:
trunk/src/world_entities/weapons
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/weapons/aim.cc

    r5556 r5557  
    4646{
    4747  if (this->material)
    48   delete this->material;
    49 
    50   // delete what has to be deleted here
    51 
    52   GraphicsEngine::showMouse(true);
    53   GraphicsEngine::stealWMEvents(false);
     48    delete this->material;
    5449}
    5550
     
    6863//  this->setBindNode(this);
    6964  this->material = new Material;
    70 
    71   // center the mouse on the screen, and also hide the cursors
    72   SDL_WarpMouse(GraphicsEngine::getInstance()->getResolutionX()/2, GraphicsEngine::getInstance()->getResolutionY()/2);
    73   GraphicsEngine::showMouse(false);
    74   GraphicsEngine::stealWMEvents(true);
    7565}
    7666
  • trunk/src/world_entities/weapons/aim.h

    r5556 r5557  
    99#include "p_node.h"
    1010#include "element_2d.h"
     11
    1112// FORWARD DECLARATION
    1213class Model;
     
    2425  void loadParams(const TiXmlElement* root);
    2526
     27  inline void selectTarget(PNode* target) { this->setParent(target); };
     28  inline PNode* getTarget(PNode* target) { return this->getParent(); };
     29
     30
    2631  void setSize(float size);
    2732  void setTexture(const char* textureFile);
    2833  /** @param rotationSpeed the speed at what the crosshair should rotate */
    29   void setRotationSpeed(float rotationSpeed) { this->rotationSpeed = rotationSpeed; };
     34  inline void setRotationSpeed(float rotationSpeed) { this->rotationSpeed = rotationSpeed; };
    3035
    3136  virtual void tick(float dt);
Note: See TracChangeset for help on using the changeset viewer.