*** LFSClient/loop.cs Sun Jul 27 16:11:42 2008 --- LFSClient/loop.cs Thu Oct 09 18:34:29 2008 *************** *** 775,780 **** --- 775,781 ---- currInfoPlayer.MaxLapTime2Reached = false; currInfoPlayer.MaxLapTime = trackInfo.getMaxLapTime(currentTrackName, newPlayer.CName); // Console.WriteLine(currInfoPlayer.userName + " On track :" + currInfoPlayer.OnTrack); + listOfPlayers.platesPLID[newPlayer.PLID] = newPlayer; listOfPlayers.majIndexPLID(newPlayer.UCID, newPlayer.PLID); // If player change car, Clear session if (currInfoPlayer.CName != newPlayer.CName) *** LFSClient/parseEvent.cs Sun Jul 27 19:11:56 2008 --- LFSClient/parseEvent.cs Thu Oct 09 18:37:25 2008 *************** *** 456,466 **** switch (idVar) { case "Nickname": ! return quote( currInfoPlayer.nickName ); break; case "Username": ! return quote( currInfoPlayer.userName ); break; case "Laps": return currInfoPlayer.laps.ToString(); break; --- 456,475 ---- switch (idVar) { case "Nickname": ! if (currInfoPlayer.newPlayerPacket == null) ! { ! return quote(currInfoPlayer.nickName); ! } ! else ! { ! return quote(currInfoPlayer.newPlayerPacket.nickName); ! } break; case "Username": ! return quote(currInfoPlayer.userName); break; + case "Plate": + return quote( currInfoPlayer.newPlayerPacket.Plate ); case "Laps": return currInfoPlayer.laps.ToString(); break; *** Players.cs Sun Jul 27 13:16:54 2008 --- Players.cs Thu Oct 09 18:37:58 2008 *************** *** 30,35 **** --- 30,36 ---- public int PLID; public string userName; public string nickName; + public InSim.Decoder.NPL newPlayerPacket; public bool demoPlayer = false; public bool OnTrack = false; *************** *** 562,567 **** --- 562,568 ---- { public Hashtable playersUCID = new Hashtable(); public Hashtable playersPLID = new Hashtable(); + public Hashtable platesPLID = new Hashtable(); public void newPlayer(int UCID, string username, string nickname, string Product ) { *************** *** 577,583 **** --- 578,587 ---- public infoPlayer getPlayerByPLID(int PLID) { if (playersPLID.ContainsKey(PLID)) + { + ((infoPlayer)playersPLID[PLID]).newPlayerPacket = (InSim.Decoder.NPL)platesPLID[PLID]; return (infoPlayer)playersPLID[PLID]; + } else return null; } *************** *** 589,594 **** --- 593,599 ---- { if (playersPLID.ContainsKey(PLID)) { + ((infoPlayer)playersPLID[PLID]).newPlayerPacket = (InSim.Decoder.NPL)platesPLID[PLID]; currInfoPlayer = (infoPlayer)playersPLID[PLID]; } }