Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10114 in orxonox.OLD for trunk/src/util


Ignore:
Timestamp:
Dec 19, 2006, 11:55:26 PM (18 years ago)
Author:
patrick
Message:

merged network back to trunk

Location:
trunk/src/util
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/util/game_rules.cc

    r9869 r10114  
    6565    PRINTF(4)("Adding Mission Goal:%s\n", element->Value());
    6666    BaseObject* created = Factory::fabricate(element);
    67     if (created != NULL /*&& created->isA(CL_GAME_RULES)*/)
     67    if (created != NULL /*&& created->isA(GameRules::staticClassID())*/)
    6868    {
    6969      MissionGoal* mg = dynamic_cast<MissionGoal*>(created);
  • trunk/src/util/kill_target.cc

    r9869 r10114  
    2222
    2323
    24 #include "class_id_DEPRECATED.h"
    25 ObjectListDefinitionID(KillTarget, CL_KILL_TARGET);
     24
     25ObjectListDefinition(KillTarget);
    2626CREATE_FACTORY(KillTarget);
    2727
  • trunk/src/util/multiplayer_team_deathmatch.cc

    r9869 r10114  
    4646#include "spawning_point.h"
    4747
    48 
    49 
    50 #include "class_id_DEPRECATED.h"
    51 
    52 ObjectListDefinitionID(MultiplayerTeamDeathmatch, CL_MULTIPLAYER_TEAM_DEATHMATCH);
     48#include "creatures/fps_player.h"
     49
     50ObjectListDefinition(MultiplayerTeamDeathmatch);
    5351CREATE_FACTORY(MultiplayerTeamDeathmatch);
    5452/**
     
    148146      box->setAbsCoor2D( 300, 100 );
    149147
    150       if( SharedNetworkData::getInstance()->isClient() ||  SharedNetworkData::getInstance()->isProxyServerActive())
    151       {
    152         OrxGui::GLGuiPushButton * buttonSpectator = new OrxGui::GLGuiPushButton("Spectator");
    153         box->pack( buttonSpectator );
    154         buttonSpectator->released.connect(this, &MultiplayerTeamDeathmatch::onButtonSpectator);
    155 
    156         OrxGui::GLGuiPushButton * buttonRandom = new OrxGui::GLGuiPushButton("Random");
    157         box->pack( buttonRandom );
    158         buttonRandom->released.connect(this, &MultiplayerTeamDeathmatch::onButtonRandom);
    159 
    160         OrxGui::GLGuiPushButton * buttonTeam0 = new OrxGui::GLGuiPushButton("Blue Team");
    161         box->pack( buttonTeam0 );
    162         buttonTeam0->released.connect(this, &MultiplayerTeamDeathmatch::onButtonTeam0);
    163 
    164         OrxGui::GLGuiPushButton * buttonTeam1 = new OrxGui::GLGuiPushButton("Red Team");
    165         box->pack( buttonTeam1 );
    166         buttonTeam1->released.connect(this, &MultiplayerTeamDeathmatch::onButtonTeam1);
    167       }
    168       else
    169       {
    170         OrxGui::GLGuiText* text = new OrxGui::GLGuiText();
    171         text->setText("Server Mode: not able to play at this node");
    172         box->pack( text);
    173       }
    174 
     148      OrxGui::GLGuiPushButton * buttonSpectator = new OrxGui::GLGuiPushButton("Spectator");
     149      box->pack( buttonSpectator );
     150      buttonSpectator->released.connect(this, &MultiplayerTeamDeathmatch::onButtonSpectator);
     151
     152      OrxGui::GLGuiPushButton * buttonRandom = new OrxGui::GLGuiPushButton("Random");
     153      box->pack( buttonRandom );
     154      buttonRandom->released.connect(this, &MultiplayerTeamDeathmatch::onButtonRandom);
     155
     156      OrxGui::GLGuiPushButton * buttonTeam0 = new OrxGui::GLGuiPushButton("Blue Team");
     157      box->pack( buttonTeam0 );
     158      buttonTeam0->released.connect(this, &MultiplayerTeamDeathmatch::onButtonTeam0);
     159
     160      OrxGui::GLGuiPushButton * buttonTeam1 = new OrxGui::GLGuiPushButton("Red Team");
     161      box->pack( buttonTeam1 );
     162      buttonTeam1->released.connect(this, &MultiplayerTeamDeathmatch::onButtonTeam1);
    175163
    176164      if ( bShowTeamChange )
     
    307295
    308296  if ( team == 0 || team == 1 )
    309     return ObjectListBase::retrieveIdentity("TurbineHover");
     297    return ObjectListBase::retrieveIdentity("FPSPlayer");
    310298
    311299  assert( false );
     
    315303std::string MultiplayerTeamDeathmatch::getPlayableModelFileName( int userId, int team, const ClassID& classId )
    316304{
    317   if (classId == CL_TURBINE_HOVER)
    318     return "models/ships/hoverglider_mainbody.obj";
    319305  if ( team == 0 )
    320306    return "models/creatures/doom_guy.md2";
     
    322308    return "models/creatures/male.md2";
    323309  else
     310  {
    324311    return "";
     312  }
    325313}
    326314
    327315std::string MultiplayerTeamDeathmatch::getPlayableModelTextureFileName( int userId, int team, const ClassID& classId )
    328316{
    329   if ( classId == CL_FPS_PLAYER )
     317  if ( team == 0 || team == 1 )
    330318  {
    331319    if ( team == 0 )
    332       return "maps/doom_guy.png";
     320      return "doom_guy.png";
    333321    else
    334       return "maps/male_fiend.pcx";
     322      return "male_fiend.pcx";
    335323  }
    336324
     
    340328float MultiplayerTeamDeathmatch::getPlayableScale( int userId, int team, const ClassID& classId )
    341329{
    342   if ( classId == ObjectListBase::retrieveIdentity(CL_FPS_PLAYER))
     330  if ( classId == FPSPlayer::staticClassID() )
    343331  {
    344332    return 10.0f;
     
    499487
    500488  assert( bo != NULL );
    501   assert( bo->isA( CL_PLAYABLE ) );
     489  assert( bo->isA( Playable::staticClassID() ) );
    502490
    503491  Playable & playable = *(dynamic_cast<Playable*>(bo));
    504492
     493  PRINTF(0)("%s %s %f\n", playableModel.c_str(), playableTexture.c_str(), playableScale );
     494 
    505495  playable.loadMD2Texture( playableTexture );
    506496  playable.loadModel( playableModel, playableScale );
  • trunk/src/util/signal_handler.cc

    r9406 r10114  
    4242  catchSignal( SIGSEGV );
    4343  catchSignal( SIGABRT );
     44  catchSignal( SIGILL );
    4445}
    4546
     
    9495    case SIGABRT:
    9596      sigName = "SIGABRT";
     97      break;
     98    case SIGILL:
     99      sigName = "SIGILL";
    96100      break;
    97101  }
  • trunk/src/util/singleplayer_shootemup.cc

    r9869 r10114  
    2525
    2626
    27 #include "class_id_DEPRECATED.h"
    28 ObjectListDefinitionID(SingleplayerShootemup, CL_SINGLEPLAYER_SHOOTEMUP);
     27
     28ObjectListDefinition(SingleplayerShootemup);
    2929CREATE_FACTORY(SingleplayerShootemup);
    3030
Note: See TracChangeset for help on using the changeset viewer.