mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-23 19:35:10 -06:00
I am retarded
This commit is contained in:
parent
59edcb5c4f
commit
287f1d04d5
1 changed files with 4 additions and 3 deletions
|
|
@ -11,16 +11,17 @@ import core.net.packet.context.ClearChunkContext;
|
|||
* @author Emperor
|
||||
*/
|
||||
public final class ClearRegionChunk implements OutgoingPacket<ClearChunkContext> {
|
||||
static final int buildAreaDepth = MapChunkRenderer.buildAreaDepth;
|
||||
static final int buildAreaDepthInTiles = (2*MapChunkRenderer.buildAreaDepth+1) * 8;
|
||||
|
||||
@Override
|
||||
public void send(ClearChunkContext context) {
|
||||
Location l = context.getPlayer().getPlayerFlags().getLastSceneGraph();
|
||||
int x = context.getChunk().getCurrentBase().getSceneX(l);
|
||||
int y = context.getChunk().getCurrentBase().getSceneY(l);
|
||||
if (x >= 0 && y >= 0 && x < buildAreaDepth && y < buildAreaDepth) {
|
||||
if (x >= 0 && y >= 0 && x < buildAreaDepthInTiles && y < buildAreaDepthInTiles) {
|
||||
IoBuffer buffer = new IoBuffer(112).put(x).putC(y);
|
||||
buffer.cypherOpcode(context.getPlayer().getSession().getIsaacPair().getOutput());context.getPlayer().getSession().write(buffer);
|
||||
buffer.cypherOpcode(context.getPlayer().getSession().getIsaacPair().getOutput());
|
||||
context.getPlayer().getSession().write(buffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue