Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Jan 30, 2007, 9:51:21 PM (18 years ago)
Author:
patrick
Message:

emitter fix

Location:
trunk/src/world_entities
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/bsp_entity.cc

    r10114 r10519  
    5757
    5858  this->bspManager = NULL;
     59  this->sortTransparency = 1;
     60  this->sortTransparencyMore = 0;
     61
    5962
    6063  this->name_handle = registerVarId( new SynchronizeableString( &this->name, &this->name_write, "name", PERMISSION_MASTER_SERVER ) );
     
    7477
    7578    this->bspManager = new BspManager(this);
     79    this->bspManager->sortTransparency = this->sortTransparency;
     80    this->bspManager->sortTransparencyMore = this->sortTransparencyMore;
    7681
    7782    if(this->bspManager->load(name.c_str(), 0.1f) == -1 ) {
     
    8792}
    8893
     94void BspEntity::setTransparency(int sort, int sortMore)
     95{
     96  this->sortTransparency = sort;
     97  this->sortTransparencyMore = sortMore;
     98 
     99  if (this->bspManager != NULL)
     100  {
     101    this->bspManager->sortTransparency = sort;
     102    this->bspManager->sortTransparencyMore = sortMore;
     103  }
     104}
    89105
    90106/**
     
    101117  .describe("Sets the of the BSP file.");
    102118
     119  LoadParam(root, "Transparency", this, BspEntity, setTransparency)
     120  .describe("1. argument: true -> sort transparent textures; 2. argument: true -> better but slower sorting")
     121  .defaultValues(1, 0);
     122 
    103123  /*  LoadParam(root, "Scale", this, BSpEntity, setScale)
    104124        .describe("Sets the scale factore of the bsp level.");
  • trunk/src/world_entities/bsp_entity.h

    r10033 r10519  
    2626
    2727  void setName(const std::string& name);
     28  void setTransparency(int sort, int sortMore = 0);
    2829
    2930  void init();
     
    4445   std::string name_write;             //!< temp variable to store name
    4546   int name_handle;                    //!< handle for name
    46 
     47   int sortTransparency;              //!< sort transparent textures
     48   int sortTransparencyMore;          //!< sort transparent textures better
    4749};
    4850
  • trunk/src/world_entities/environments/rotor.cc

    r10280 r10519  
    3030{
    3131  this->registerObject(this, Rotor::_objectList);
    32   this->toList(OM_GROUP_00);
    33  
     32  this->toList(OM_ENVIRON);
     33
    3434  //PRINTF(0)("loading Rotor");
    3535
     
    6363{
    6464     this->shiftDir(Quaternion(rotation.x*dt, Vector(1,0,0)) * Quaternion(rotation.y*dt, Vector(0,1,0)) * Quaternion(rotation.z*dt, Vector(0,0,1)));
    65      
     65
    6666}
    6767
  • trunk/src/world_entities/npcs/mover.cc

    r10487 r10519  
    2020
    2121#include "mover.h"
     22#include "state.h"
     23#include "camera.h"
    2224
    2325
     
    3133{
    3234    this->registerObject(this, Mover::_objectList);
    33     this->toList(OM_COMMON);
     35    this->toList(OM_ENVIRON);
    3436
    3537    this->targetCoordinates = Vector(0, 0, 0);
     
    224226        if (distance < this->actionRadius)
    225227        {
    226             this->soundSource_starting.setSourceNode(entity);   // bad hack!
    227             this->soundSource_moving.setSourceNode(entity);     // TODO: make the sound louder without
    228             this->soundSource_ending.setSourceNode(entity);     // attaching him to the player
     228            this->soundSource_starting.setSourceNode((PNode*)State::getCamera());   // bad hack!
     229            this->soundSource_moving.setSourceNode((PNode*)State::getCamera());     // TODO: make the sound louder without
     230            this->soundSource_ending.setSourceNode((PNode*)State::getCamera());     // attaching him to the player
    229231            return true;
    230232        }
  • trunk/src/world_entities/particles/particle_system.cc

    r10516 r10519  
    264264  emitter->system = this;
    265265  this->emitters.push_back(emitter);
     266
     267  // init the emitertter with the coordinates of the system
     268  emitter->setAbsCoor(this->getAbsCoor());
     269
    266270}
    267271
Note: See TracChangeset for help on using the changeset viewer.