Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 5, 2006, 4:39:02 PM (19 years ago)
Author:
bensch
Message:

merged the presentation back

File:
1 edited

Legend:

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

    r9110 r9235  
    210210  while ( this->killList.begin() != this->killList.end() )
    211211  {
     212    PRINTF(0)("KKKKKKKKIIIIIIIIILLLLLLLLLLLLL\n");
    212213    onKill( this->killList.begin()->getVictim(), this->killList.begin()->getKiller() );
    213214    this->killList.erase( this->killList.begin() );
     
    305306    return "models/creatures/doom_guy.md2";
    306307  else if ( team == 1 )
    307     return "models/creatures/doom_guy.md2";
     308    return "models/creatures/male.md2";
    308309  else
    309310    return "";
    310311}
    311312
     313std::string MultiplayerTeamDeathmatch::getPlayableModelTextureFileName( int userId, int team, ClassID classId )
     314{
     315  if ( classId == CL_FPS_PLAYER )
     316  {
     317    if ( team == 0 )
     318      return "maps/doom_guy.png";
     319    else
     320      return "maps/male_fiend.pcx";
     321  }
     322 
     323  return "";
     324}
     325
     326float MultiplayerTeamDeathmatch::getPlayableScale( int userId, int team, ClassID classId )
     327{
     328  if ( classId == CL_FPS_PLAYER )
     329  {
     330    return 10.0f;
     331  }
     332 
     333  return 1.0f;
     334}
     335
    312336/**
    313337 * calculate team score
     
    399423  if ( currentGameState == GAMESTATE_POST_GAME )
    400424  {
    401     State::getCurrentStoryEntity()->stop();
     425    //State::getCurrentStoryEntity()->stop();
    402426    this->bShowTeamChange = false;
    403427
     
    456480  std::string playableModel = getPlayableModelFileName( userId, stats.getPreferedTeamId(), playableClassId );
    457481  std::string playableTexture = getPlayableModelTextureFileName( userId, stats.getPreferedTeamId(), playableClassId );
     482  float       playableScale = getPlayableScale( userId, stats.getPreferedTeamId(), playableClassId );
    458483
    459484  BaseObject * bo = Factory::fabricate( playableClassId );
     
    464489  Playable & playable = *(dynamic_cast<Playable*>(bo));
    465490
    466   if ( playableTexture != "" )
    467     playable.loadMD2Texture( playableTexture );
    468   if ( playableModel != "" )
    469     playable.loadModel( playableModel );
     491  playable.loadMD2Texture( playableTexture );
     492  playable.loadModel( playableModel, playableScale );
    470493  playable.setOwner( userId );
    471494  playable.setUniqueID( SharedNetworkData::getInstance()->getNewUniqueID() );
     
    687710{
    688711  if ( !victim )
    689     return;
     712  {
     713    PRINTF(0)("victim == NULL\n");
     714    return;
     715  }
    690716  if ( !killer )
    691     return;
     717  {
     718    PRINTF(0)("killer == NULL\n");
     719    return;
     720  }
    692721 
    693722  int killerUserId = killer->getOwner();
    694723  int victimUserId = victim->getOwner();
     724 
     725  PRINTF(0)("%d %d %x %x %s %s\n", killerUserId, victimUserId, killer, victim, killer->getClassName(), victim->getClassName());
    695726
    696727  PlayerStats & victimStats = *PlayerStats::getStats( victimUserId );
     
    698729 
    699730  if ( killerStats.getPlayable() != killer || victimStats.getPlayable() != victim )
    700     return;
     731  {
     732    PRINTF(0)("killerStats.getPlayable() != killer || victimStats.getPlayable() != victim\n");
     733    PRINTF(0)("%x %x %x %x\n", killerStats.getPlayable(), killer, victimStats.getPlayable(), victim );
     734    PRINTF(0)("%d %d %d %d\n", killerStats.getPlayable()->getUniqueID(), killer->getUniqueID(), victimStats.getPlayable()->getUniqueID(), victim->getUniqueID() );
     735    return;
     736  }
    701737
    702738  //check for suicide
     
    782818}
    783819
    784 std::string MultiplayerTeamDeathmatch::getPlayableModelTextureFileName( int userId, int team, ClassID classId )
    785 {
    786   if ( classId == CL_FPS_PLAYER )
    787   {
    788     return "maps/doom_guy.png";
    789   }
    790  
    791   return "";
    792 }
    793 
     820
Note: See TracChangeset for help on using the changeset viewer.