Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8857 in orxonox.OLD for branches/multi_player_map/src


Ignore:
Timestamp:
Jun 28, 2006, 2:44:37 PM (18 years ago)
Author:
rennerc
Message:

handle teamkills

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/multi_player_map/src/util/multiplayer_team_deathmatch.cc

    r8856 r8857  
    724724  PlayerStats & stats = *PlayerStats::getStats( userId );
    725725
     726  //check for suicide
    726727  if ( killedUserId != userId )
    727     stats.setScore( stats.getScore() + 1 );
     728  {
     729    //check for teamkill
     730    if ( stats.getTeamId() != killedStats.getTeamId() )
     731    {
     732      stats.setScore( stats.getScore() + 1 );
     733    }
     734    else
     735    {
     736      stats.setScore( stats.getScore() - 1 );
     737    }
     738  }
    728739  else
    729740    stats.setScore( stats.getScore() - 1 );
Note: See TracChangeset for help on using the changeset viewer.