Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 27, 2006, 12:54:39 PM (18 years ago)
Author:
patrick
Message:
  • removing entities from the network works now also on proxies.
  • player team change is handled differently now: handler function
  • there was a chronological error in the change team function call stack
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/network/player_stats.cc

    r9494 r9504  
    105105  {
    106106    PRINTF(0)("user %s is now known as %s\n", oldNickName.c_str(), nickName.c_str());
    107     oldNickName = nickName;
    108   }
    109 }
     107    this->oldNickName = nickName;
     108  }
     109
     110  if ( std::find( id.begin(), id.end(), teamId_handle ) != id.end() )
     111  {
     112    PRINTF(0)("user %s joins team %i\n", this->nickName.c_str(), this->teamId);
     113    this->setPreferedTeamIdHandler( this->teamId);
     114  }
     115
     116}
     117
     118
     119/**
     120 * handler for setting the prefered team id
     121 * @param newTeamId: the new team id
     122 */
     123void PlayerStats::setPreferedTeamIdHandler( int newTeamId)
     124{
     125
     126  if( this->playable == NULL)
     127  {
     128    PRINTF(0)("could not set prefered team, since the playable is not yet set\n");
     129    return;
     130  }
     131
     132  this->playable->setTeam(newTeamId);
     133}
     134
     135
    110136
    111137/**
Note: See TracChangeset for help on using the changeset viewer.