Rabi-Race memory leak fixed.
This commit is contained in:
parent
93677933e1
commit
d80c57526e
BIN
sigIRCv2.jar
BIN
sigIRCv2.jar
Binary file not shown.
@ -98,7 +98,7 @@ public class Profile {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
String[] data = FileUtils.readFromFile(sigIRC.BASEDIR+"tmp");
|
String[] data = FileUtils.readFromFile(sigIRC.BASEDIR+"tmp");
|
||||||
System.out.println(Arrays.toString(data));
|
//System.out.println(Arrays.toString(data));
|
||||||
if (data.length>=18) {
|
if (data.length>=18) {
|
||||||
int i=0;
|
int i=0;
|
||||||
displayName = data[i++];
|
displayName = data[i++];
|
||||||
@ -121,7 +121,7 @@ public class Profile {
|
|||||||
do {
|
do {
|
||||||
String[] parse = nextval.split(";");
|
String[] parse = nextval.split(";");
|
||||||
key_items.put(MemoryData.valueOf(parse[0]), Integer.parseInt(parse[1]));
|
key_items.put(MemoryData.valueOf(parse[0]), Integer.parseInt(parse[1]));
|
||||||
System.out.println("Added "+Arrays.toString(parse));
|
//System.out.println("Added "+Arrays.toString(parse));
|
||||||
nextval = data[i++];
|
nextval = data[i++];
|
||||||
}
|
}
|
||||||
while (!nextval.equalsIgnoreCase("BADGES:"));
|
while (!nextval.equalsIgnoreCase("BADGES:"));
|
||||||
@ -131,7 +131,7 @@ public class Profile {
|
|||||||
do {
|
do {
|
||||||
String[] parse = nextval.split(";");
|
String[] parse = nextval.split(";");
|
||||||
badges.put(MemoryData.valueOf(parse[0]), Integer.parseInt(parse[1]));
|
badges.put(MemoryData.valueOf(parse[0]), Integer.parseInt(parse[1]));
|
||||||
System.out.println("Added "+Arrays.toString(parse));
|
//System.out.println("Added "+Arrays.toString(parse));
|
||||||
nextval = data[i++];
|
nextval = data[i++];
|
||||||
}
|
}
|
||||||
while (!nextval.equalsIgnoreCase("UPDATES:"));
|
while (!nextval.equalsIgnoreCase("UPDATES:"));
|
||||||
|
@ -37,17 +37,17 @@ public class Session {
|
|||||||
for (String s : playerlist) {
|
for (String s : playerlist) {
|
||||||
Profile p = new Profile(RabiRaceModule.module);
|
Profile p = new Profile(RabiRaceModule.module);
|
||||||
p.username=s;
|
p.username=s;
|
||||||
System.out.println("Player "+p.username);
|
//System.out.println("Player "+p.username);
|
||||||
p.downloadProfile();
|
p.downloadProfile();
|
||||||
System.out.println("Adding Player "+p);
|
//System.out.println("Adding Player "+p);
|
||||||
players.add(p);
|
players.add(p);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Profile p = new Profile(RabiRaceModule.module);
|
Profile p = new Profile(RabiRaceModule.module);
|
||||||
p.username=val;
|
p.username=val;
|
||||||
System.out.println("Player "+p.username);
|
//System.out.println("Player "+p.username);
|
||||||
p.downloadProfile();
|
p.downloadProfile();
|
||||||
System.out.println("Adding Player "+p);
|
//System.out.println("Adding Player "+p);
|
||||||
players.add(p);
|
players.add(p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -86,6 +86,11 @@ public class RabiRaceModule extends Module{
|
|||||||
//trimeadProfile.downloadProfile();
|
//trimeadProfile.downloadProfile();
|
||||||
}
|
}
|
||||||
}, 5000, 5000, TimeUnit.MILLISECONDS);
|
}, 5000, 5000, TimeUnit.MILLISECONDS);
|
||||||
|
scheduler.scheduleWithFixedDelay(()->{
|
||||||
|
if (foundRabiRibi) {
|
||||||
|
UpdateMyProfile();
|
||||||
|
}
|
||||||
|
}, 250, 250, TimeUnit.MILLISECONDS);
|
||||||
|
|
||||||
File dir = new File(ITEMS_DIRECTORY);
|
File dir = new File(ITEMS_DIRECTORY);
|
||||||
|
|
||||||
@ -202,7 +207,6 @@ public class RabiRaceModule extends Module{
|
|||||||
public void run() {
|
public void run() {
|
||||||
if (foundRabiRibi) {
|
if (foundRabiRibi) {
|
||||||
rainbowcycler.run();
|
rainbowcycler.run();
|
||||||
UpdateMyProfile();
|
|
||||||
if (window!=null) {
|
if (window!=null) {
|
||||||
window.run();
|
window.run();
|
||||||
}
|
}
|
||||||
@ -327,6 +331,7 @@ public class RabiRaceModule extends Module{
|
|||||||
|
|
||||||
public void draw(Graphics g) {
|
public void draw(Graphics g) {
|
||||||
super.draw(g);
|
super.draw(g);
|
||||||
|
|
||||||
if (!foundRabiRibi) {
|
if (!foundRabiRibi) {
|
||||||
DrawUtils.drawTextFont(g, sigIRC.panel.userFont, position.getX(), position.getY()+26, Color.BLACK, "Rabi-Ribi not found! Please start it.");
|
DrawUtils.drawTextFont(g, sigIRC.panel.userFont, position.getX(), position.getY()+26, Color.BLACK, "Rabi-Ribi not found! Please start it.");
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user