Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3578 in orxonox.OLD


Ignore:
Timestamp:
Mar 16, 2005, 5:53:20 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: working on projectile, functions and doxy, modified the hit(…) function from world_entity

Location:
orxonox/trunk/src/world_entities
Files:
12 edited

Legend:

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

    r3566 r3578  
    4141void Environment::tick (float time) {}
    4242
    43 void Environment::hit (WorldEntity* weapon, Vector loc) {}
     43void Environment::hit (WorldEntity* weapon, Vector* loc) {}
    4444
    4545void Environment::destroy () {}
  • orxonox/trunk/src/world_entities/environment.h

    r3573 r3578  
    1515 
    1616  virtual void tick (float time);
    17   virtual void hit (WorldEntity* weapon, Vector loc);
     17  virtual void hit (WorldEntity* weapon, Vector* loc);
    1818  virtual void destroy ();
    1919  virtual void collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags);
  • orxonox/trunk/src/world_entities/player.cc

    r3566 r3578  
    6868   \param loc ??
    6969*/
    70 void Player::hit (WorldEntity* weapon, Vector loc)
     70void Player::hit (WorldEntity* weapon, Vector* loc)
    7171{
    7272}
  • orxonox/trunk/src/world_entities/player.h

    r3544 r3578  
    2222  virtual void postSpawn();
    2323  virtual void tick(float time);
    24   virtual void hit(WorldEntity* weapon, Vector loc);
     24  virtual void hit(WorldEntity* weapon, Vector* loc);
    2525  virtual void collide(WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags);
    2626  virtual void command(Command* cmd);
  • orxonox/trunk/src/world_entities/primitive.cc

    r3566 r3578  
    4646}
    4747
    48 void Primitive::hit (WorldEntity* weapon, Vector loc) {}
     48void Primitive::hit (WorldEntity* weapon, Vector* loc) {}
    4949
    5050
  • orxonox/trunk/src/world_entities/primitive.h

    r3544 r3578  
    1515
    1616  virtual void tick (float time);
    17   virtual void hit (WorldEntity* weapon, Vector loc);
     17  virtual void hit (WorldEntity* weapon, Vector* loc);
    1818  virtual void collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags);
    1919  virtual void draw ();
  • orxonox/trunk/src/world_entities/projectile.cc

    r3574 r3578  
    2626
    2727
    28 
     28/**
     29   \brief standard constructor
     30*/
    2931Projectile::Projectile () : WorldEntity()
    3032{
     
    3335
    3436
    35 
     37/**
     38   \brief standard deconstructor
     39*/
    3640Projectile::~Projectile ()
    3741{
     
    3943}
    4044
     45
     46/**
     47   \brief signal tick, time dependent things will be handled here
     48   \param time since last tick
     49*/
    4150void Projectile::tick (float time)
    4251{}
    4352
    44 void Projectile::hit (WorldEntity* weapon, Vector loc)
     53/**
     54   \brief the projectile gets hit by another entity
     55   \param the other entity
     56   \param place where it is hit
     57*/
     58void Projectile::hit (WorldEntity* entity, Vector* place)
    4559{}
    4660
     61
     62/**
     63   \brief the function gets called, when the projectile is destroyed
     64*/
    4765void Projectile::destroy ()
    4866{}
    4967
    50 void Projectile::collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags)
    51 {}
    5268
    5369void Projectile::draw ()
  • orxonox/trunk/src/world_entities/projectile.h

    r3573 r3578  
    1818  virtual ~Projectile ();
    1919
    20  
     20  virtual void hit (WorldEntity* weapon, Vector* loc);
     21  virtual void destroy ();
     22
    2123  virtual void tick (float time);
    22   virtual void hit (WorldEntity* weapon, Vector loc);
    23   virtual void destroy ();
    24   virtual void collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags);
    2524  virtual void draw ();
    2625
     26 private:
     27  int health;                        //<! the healt of a projectile
     28  int maxHelath;                     //<! the max healt of a projectile
     29  int damageToAirCraft;              //<! damage dealt to a air craft
     30  int damageToGroundCraft;           //<! damage dealt to a ground craft
    2731};
    2832
  • orxonox/trunk/src/world_entities/weapon.cc

    r3577 r3578  
    189189   can destroy the weapons of enemies or vice versa.
    190190*/
    191 void Weapon::hit (WorldEntity* entity, Vector position)
     191void Weapon::hit (WorldEntity* entity, Vector* position)
    192192{}
    193193
  • orxonox/trunk/src/world_entities/weapon.h

    r3577 r3578  
    5353
    5454  void fire();
    55   virtual void hit (WorldEntity* weapon, Vector loc);
     55  virtual void hit (WorldEntity* weapon, Vector* loc);
    5656  virtual void destroy ();
    5757 
  • orxonox/trunk/src/world_entities/world_entity.cc

    r3566 r3578  
    156156   calculate the damage depending
    157157*/
    158 void WorldEntity::hit(WorldEntity* weapon, Vector loc) {}
     158void WorldEntity::hit(WorldEntity* weapon, Vector* loc) {}
    159159
    160160
  • orxonox/trunk/src/world_entities/world_entity.h

    r3566 r3578  
    3434  virtual void postSpawn ();
    3535  virtual void tick (float time);
    36   virtual void hit (WorldEntity* weapon, Vector loc);
     36  virtual void hit (WorldEntity* weapon, Vector* loc);
    3737  virtual void collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags);
    3838  virtual void command (Command* cmd);
Note: See TracChangeset for help on using the changeset viewer.