Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10701 in orxonox.OLD


Ignore:
Timestamp:
Jun 14, 2007, 11:15:04 PM (17 years ago)
Author:
nicolasc
Message:

minor improvements, some cleanup

Location:
branches/presentation/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/lib/lang/base_object.cc

    r10114 r10701  
    3333  this->xmlElem = NULL;
    3434  this->registerObject(this, BaseObject::_objectList);
     35
     36  srand(time(0));   //initialize Random Nomber Generator
    3537}
    3638
     
    4547  this->xmlElem = (bo.xmlElem)? bo.xmlElem->Clone() : NULL;
    4648  this->registerObject( this, BaseObject::_objectList);
     49
     50  srand(time(0));   //initialize Random Nomber Generator
    4751}
    4852
  • branches/presentation/src/world_entities/projectiles/acid_splash.cc

    r10698 r10701  
    2222#include "state.h"
    2323
    24 //#include "space_ships/space_ship.h"
    25 
    2624#include <cassert>
    2725#include "debug.h"
    28 
    29 //#include "static_model.h"
    3026
    3127#include "effects/wobblegrid.h"
     
    4339  this->registerObject(this, AcidSplash::_objectList);
    4440
    45   srand(time(0));   //initialize Random Nomber Generator
    46 
    47   //this->loadModel("models/projectiles/laser.obj");
     41// moved to baseObject
     42//   srand(time(0));   //initialize Random Nomber Generator
    4843
    4944  this->setMinEnergy(1);
     
    7267      this->grid->setTexture( "textures/acid2.png");
    7368  }
    74 //   if (rand()/2 == 0) //!<Randomized Textrures
    75 //     this->grid->setTexture( "textures/acid3.png");
    76 //   else
    77 //     this->grid->setTexture( "textures/blub.png");
    7869
    7970  this->grid->toList(OM_ENVIRON);
     
    8778AcidSplash::~AcidSplash ()
    8879{
    89   // delete this->emitter;
    90   //delete this->grid;
    9180  this->grid->toList(OM_DEAD);
    92  
    9381}
    9482
     
    121109}
    122110
    123 /*
    124 void AcidSplash::collidesWith(WorldEntity* entity, const Vector& location)
    125 {
    126111
    127   if (this->hitEntity != entity)
    128     this->destroy( entity );
    129   this->hitEntity = entity;
    130   //dynamic_cast<SpaceShip*>(entity)->damage(this->getPhysDamage(),this->getElecDamage());
    131   //this->destroy(this);
    132   this->deactivate();
    133  
    134 //   return;
    135 
    136   //dynamic_cast<SpaceShip*>(entity)->damage( this->getPhysDamage(), this->getElecDamage());
    137   //entity->destroy(this);
    138   //this->deactivate();
    139 }
    140 */
    141112/**
    142113 *  signal tick, time dependent things will be handled here
     
    145116void AcidSplash::tick (float dt)
    146117{
    147   //Vector v = *this->flightDirection * ( this->speed * time * 1000 + 0.1);
    148118  Vector v = this->velocity * dt;
    149119  this->shiftCoor(v);
  • branches/presentation/src/world_entities/weapons/rf_cannon.cc

    r10698 r10701  
    6969void RFCannon::init()
    7070{
    71 
    7271  this->setScaling(.2);
    7372
     
    9291  this->setBarrels(4);
    9392  this->setSegs(1);
    94   this->activeBarrel = 0;
     93  this->activeBarrel = (rand() % 4);
    9594
    9695  this->objComp = new PNode**[this->getBarrels()];
Note: See TracChangeset for help on using the changeset viewer.