mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-02 16:49:03 +00:00
Lag fixed :) (#170)
This commit is contained in:
@@ -0,0 +1 @@
|
||||
[2019/11/10] 22:30 spamtest1 dropped 1 grimy lantadyme absX: 3231 absY: 3207
|
||||
@@ -0,0 +1,2 @@
|
||||
[2019/11/10] 22:46 spamtest1 picked up bones itemX: 3231, itemY: 3236
|
||||
[2019/11/10] 22:46 spamtest1 picked up bones itemX: 3231, itemY: 3236
|
||||
@@ -65,11 +65,6 @@ public class ObjectsActions {
|
||||
player.getActionSender().sendMessage("This object does not exist. Please report this to a staff member.");
|
||||
return;
|
||||
}
|
||||
if (player.isBotting == true) {
|
||||
player.getActionSender().sendMessage("You can't click any objects until you confirm you are not botting.");
|
||||
player.getActionSender().sendMessage("If you need to you can type ::amibotting, to see if your botting.");
|
||||
return;
|
||||
}
|
||||
if (Webs.webs(player, objectType)) {
|
||||
Webs.slashWeb(player, objectType, objectX, objectY);
|
||||
return;
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.io.FileNotFoundException;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import redone.Server;
|
||||
@@ -139,19 +140,17 @@ public class ObjectHandler {
|
||||
for (Player p : PlayerHandler.players) {
|
||||
if (p != null) {
|
||||
Client person = (Client) p;
|
||||
if (person != null) {
|
||||
if (person.heightLevel == o.getObjectHeight()
|
||||
&& o.objectTicks == 0) {
|
||||
if (person.distanceToPoint(o.getObjectX(),
|
||||
o.getObjectY()) <= 60) {
|
||||
removeAllObjects(o);
|
||||
globalObjects.add(o);
|
||||
person.getActionSender().object(
|
||||
o.getObjectId(), o.getObjectX(),
|
||||
o.getObjectY(), o.getObjectFace(),
|
||||
o.getObjectType());
|
||||
//Region.addObject(o.getObjectId(), o.getObjectX(), o.getObjectY(), o.getObjectHeight(), o.getObjectType(), o.getObjectFace(), true);
|
||||
}
|
||||
if (person.heightLevel == o.getObjectHeight()
|
||||
&& o.objectTicks == 0) {
|
||||
if (person.distanceToPoint(o.getObjectX(),
|
||||
o.getObjectY()) <= 60) {
|
||||
removeAllObjects(o);
|
||||
globalObjects.add(o);
|
||||
person.getActionSender().object(
|
||||
o.getObjectId(), o.getObjectX(),
|
||||
o.getObjectY(), o.getObjectFace(),
|
||||
o.getObjectType());
|
||||
//Region.addObject(o.getObjectId(), o.getObjectX(), o.getObjectY(), o.getObjectHeight(), o.getObjectType(), o.getObjectFace(), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -159,13 +158,10 @@ public class ObjectHandler {
|
||||
}
|
||||
|
||||
public void removeAllObjects(Objects o) {
|
||||
for (Objects s : globalObjects) {
|
||||
if (o.getObjectX() == o.objectX && o.getObjectY() == o.objectY
|
||||
&& s.getObjectHeight() == o.getObjectHeight()) {
|
||||
globalObjects.remove(s);
|
||||
break;
|
||||
}
|
||||
}
|
||||
//Using Iterator for concurrency
|
||||
globalObjects.removeIf(s -> s.getObjectX() == o.getObjectX() &&
|
||||
s.getObjectY() == o.getObjectY() &&
|
||||
s.getObjectHeight() == o.getObjectHeight());
|
||||
}
|
||||
|
||||
public void process() {
|
||||
|
||||
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -48,7 +48,7 @@ Step 17: Start the Client [Image](https://i.imgur.com/dHTiU0I.png)
|
||||
|
||||
|
||||
# Using Parabot with your local server:
|
||||
- **1:** Download the latest `localhost_2006rebotted.jar` from [here](https://github.com/dginovker/2006rebotted/releases)
|
||||
- **1:** Download the latest `localhost_2006rebotted.jar` from [here](https://github.com/dginovker/2006rebotted/releases) (or, if testing server changes, compile it yourself like [this](https://i.imgur.com/uDrF0gl.png))
|
||||
- **2:** Download the latest `Provider-version.jar` file from [here](http://v3.bdn.parabot.org/api/bot/download/default-provider?nightly=false)
|
||||
- **3:** Create a file called `localhost.json` in `{user}\Documents\Parabot\servers`
|
||||
- **4:** Put the following in the file
|
||||
|
||||
Reference in New Issue
Block a user