Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9500 in orxonox.OLD


Ignore:
Timestamp:
Jul 27, 2006, 12:15:06 PM (18 years ago)
Author:
bensch
Message:

compiles again, the Playables should now be able to choose their design per team

Location:
branches/proxy/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/particles/particle_system.cc

    r9497 r9500  
    238238  PRINTF(4)("Color of %s::%s on timeslice %f is r:%f g:%f b:%f a:%f\n",
    239239    this->getClassCName(), this->getCName(), lifeCycleTime, red, green, blue, alpha);
     240
     241  this->colorAnim[0].debug();
    240242}
    241243
     
    466468           this->maxCount,
    467469           ((this->maxCount!=0)?100*this->count/this->maxCount:0));
    468   if (this->deadList)
     470
     471  if (likely(this->deadList != NULL))
    469472  {
    470473    PRINT(0)("  - ParticleDeadList is used: ");
  • branches/proxy/src/util/multiplayer_team_deathmatch.cc

    r9498 r9500  
    489489
    490490
    491   ClassID playableClassId = getPlayableClassId( userId, stats.getPreferedTeamId() );
     491  ClassID     playableClassId = getPlayableClassId( userId, stats.getPreferedTeamId() );
    492492  std::string playableModel = getPlayableModelFileName( userId, stats.getPreferedTeamId(), playableClassId );
    493493  std::string playableTexture = getPlayableModelTextureFileName( userId, stats.getPreferedTeamId(), playableClassId );
     
    503503  playable.loadMD2Texture( playableTexture );
    504504  playable.loadModel( playableModel, playableScale );
     505  playable.setTeam(stats.getPreferedTeamId());
    505506  playable.setOwner( userId );
    506507  playable.setUniqueID( SharedNetworkData::getInstance()->getNewUniqueID() );
    507508  playable.setSynchronized( true );
    508 
    509   playable.setTeam(stats.getPreferedTeamId());
    510509
    511510  stats.setTeamId( stats.getPreferedTeamId() );
  • branches/proxy/src/world_entities/playable.cc

    r9406 r9500  
    273273}
    274274
     275
     276/**
     277 * @brief sets the TeamID and all the properties needed to be visible on the Playable
     278 * @param teamID: the new TeamID of the Entity
     279 */
     280void Playable::setTeam(int teamID)
     281{
     282  /// Derive this function to make it look different with differen groups.
     283  PRINTF(4)("No special team specific function implemented for %s::%s in Team %d\n", this->getClassCName(), this->getCName(), teamID);
     284}
     285
     286
    275287/**
    276288 * @brief attaches the current Camera to this Playable
  • branches/proxy/src/world_entities/playable.h

    r9499 r9500  
    6161  /** @return a List of Events in PEV_* sytle */
    6262  inline const std::vector<int>& getEventList() { return this->events; };
     63  virtual void setTeam(int teamID);
     64
    6365
    6466  // Camera and Playmode
     
    8789  virtual void tick(float dt);
    8890
     91
     92  inline bool beFire() const { return this->bFire; }
     93  inline void fire(bool bF) { this->bFire = bF;}
     94
    8995  // Transformations:
    9096  static Playable::Playmode stringToPlaymode(const std::string& playmode);
    9197  static const std::string& playmodeToString(Playable::Playmode playmode);
    9298  static const std::string playmodeNames[];
    93 
    94   inline bool beFire(){ return this->bFire; }
    95   inline void fire(bool bF){ this->bFire = bF;}
    9699
    97100protected:
  • branches/proxy/src/world_entities/space_ships/turbine_hover.cc

    r9497 r9500  
    236236void TurbineHover::setBoostColor(const Color& color)
    237237{
     238  printf("color:: "), color.debug();
    238239  this->burstSystem->setColor(0.0, color);
    239240  this->burstSystem->setColor(0.2, color * 0.6);
     
    265266
    266267}
     268
     269void TurbineHover::setTeam(int teamID)
     270{
     271  printf("::::::::::::::::: TEAM ::: %d\n", teamID);
     272  if (teamID == 0)
     273    this->setBoostColor(Color::blue);
     274  else if (teamID == 1)
     275    this->setBoostColor(Color::red);
     276}
     277
    267278
    268279
  • branches/proxy/src/world_entities/space_ships/turbine_hover.h

    r9497 r9500  
    2929    virtual void enter();
    3030    virtual void leave();
     31
     32    virtual void setTeam(int teamID);
    3133
    3234    virtual void postSpawn();
Note: See TracChangeset for help on using the changeset viewer.