Changes in server/server.cpp [f15d6a9:64a1f4e] in network-game
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/server.cpp
rf15d6a9 r64a1f4e 718 718 719 719 map<unsigned int, Player*>& oldPlayers = g->getPlayers(); 720 g->addPlayer(p, true); 721 p->team = -1; 720 g->addPlayer(p); 722 721 723 722 // send info to other players … … 753 752 break; 754 753 } 755 case MSG_TYPE_JOIN_TEAM:756 {757 cout << "Received a JOIN_TEAM message" << endl;758 759 Player* p = findPlayerByAddr(mapPlayers, from);760 map<unsigned int, Player*> players = p->currentGame->getPlayers();761 762 memcpy(&(p->team), clientMsg.buffer, 4);763 764 serverMsg.type = MSG_TYPE_PLAYER;765 p->serialize(serverMsg.buffer);766 msgProcessor.broadcastMessage(serverMsg, players);767 }768 754 default: 769 755 {
Note:
See TracChangeset
for help on using the changeset viewer.