mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-05 16:49:06 +00:00
Fix most of the clipping (minor stuff with doors left)
This commit is contained in:
@@ -15,6 +15,7 @@ import com.rebotted.game.players.Client;
|
||||
import com.rebotted.game.players.Player;
|
||||
import com.rebotted.game.players.PlayerHandler;
|
||||
import com.rebotted.util.Misc;
|
||||
import com.rebotted.world.clip.Region;
|
||||
|
||||
/**
|
||||
* @author Sanity
|
||||
@@ -135,6 +136,7 @@ public class ObjectHandler {
|
||||
* Creates the object for anyone who is within 60 squares of the object
|
||||
**/
|
||||
public void placeObject(Objects o) {
|
||||
Region.addClipping(o.getObjectX(), o.getObjectY(), o.getObjectHeight(), 0);
|
||||
for (Player p : PlayerHandler.players) {
|
||||
if (p != null) {
|
||||
Client person = (Client) p;
|
||||
|
||||
@@ -289,7 +289,7 @@ public class Region {
|
||||
return projectileClips[height][x - regionAbsX][y - regionAbsY];
|
||||
}
|
||||
|
||||
private static void addClipping(int x, int y, int height, int shift) {
|
||||
public static void addClipping(int x, int y, int height, int shift) {
|
||||
int regionX = x >> 3;
|
||||
int regionY = y >> 3;
|
||||
int regionId = (regionX / 8 << 8) + regionY / 8;
|
||||
|
||||
Reference in New Issue
Block a user