Changeset cbc70eb in network-game


Ignore:
Timestamp:
Dec 26, 2013, 10:49:48 PM (11 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
f63aa57
Parents:
cd80d63
Message:

A small bit of client code uses curPlayerId instead of searching through the list of players to get the current one

File:
1 edited

Legend:

Unmodified
Added
Removed
  • client/Client/main.cpp

    rcd80d63 rcbc70eb  
    417417               map<unsigned int, Player*>::iterator it;
    418418
    419                Player* curPlayer;
    420                for(it = mapPlayers.begin(); it != mapPlayers.end(); it++)
    421                {
    422                   if (it->second->id == curPlayerId)
    423                      curPlayer = it->second;
    424                }
     419               Player* curPlayer = mapPlayers[curPlayerId];;
    425420
    426421               cout << "Got current player" << endl;
Note: See TracChangeset for help on using the changeset viewer.