Changeset 8798 in orxonox.OLD for branches/network/src/util/multiplayer_team_deathmatch.cc
- Timestamp:
- Jun 26, 2006, 3:48:47 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/util/multiplayer_team_deathmatch.cc
r8786 r8798 45 45 46 46 #include "shell_command.h" 47 48 #include "spawning_point.h" 47 49 48 50 … … 237 239 if ( !SharedNetworkData::getInstance()->isGameServer() ) 238 240 return; 241 242 //handle kills 243 for ( std::vector<Kill>::iterator it = this->killList.begin(); it != this->killList.end(); ) 244 { 245 std::vector<Kill>::iterator delit = it; 246 247 onKill( it->getKiller()->getOwner(), it->getVictim()->getOwner() ); 248 249 it++; 250 killList.erase( delit ); 251 } 239 252 240 253 gameStateTimer -= dt; … … 735 748 stats.setScore( stats.getScore() - 1 ); 736 749 737 killedStats.getPlayable()->toList( OM_DEAD );738 739 750 if ( killedUserId == SharedNetworkData::getInstance()->getHostID() ) 740 751 { … … 743 754 } 744 755 745 //TODO respawn killed palyer 756 const std::list<BaseObject*> * list = ClassList::getList( CL_SPAWNING_POINT ); 757 758 assert( list ); 759 760 std::vector<SpawningPoint*> spList; 761 762 for ( std::list<BaseObject*>::const_iterator it = list->begin(); it != list->end(); it++ ) 763 { 764 SpawningPoint * sp = dynamic_cast<SpawningPoint*>(*it); 765 766 if ( sp->getTeamId() < 0 || sp->getTeamId() == killedStats.getTeamId() ) 767 spList.push_back( sp ); 768 } 746 769 770 int n = spList.size()*rand(); 771 772 spList[n]->pushEntity( killedStats.getPlayable(), 3 ); 747 773 } 748 774
Note: See TracChangeset
for help on using the changeset viewer.