Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5574 in orxonox.OLD for branches


Ignore:
Timestamp:
Nov 15, 2005, 9:29:57 PM (19 years ago)
Author:
bensch
Message:

branches/world_entity: sync state

Location:
branches/world_entities/src/world_entities
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/world_entities/src/world_entities/player.cc

    r5567 r5574  
    133133
    134134  this->weaponMan = new WeaponManager(this);
    135   this->weaponMan->setSlotCount(10);
     135  this->weaponMan->setSlotCount(6);
    136136
    137137  this->weaponMan->setSlotPosition(0, Vector(-2.6, .1, -3.0));
     
    152152  this->weaponMan->setSlotPosition(5, Vector(-1.5, -.5, -.5));
    153153  this->weaponMan->setSlotDirection(5, Quaternion(+M_PI_4*.5-M_PI, Vector(1,0,0)));
    154 
    155   this->weaponMan->setSlotPosition(6, Vector(-2.0, 0.1, -2.0));
    156   this->weaponMan->setSlotPosition(7, Vector(-2.0, 0.1, 2.0));
    157 
    158   this->weaponMan->setSlotPosition(8, Vector(-2.5, -0.3, -2.0));
    159   this->weaponMan->setSlotDirection(8, Quaternion(-M_PI, Vector(1,0,0)));
    160 
    161   this->weaponMan->setSlotPosition(9, Vector(-2.5, -0.3, 2.0));
    162   this->weaponMan->setSlotDirection(9, Quaternion(+M_PI, Vector(1,0,0)));
     154//
     155//   this->weaponMan->setSlotPosition(6, Vector(-2.0, 0.1, -2.0));
     156//   this->weaponMan->setSlotPosition(7, Vector(-2.0, 0.1, 2.0));
     157//
     158//   this->weaponMan->setSlotPosition(8, Vector(-2.5, -0.3, -2.0));
     159//   this->weaponMan->setSlotDirection(8, Quaternion(-M_PI, Vector(1,0,0)));
     160//
     161//   this->weaponMan->setSlotPosition(9, Vector(-2.5, -0.3, 2.0));
     162//   this->weaponMan->setSlotDirection(9, Quaternion(+M_PI, Vector(1,0,0)));:
    163163
    164164}
     
    342342{
    343343  Weapon* turret = NULL;
     344
     345  printf("free slot: %d\n", this->weaponMan->getNextFreeSlot(3, WTYPE_TURRET | WTYPE_ALLDIRS));
     346
    344347  if ((float)rand()/RAND_MAX < .1)
    345348  {
  • branches/world_entities/src/world_entities/weapons/aim.cc

    r5568 r5574  
    107107  while (likely(entity != NULL))
    108108  {
    109     if (entity->isA(CL_NPC) &&(source->getAbsCoor() - entity->getAbsCoor()).len() < 100)
     109    if (entity->isA(CL_NPC) && source->getAbsCoor().x < entity->getAbsCoor().x && (source->getAbsCoor() - entity->getAbsCoor()).len() < 100)
    110110    {
    111111      if (this->getParent() != entity)
    112112      {
    113113        this->anim->replay();
    114         this->setParentSoft(entity, 3);
     114        this->setParentSoft(entity, 5);
    115115      }
    116116      delete iterator;
  • branches/world_entities/src/world_entities/weapons/aiming_turret.cc

    r5567 r5574  
    2424
    2525#include "null_parent.h"
    26 #include "state.h"
    27 #include "list.h"
     26
    2827#include "animation3d.h"
    2928#include "sound_engine.h"
     
    6766{
    6867  // model will be deleted from WorldEntity-destructor
    69   delete this->target;
     68//  delete this->target;
    7069}
    7170
  • branches/world_entities/src/world_entities/weapons/weapon_manager.cc

    r5567 r5574  
    472472        (this->currentSlotConfig[i].capability & capability & WTYPE_ALLKINDS) &&
    473473        (this->currentSlotConfig[i].capability & capability & WTYPE_ALLDIRS))
     474        {
     475        printf("%d %d %d %d\n", currentSlotConfig[i].capability, capability,  WTYPE_ALLKINDS, WTYPE_ALLDIRS);
     476
    474477      return i;
    475   }
    476   printf("SHIT\n");
     478      }
     479  }
    477480  return -1;
    478481}
  • branches/world_entities/src/world_entities/weapons/weapon_manager.h

    r5567 r5574  
    9292    void debug() const;
    9393
    94   private:
     94 // private:
    9595    int getNextFreeSlot(int configID, long capability = WTYPE_ALL);
    9696
Note: See TracChangeset for help on using the changeset viewer.