Rabi-Race module fix for session synchronization.
This commit is contained in:
parent
a8fb0eb75c
commit
d889ce8495
BIN
sigIRCv2.jar
BIN
sigIRCv2.jar
Binary file not shown.
@ -2,6 +2,8 @@ package sig.modules.RabiRace;
|
|||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
import sig.modules.RabiRaceModule;
|
||||||
|
|
||||||
public class SessionListData {
|
public class SessionListData {
|
||||||
HashMap<Integer,Session> data = new HashMap<Integer,Session>();
|
HashMap<Integer,Session> data = new HashMap<Integer,Session>();
|
||||||
|
|
||||||
@ -16,7 +18,11 @@ public class SessionListData {
|
|||||||
//System.out.println("Adding session "+session);
|
//System.out.println("Adding session "+session);
|
||||||
//this.data.add(new Session(session));
|
//this.data.add(new Session(session));
|
||||||
int sessionID = Integer.parseInt(session.split(",")[0]);
|
int sessionID = Integer.parseInt(session.split(",")[0]);
|
||||||
this.data.put(sessionID, new Session(session));
|
Session s = new Session(session);
|
||||||
|
this.data.put(sessionID, s);
|
||||||
|
if (RabiRaceModule.module.mySession!=null && RabiRaceModule.module.mySession.id==sessionID) {
|
||||||
|
RabiRaceModule.module.mySession = s;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//System.out.println(this.data);
|
//System.out.println(this.data);
|
||||||
|
@ -411,6 +411,7 @@ public class RabiRaceModule extends Module{
|
|||||||
for (Profile p : mySession.getPlayers()) {
|
for (Profile p : mySession.getPlayers()) {
|
||||||
if (!p.username.equalsIgnoreCase(myProfile.username)) {
|
if (!p.username.equalsIgnoreCase(myProfile.username)) {
|
||||||
sessionPlayers.add(p);
|
sessionPlayers.add(p);
|
||||||
|
//System.out.println("Found unique player "+p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Profile.DrawMultiPanel(g, (int)(position.getX()), (int)(position.getY())+panel.getHeight(sigIRC.panel), (int)position.getWidth(), sessionPlayers);
|
Profile.DrawMultiPanel(g, (int)(position.getX()), (int)(position.getY())+panel.getHeight(sigIRC.panel), (int)position.getWidth(), sessionPlayers);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user