Changeset 3a79253 in network-game


Ignore:
Timestamp:
Feb 24, 2013, 12:10:47 AM (12 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
ca44f82
Parents:
01d0d00
Message:

Added a map from player ids to players on the client side

File:
1 edited

Legend:

Unmodified
Added
Removed
  • client/Client/main.cpp

    r01d0d00 r3a79253  
    1919#include <iostream>
    2020
     21#include <map>
     22
    2123#include <allegro5/allegro.h>
    2224#include <allegro5/allegro_font.h>
     
    7072
    7173bool doexit;
     74
     75map<unsigned int, Player> mapPlayers;
    7276
    7377Window* wndLogin;
     
    441445               Player p("", "");
    442446               p.deserialize(msg.buffer);
    443 
     447               mapPlayers[p.id] = p;
     448
     449               cout << "p.id: " << p.id << endl;
    444450               cout << "p.name: " << p.name << endl;
    445451               cout << "p.pos.x: " << p.pos.x << endl;
Note: See TracChangeset for help on using the changeset viewer.