Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3618 in orxonox.OLD for orxonox/trunk/src/world_entities


Ignore:
Timestamp:
Mar 21, 2005, 3:26:26 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: adding TestGun to implement a test gun :) some smaller changes in ghe weapon.h interface. some doxytags for primitive

Location:
orxonox/trunk/src/world_entities
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/player.cc

    r3608 r3618  
    192192void Player::fire()
    193193{
    194   if(this->bFire)
     194  if( this->bFire)
    195195    {
    196196      if(this->activeWeapon != NULL)
    197197        this->activeWeapon->fire();
    198198    }
    199   if(this->bWeaponChange)
     199  if( this->bWeaponChange && this->weapons->getSize() > 1)
    200200    {
    201       Weapon* w = this->weapons->enumerate();
     201      PRINTF(1)("changing the weapon of the player: deactivate old, activate new\n");
     202      this->activeWeapon->deactivate();
     203      this->weapons->enumerate();
    202204      this->activeWeapon = this->weapons->nextElement(this->activeWeapon);
     205      this->activeWeapon->activate();
    203206    }
    204207}
  • orxonox/trunk/src/world_entities/primitive.h

    r3616 r3618  
     1/*!
     2    \primitive.h
     3    \brief representing a primitive body in the world: cube, sphere, cylinder  etc...
     4*/
     5
     6
    17#ifndef _PRIMITIVE_H
    28#define _PRIMITIVE_H
     
    3440  GLUquadricObj* object; //!< the object to be rendered
    3541  Material* material;    //!< A Material for the SkySphere.
    36   pForm form;
    37   char* textureName;
    38   float size;
    39   int segments;
     42  pForm form;            //!< the chooesen form for the entity
     43  char* textureName;     //!< if there is a texture. this is the name for it
     44  float size;            //!< size of the object, from [0..1]
     45  int segments;          //!< segment count
    4046
    4147  void glDrawCube();
  • orxonox/trunk/src/world_entities/projectile.cc

    r3579 r3618  
    1818
    1919#include "projectile.h"
    20 #include "stdincl.h"
     20
    2121#include "world_entity.h"
     22#include "objModel.h"
     23#include "primitive.h"
    2224#include "vector.h"
    23 #include "objModel.h"
    2425
    2526using namespace std;
     
    3132Projectile::Projectile () : WorldEntity()
    3233{
    33   this->model = new OBJModel("");
     34  //this->model = new OBJModel("");
     35  this->projectileModel = new Primitive(P_SPHERE);
    3436}
    3537
  • orxonox/trunk/src/world_entities/projectile.h

    r3583 r3618  
    99#include "world_entity.h"
    1010
     11class Primitive;
    1112
    1213class Projectile : public WorldEntity
     
    2627 private:
    2728  //physical attriutes like: force, speed, acceleration etc.
     29  Primitive* projectileModel;
    2830
    2931};
  • orxonox/trunk/src/world_entities/weapon.h

    r3583 r3618  
    5757  bool isActive(void);
    5858
    59   virtual void setWeaponIdleTime(float time);
    60   virtual float getWeaponIdleTime(void);
    61   virtual bool hasWeaponIdleTimeElapsed(void);
     59  void setWeaponIdleTime(float time);
     60  float getWeaponIdleTime(void);
     61  bool hasWeaponIdleTimeElapsed(void);
    6262
    6363  virtual void fire(void);
Note: See TracChangeset for help on using the changeset viewer.