Merge branch 'master' of https://github.com/runelite/runelite
Conflicts: cache-client/pom.xml cache-updater/pom.xml cache/pom.xml pom.xml runelite-api/pom.xml runelite-api/src/main/java/net/runelite/api/GraphicID.java runelite-client/pom.xml runelite-jshell/pom.xml runelite-script-assembler-plugin/pom.xml
This commit is contained in:
@@ -61,6 +61,8 @@ public final class GraphicID
|
||||
public static final int XERIC_TELEPORT = 1612;
|
||||
public static final int GRAPHICS_OBJECT_ROCKFALL = 1727;
|
||||
public static final int ZALCANO_PROJECTILE_FIREBALL = 1728;
|
||||
public static final int CANNONBALL_OR = 2018;
|
||||
public static final int GRANITE_CANNONBALL_OR = 2019;
|
||||
|
||||
public static final int LIZARDMAN_SHAMAN_AOE = 1293;
|
||||
public static final int CRAZY_ARCHAEOLOGIST_AOE = 1260;
|
||||
|
||||
@@ -60,11 +60,9 @@ public interface GraphicsObject extends Renderable
|
||||
int getLevel();
|
||||
|
||||
/**
|
||||
* Gets the height of the graphic.
|
||||
*
|
||||
* @return the height
|
||||
* Gets the z coordinate
|
||||
*/
|
||||
int getHeight();
|
||||
int getZ();
|
||||
|
||||
/**
|
||||
* Checks if this spotanim is done animating
|
||||
|
||||
@@ -43,6 +43,7 @@ import net.runelite.api.geometry.SimplePolygon;
|
||||
import net.runelite.api.model.Jarvis;
|
||||
import net.runelite.api.widgets.Widget;
|
||||
import net.runelite.api.widgets.WidgetInfo;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* A utility class containing methods to help with conversion between
|
||||
@@ -678,21 +679,19 @@ public class Perspective
|
||||
* @param client the game client
|
||||
* @param model the model to calculate a clickbox for
|
||||
* @param orientation the orientation of the model (0-2048, where 0 is north)
|
||||
* @param point the coordinate of the tile
|
||||
* @param x x coord in local space
|
||||
* @param z y coord in local space
|
||||
* @return the clickable area of the model
|
||||
*/
|
||||
@Nullable
|
||||
public static Shape getClickbox(@Nonnull Client client, Model model, int orientation, LocalPoint point)
|
||||
@ApiStatus.Internal
|
||||
public static Shape getClickbox(@Nonnull Client client, Model model, int orientation, int x, int y, int z)
|
||||
{
|
||||
if (model == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
int x = point.getX();
|
||||
int y = point.getY();
|
||||
int z = getTileHeight(client, point, client.getPlane());
|
||||
|
||||
SimplePolygon bounds = calculateAABB(client, model, orientation, x, y, z);
|
||||
|
||||
if (bounds == null)
|
||||
|
||||
@@ -51,6 +51,11 @@ public interface TileObject extends Locatable
|
||||
*/
|
||||
int getY();
|
||||
|
||||
/**
|
||||
* Gets the vertical coordinate of this object
|
||||
*/
|
||||
int getZ();
|
||||
|
||||
/**
|
||||
* Gets the plane of the tile that the object is on.
|
||||
*/
|
||||
|
||||
@@ -49,6 +49,7 @@ import java.security.NoSuchAlgorithmException;
|
||||
import java.security.SecureRandom;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Stream;
|
||||
@@ -169,6 +170,10 @@ public class RuneLite
|
||||
@Nullable
|
||||
private Client client;
|
||||
|
||||
@Inject
|
||||
@Nullable
|
||||
private RuntimeConfig runtimeConfig;
|
||||
|
||||
public static void main(String[] args) throws Exception
|
||||
{
|
||||
Locale.setDefault(Locale.ENGLISH);
|
||||
@@ -344,6 +349,8 @@ public class RuneLite
|
||||
injector.injectMembers(client);
|
||||
}
|
||||
|
||||
setupSystemProps();
|
||||
|
||||
// Start the applet
|
||||
if (applet != null)
|
||||
{
|
||||
@@ -639,4 +646,19 @@ public class RuneLite
|
||||
log.warn("unable to copy jagexcache", e);
|
||||
}
|
||||
}
|
||||
|
||||
private void setupSystemProps()
|
||||
{
|
||||
if (runtimeConfig == null || runtimeConfig.getSysProps() == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for (Map.Entry<String, String> entry : runtimeConfig.getSysProps().entrySet())
|
||||
{
|
||||
String key = entry.getKey(), value = entry.getValue();
|
||||
log.debug("Setting property {}={}", key, value);
|
||||
System.setProperty(key, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,4 +32,5 @@ import lombok.Data;
|
||||
public class RuntimeConfig
|
||||
{
|
||||
private Map<String, ?> props = Collections.emptyMap();
|
||||
private Map<String, String> sysProps = Collections.emptyMap();
|
||||
}
|
||||
@@ -105,6 +105,7 @@ public enum ItemMapping
|
||||
ITEM_RUNE_SCIMITAR_ORNAMENT_KIT_ZAMORAK(RUNE_SCIMITAR_ORNAMENT_KIT_ZAMORAK, RUNE_SCIMITAR_23334),
|
||||
ITEM_RUNE_DEFENDER(RUNE_DEFENDER, RUNE_DEFENDER_T),
|
||||
ITEM_RUNE_DEFENDER_ORNAMENT_KIT(RUNE_DEFENDER_ORNAMENT_KIT, RUNE_DEFENDER_T),
|
||||
ITEM_RUNE_CROSSBOW(RUNE_CROSSBOW, RUNE_CROSSBOW_OR),
|
||||
|
||||
// Godsword ornament kits
|
||||
ITEM_ARMADYL_GODSWORD(ARMADYL_GODSWORD, ARMADYL_GODSWORD_OR),
|
||||
@@ -130,6 +131,21 @@ public enum ItemMapping
|
||||
ITEM_BERSERKER_NECKLACE(BERSERKER_NECKLACE, BERSERKER_NECKLACE_OR),
|
||||
ITEM_BERSERKER_NECKLACE_ORNAMENT_KIT(BERSERKER_NECKLACE_ORNAMENT_KIT, BERSERKER_NECKLACE_OR),
|
||||
|
||||
// Other ornament kits
|
||||
ITEM_SHATTERED_RELICS_VARIETY_ORNAMENT_KIT(SHATTERED_RELICS_VARIETY_ORNAMENT_KIT, RUNE_CROSSBOW_OR, ABYSSAL_TENTACLE_OR, ABYSSAL_WHIP_OR, BOOK_OF_BALANCE_OR, BOOK_OF_DARKNESS_OR, BOOK_OF_LAW_OR, BOOK_OF_WAR_OR, HOLY_BOOK_OR, UNHOLY_BOOK_OR),
|
||||
ITEM_SHATTERED_RELICS_VOID_ORNAMENT_KIT(SHATTERED_RELICS_VOID_ORNAMENT_KIT, ELITE_VOID_TOP_OR, ELITE_VOID_ROBE_OR, VOID_KNIGHT_TOP_OR, VOID_KNIGHT_ROBE_OR, VOID_KNIGHT_GLOVES_OR, VOID_MAGE_HELM_OR, VOID_MELEE_HELM_OR, VOID_RANGER_HELM_OR),
|
||||
ITEM_MYSTIC_BOOTS(MYSTIC_BOOTS, MYSTIC_BOOTS_OR),
|
||||
ITEM_MYSTIC_GLOVES(MYSTIC_GLOVES, MYSTIC_GLOVES_OR),
|
||||
ITEM_MYSTIC_HAT(MYSTIC_HAT, MYSTIC_HAT_OR),
|
||||
ITEM_MYSTIC_ROBE_BOTTOM(MYSTIC_ROBE_BOTTOM, MYSTIC_ROBE_BOTTOM_OR),
|
||||
ITEM_MYSTIC_ROBE_TOP(MYSTIC_ROBE_TOP, MYSTIC_ROBE_TOP_OR),
|
||||
ITEM_SHATTERED_RELICS_MYSTIC_ORNAMENT_KIT(SHATTERED_RELICS_MYSTIC_ORNAMENT_KIT, MYSTIC_BOOTS_OR, MYSTIC_GLOVES_OR, MYSTIC_HAT_OR, MYSTIC_ROBE_BOTTOM_OR, MYSTIC_ROBE_TOP_OR),
|
||||
ITEM_CANNON_BARRELS(CANNON_BARRELS, CANNON_BARRELS_OR),
|
||||
ITEM_CANNON_BASE(CANNON_BASE, CANNON_BASE_OR),
|
||||
ITEM_CANNON_FURNACE(CANNON_FURNACE, CANNON_FURNACE_OR),
|
||||
ITEM_CANNON_STAND(CANNON_STAND, CANNON_STAND_OR),
|
||||
ITEM_SHATTERED_CANNON_ORNAMENT_KIT(SHATTERED_CANNON_ORNAMENT_KIT, CANNON_BARRELS_OR, CANNON_BASE_OR, CANNON_FURNACE_OR, CANNON_STAND_OR),
|
||||
|
||||
// Ensouled heads
|
||||
ITEM_ENSOULED_GOBLIN_HEAD(ENSOULED_GOBLIN_HEAD_13448, ENSOULED_GOBLIN_HEAD),
|
||||
ITEM_ENSOULED_MONKEY_HEAD(ENSOULED_MONKEY_HEAD_13451, ENSOULED_MONKEY_HEAD),
|
||||
@@ -181,8 +197,8 @@ public enum ItemMapping
|
||||
ITEM_GAMES_NECKLACE(GAMES_NECKLACE8, GAMES_NECKLACE1, GAMES_NECKLACE2, GAMES_NECKLACE3, GAMES_NECKLACE4, GAMES_NECKLACE5, GAMES_NECKLACE6, GAMES_NECKLACE7),
|
||||
|
||||
// Degradable/charged weaponry/armour
|
||||
ITEM_ABYSSAL_WHIP(ABYSSAL_WHIP, VOLCANIC_ABYSSAL_WHIP, FROZEN_ABYSSAL_WHIP),
|
||||
ITEM_KRAKEN_TENTACLE(KRAKEN_TENTACLE, ABYSSAL_TENTACLE),
|
||||
ITEM_ABYSSAL_WHIP(ABYSSAL_WHIP, VOLCANIC_ABYSSAL_WHIP, FROZEN_ABYSSAL_WHIP, ABYSSAL_WHIP_OR),
|
||||
ITEM_KRAKEN_TENTACLE(KRAKEN_TENTACLE, ABYSSAL_TENTACLE, ABYSSAL_TENTACLE_OR),
|
||||
ITEM_TRIDENT_OF_THE_SEAS(UNCHARGED_TRIDENT, TRIDENT_OF_THE_SEAS),
|
||||
ITEM_TRIDENT_OF_THE_SEAS_E(UNCHARGED_TRIDENT_E, TRIDENT_OF_THE_SEAS_E),
|
||||
ITEM_TRIDENT_OF_THE_SWAMP(UNCHARGED_TOXIC_TRIDENT, TRIDENT_OF_THE_SWAMP),
|
||||
|
||||
@@ -34,6 +34,7 @@ import net.runelite.api.Perspective;
|
||||
import static net.runelite.api.Perspective.LOCAL_TILE_SIZE;
|
||||
import net.runelite.api.Point;
|
||||
import net.runelite.api.coords.LocalPoint;
|
||||
import net.runelite.api.coords.WorldPoint;
|
||||
import net.runelite.client.ui.overlay.Overlay;
|
||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||
import net.runelite.client.ui.overlay.OverlayPriority;
|
||||
@@ -66,7 +67,9 @@ class CannonOverlay extends Overlay
|
||||
return null;
|
||||
}
|
||||
|
||||
LocalPoint cannonPoint = LocalPoint.fromWorld(client, plugin.getCannonPosition());
|
||||
// WorldAreas return the SW point, whereas we want the centre point
|
||||
WorldPoint cannonLocation = plugin.getCannonPosition().toWorldPoint().dx(1).dy(1);
|
||||
LocalPoint cannonPoint = LocalPoint.fromWorld(client, cannonLocation);
|
||||
|
||||
if (cannonPoint == null)
|
||||
{
|
||||
|
||||
@@ -24,10 +24,12 @@
|
||||
*/
|
||||
package net.runelite.client.plugins.cannon;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.inject.Provides;
|
||||
import java.awt.Color;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import javax.inject.Inject;
|
||||
@@ -37,18 +39,17 @@ import net.runelite.api.ChatMessageType;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.GameObject;
|
||||
import net.runelite.api.GameState;
|
||||
import static net.runelite.api.GraphicID.CANNONBALL;
|
||||
import static net.runelite.api.GraphicID.GRANITE_CANNONBALL;
|
||||
import net.runelite.api.GraphicID;
|
||||
import net.runelite.api.InventoryID;
|
||||
import net.runelite.api.Item;
|
||||
import net.runelite.api.ItemContainer;
|
||||
import net.runelite.api.ItemID;
|
||||
import net.runelite.api.MenuAction;
|
||||
import net.runelite.api.ObjectID;
|
||||
import static net.runelite.api.ObjectID.CANNON_BASE;
|
||||
import net.runelite.api.Player;
|
||||
import net.runelite.api.Projectile;
|
||||
import net.runelite.api.coords.LocalPoint;
|
||||
import net.runelite.api.coords.WorldArea;
|
||||
import net.runelite.api.coords.WorldPoint;
|
||||
import net.runelite.api.events.ChatMessage;
|
||||
import net.runelite.api.events.GameObjectSpawned;
|
||||
@@ -79,6 +80,11 @@ public class CannonPlugin extends Plugin
|
||||
static final int MAX_OVERLAY_DISTANCE = 4100;
|
||||
static final int MAX_CBALLS = 30;
|
||||
|
||||
private static final Set<Integer> CANNONBALL_PROJECTILE_IDS = ImmutableSet.of(
|
||||
GraphicID.CANNONBALL, GraphicID.GRANITE_CANNONBALL,
|
||||
GraphicID.CANNONBALL_OR, GraphicID.GRANITE_CANNONBALL_OR
|
||||
);
|
||||
|
||||
private CannonCounter counter;
|
||||
private boolean skipProjectileCheckThisTick;
|
||||
private boolean cannonBallNotificationSent;
|
||||
@@ -92,7 +98,7 @@ public class CannonPlugin extends Plugin
|
||||
private boolean cannonPlaced;
|
||||
|
||||
@Getter
|
||||
private WorldPoint cannonPosition;
|
||||
private WorldArea cannonPosition;
|
||||
|
||||
@Getter
|
||||
private int cannonWorld = -1;
|
||||
@@ -185,15 +191,19 @@ public class CannonPlugin extends Plugin
|
||||
switch (item.getId())
|
||||
{
|
||||
case ItemID.CANNON_BASE:
|
||||
case ItemID.CANNON_BASE_OR:
|
||||
hasBase = true;
|
||||
break;
|
||||
case ItemID.CANNON_STAND:
|
||||
case ItemID.CANNON_STAND_OR:
|
||||
hasStand = true;
|
||||
break;
|
||||
case ItemID.CANNON_BARRELS:
|
||||
case ItemID.CANNON_BARRELS_OR:
|
||||
hasBarrels = true;
|
||||
break;
|
||||
case ItemID.CANNON_FURNACE:
|
||||
case ItemID.CANNON_FURNACE_OR:
|
||||
hasFurnace = true;
|
||||
break;
|
||||
}
|
||||
@@ -253,12 +263,12 @@ public class CannonPlugin extends Plugin
|
||||
GameObject gameObject = event.getGameObject();
|
||||
|
||||
Player localPlayer = client.getLocalPlayer();
|
||||
if (gameObject.getId() == CANNON_BASE && !cannonPlaced)
|
||||
if ((gameObject.getId() == ObjectID.CANNON_BASE || gameObject.getId() == ObjectID.CANNON_BASE_43029) && !cannonPlaced)
|
||||
{
|
||||
if (localPlayer.getWorldLocation().distanceTo(gameObject.getWorldLocation()) <= 2
|
||||
&& localPlayer.getAnimation() == AnimationID.BURYING_BONES)
|
||||
{
|
||||
cannonPosition = gameObject.getWorldLocation();
|
||||
cannonPosition = buildCannonWorldArea(gameObject.getWorldLocation());
|
||||
cannonWorld = client.getWorld();
|
||||
cannon = gameObject;
|
||||
}
|
||||
@@ -268,7 +278,7 @@ public class CannonPlugin extends Plugin
|
||||
@Subscribe
|
||||
public void onMenuOptionClicked(MenuOptionClicked event)
|
||||
{
|
||||
if (cannonPosition != null || event.getId() != ObjectID.DWARF_MULTICANNON)
|
||||
if (cannonPosition != null || (event.getId() != ObjectID.DWARF_MULTICANNON && event.getId() != ObjectID.DWARF_MULTICANNON_43027))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -303,12 +313,12 @@ public class CannonPlugin extends Plugin
|
||||
{
|
||||
Projectile projectile = event.getProjectile();
|
||||
|
||||
if ((projectile.getId() == CANNONBALL || projectile.getId() == GRANITE_CANNONBALL) && cannonPosition != null && cannonWorld == client.getWorld())
|
||||
if (CANNONBALL_PROJECTILE_IDS.contains(projectile.getId()) && cannonPosition != null && cannonWorld == client.getWorld())
|
||||
{
|
||||
WorldPoint projectileLoc = WorldPoint.fromLocal(client, projectile.getX1(), projectile.getY1(), client.getPlane());
|
||||
|
||||
//Check to see if projectile x,y is 0 else it will continuously decrease while ball is flying.
|
||||
if (projectileLoc.equals(cannonPosition) && projectile.getX() == 0 && projectile.getY() == 0)
|
||||
if (cannonPosition.contains(projectileLoc) && projectile.getX() == 0 && projectile.getY() == 0)
|
||||
{
|
||||
// When there's a chat message about cannon reloaded/unloaded/out of ammo,
|
||||
// the message event runs before the projectile event. However they run
|
||||
@@ -393,7 +403,7 @@ public class CannonPlugin extends Plugin
|
||||
cannonPlaced = true;
|
||||
cannonWorld = client.getWorld();
|
||||
cannon = objects[0];
|
||||
cannonPosition = cannon.getWorldLocation();
|
||||
cannonPosition = buildCannonWorldArea(cannon.getWorldLocation());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -514,4 +524,9 @@ public class CannonPlugin extends Plugin
|
||||
infoBoxManager.removeInfoBox(counter);
|
||||
counter = null;
|
||||
}
|
||||
|
||||
private static WorldArea buildCannonWorldArea(WorldPoint worldPoint)
|
||||
{
|
||||
return new WorldArea(worldPoint.getX() - 1, worldPoint.getY() - 1, 3, 3, worldPoint.getPlane());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,8 +26,11 @@ package net.runelite.client.plugins.gpu;
|
||||
|
||||
import com.google.common.primitives.Ints;
|
||||
import com.google.inject.Provides;
|
||||
import com.jogamp.nativewindow.AbstractGraphicsConfiguration;
|
||||
import com.jogamp.nativewindow.NativeWindowFactory;
|
||||
import com.jogamp.nativewindow.awt.AWTGraphicsConfiguration;
|
||||
import com.jogamp.nativewindow.awt.JAWTWindow;
|
||||
import com.jogamp.opengl.DebugGL4;
|
||||
import com.jogamp.opengl.GL;
|
||||
import static com.jogamp.opengl.GL.GL_ARRAY_BUFFER;
|
||||
import static com.jogamp.opengl.GL.GL_DYNAMIC_DRAW;
|
||||
@@ -64,7 +67,6 @@ import javax.swing.SwingUtilities;
|
||||
import jogamp.nativewindow.SurfaceScaleUtils;
|
||||
import jogamp.nativewindow.jawt.x11.X11JAWTWindow;
|
||||
import jogamp.nativewindow.macosx.OSXUtil;
|
||||
import jogamp.newt.awt.NewtFactoryAWT;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.BufferProvider;
|
||||
import net.runelite.api.Client;
|
||||
@@ -380,7 +382,7 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
|
||||
GLCapabilities glCaps = new GLCapabilities(glProfile);
|
||||
AWTGraphicsConfiguration config = AWTGraphicsConfiguration.create(canvas.getGraphicsConfiguration(), glCaps, glCaps);
|
||||
|
||||
jawtWindow = NewtFactoryAWT.getNativeWindow(canvas, config);
|
||||
jawtWindow = (JAWTWindow) NativeWindowFactory.getNativeWindow(canvas, config);
|
||||
canvas.setFocusable(true);
|
||||
|
||||
GLDrawableFactory glDrawableFactory = GLDrawableFactory.getFactory(glProfile);
|
||||
@@ -417,10 +419,17 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
|
||||
|
||||
this.gl = glContext.getGL().getGL4();
|
||||
|
||||
setupSyncMode();
|
||||
|
||||
if (log.isDebugEnabled())
|
||||
{
|
||||
try
|
||||
{
|
||||
gl = new DebugGL4(gl);
|
||||
}
|
||||
catch (NoClassDefFoundError ex)
|
||||
{
|
||||
log.debug("Disabling DebugGL due to jogl-gldesktop-dbg not being present on the classpath");
|
||||
}
|
||||
|
||||
gl.glEnable(gl.GL_DEBUG_OUTPUT);
|
||||
|
||||
// GLDebugEvent[ id 0x20071
|
||||
@@ -440,6 +449,8 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
|
||||
gl.GL_DONT_CARE, 1, new int[]{0x20052}, 0, false);
|
||||
}
|
||||
|
||||
setupSyncMode();
|
||||
|
||||
initVao();
|
||||
try
|
||||
{
|
||||
@@ -547,7 +558,9 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
|
||||
// we'll just leak the window...
|
||||
if (OSType.getOSType() != OSType.MacOS)
|
||||
{
|
||||
NewtFactoryAWT.destroyNativeWindow(jawtWindow);
|
||||
final AbstractGraphicsConfiguration config = jawtWindow.getGraphicsConfiguration();
|
||||
jawtWindow.destroy();
|
||||
config.getScreen().getDevice().close();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -35,7 +35,6 @@ import java.util.Objects;
|
||||
import javax.inject.Singleton;
|
||||
import jogamp.opengl.GLContextImpl;
|
||||
import jogamp.opengl.GLDrawableImpl;
|
||||
import jogamp.opengl.egl.EGLContext;
|
||||
import jogamp.opengl.macosx.cgl.CGL;
|
||||
import jogamp.opengl.windows.wgl.WindowsWGLContext;
|
||||
import jogamp.opengl.x11.glx.X11GLXContext;
|
||||
@@ -306,12 +305,6 @@ class OpenCLManager
|
||||
contextProps.addProperty(CL_GL_CONTEXT_KHR, glContextHandle);
|
||||
contextProps.addProperty(CL_WGL_HDC_KHR, surfaceHandle);
|
||||
}
|
||||
else if (glContext instanceof EGLContext)
|
||||
{
|
||||
long displayHandle = nativeSurface.getDisplayHandle();
|
||||
contextProps.addProperty(CL_GL_CONTEXT_KHR, glContextHandle);
|
||||
contextProps.addProperty(CL_EGL_DISPLAY_KHR, displayHandle);
|
||||
}
|
||||
|
||||
log.debug("Creating context with props: {}", contextProps);
|
||||
context = clCreateContext(contextProps, 1, new cl_device_id[]{device}, null, null, null);
|
||||
|
||||
@@ -1016,15 +1016,13 @@ public class ModelOutlineRenderer
|
||||
|
||||
private void drawOutline(GameObject gameObject, int outlineWidth, Color color, int feather)
|
||||
{
|
||||
LocalPoint lp = gameObject.getLocalLocation();
|
||||
Renderable renderable = gameObject.getRenderable();
|
||||
if (renderable != null)
|
||||
{
|
||||
Model model = renderable instanceof Model ? (Model) renderable : renderable.getModel();
|
||||
if (model != null)
|
||||
{
|
||||
drawModelOutline(model, lp.getX(), lp.getY(),
|
||||
Perspective.getTileHeight(client, lp, gameObject.getPlane()),
|
||||
drawModelOutline(model, gameObject.getX(), gameObject.getY(), gameObject.getZ(),
|
||||
gameObject.getModelOrientation(), outlineWidth, color, feather);
|
||||
}
|
||||
}
|
||||
@@ -1032,15 +1030,13 @@ public class ModelOutlineRenderer
|
||||
|
||||
private void drawOutline(GroundObject groundObject, int outlineWidth, Color color, int feather)
|
||||
{
|
||||
LocalPoint lp = groundObject.getLocalLocation();
|
||||
Renderable renderable = groundObject.getRenderable();
|
||||
if (renderable != null)
|
||||
{
|
||||
Model model = renderable instanceof Model ? (Model) renderable : renderable.getModel();
|
||||
if (model != null)
|
||||
{
|
||||
drawModelOutline(model, lp.getX(), lp.getY(),
|
||||
Perspective.getTileHeight(client, lp, client.getPlane()),
|
||||
drawModelOutline(model, groundObject.getX(), groundObject.getY(), groundObject.getZ(),
|
||||
0, outlineWidth, color, feather);
|
||||
}
|
||||
}
|
||||
@@ -1048,16 +1044,13 @@ public class ModelOutlineRenderer
|
||||
|
||||
private void drawOutline(ItemLayer itemLayer, int outlineWidth, Color color, int feather)
|
||||
{
|
||||
LocalPoint lp = itemLayer.getLocalLocation();
|
||||
|
||||
Renderable bottomRenderable = itemLayer.getBottom();
|
||||
if (bottomRenderable != null)
|
||||
{
|
||||
Model model = bottomRenderable instanceof Model ? (Model) bottomRenderable : bottomRenderable.getModel();
|
||||
if (model != null)
|
||||
{
|
||||
drawModelOutline(model, lp.getX(), lp.getY(),
|
||||
Perspective.getTileHeight(client, lp, itemLayer.getPlane()) - itemLayer.getHeight(),
|
||||
drawModelOutline(model, itemLayer.getX(), itemLayer.getY(), itemLayer.getZ() - itemLayer.getHeight(),
|
||||
0, outlineWidth, color, feather);
|
||||
}
|
||||
}
|
||||
@@ -1068,8 +1061,7 @@ public class ModelOutlineRenderer
|
||||
Model model = middleRenderable instanceof Model ? (Model) middleRenderable : middleRenderable.getModel();
|
||||
if (model != null)
|
||||
{
|
||||
drawModelOutline(model, lp.getX(), lp.getY(),
|
||||
Perspective.getTileHeight(client, lp, itemLayer.getPlane()) - itemLayer.getHeight(),
|
||||
drawModelOutline(model, itemLayer.getX(), itemLayer.getY(), itemLayer.getZ() - itemLayer.getHeight(),
|
||||
0, outlineWidth, color, feather);
|
||||
}
|
||||
}
|
||||
@@ -1080,8 +1072,7 @@ public class ModelOutlineRenderer
|
||||
Model model = topRenderable instanceof Model ? (Model) topRenderable : topRenderable.getModel();
|
||||
if (model != null)
|
||||
{
|
||||
drawModelOutline(model, lp.getX(), lp.getY(),
|
||||
Perspective.getTileHeight(client, lp, itemLayer.getPlane()) - itemLayer.getHeight(),
|
||||
drawModelOutline(model, itemLayer.getX(), itemLayer.getY(), itemLayer.getZ() - itemLayer.getHeight(),
|
||||
0, outlineWidth, color, feather);
|
||||
}
|
||||
}
|
||||
@@ -1089,8 +1080,6 @@ public class ModelOutlineRenderer
|
||||
|
||||
private void drawOutline(DecorativeObject decorativeObject, int outlineWidth, Color color, int feather)
|
||||
{
|
||||
LocalPoint lp = decorativeObject.getLocalLocation();
|
||||
|
||||
Renderable renderable1 = decorativeObject.getRenderable();
|
||||
if (renderable1 != null)
|
||||
{
|
||||
@@ -1098,9 +1087,9 @@ public class ModelOutlineRenderer
|
||||
if (model != null)
|
||||
{
|
||||
drawModelOutline(model,
|
||||
lp.getX() + decorativeObject.getXOffset(),
|
||||
lp.getY() + decorativeObject.getYOffset(),
|
||||
Perspective.getTileHeight(client, lp, decorativeObject.getPlane()),
|
||||
decorativeObject.getX() + decorativeObject.getXOffset(),
|
||||
decorativeObject.getY() + decorativeObject.getYOffset(),
|
||||
decorativeObject.getZ(),
|
||||
0, outlineWidth, color, feather);
|
||||
}
|
||||
}
|
||||
@@ -1112,8 +1101,7 @@ public class ModelOutlineRenderer
|
||||
if (model != null)
|
||||
{
|
||||
// Offset is not used for the second model
|
||||
drawModelOutline(model, lp.getX(), lp.getY(),
|
||||
Perspective.getTileHeight(client, lp, decorativeObject.getPlane()),
|
||||
drawModelOutline(model, decorativeObject.getX(), decorativeObject.getY(), decorativeObject.getZ(),
|
||||
0, outlineWidth, color, feather);
|
||||
}
|
||||
}
|
||||
@@ -1121,16 +1109,13 @@ public class ModelOutlineRenderer
|
||||
|
||||
private void drawOutline(WallObject wallObject, int outlineWidth, Color color, int feather)
|
||||
{
|
||||
LocalPoint lp = wallObject.getLocalLocation();
|
||||
|
||||
Renderable renderable1 = wallObject.getRenderable1();
|
||||
if (renderable1 != null)
|
||||
{
|
||||
Model model = renderable1 instanceof Model ? (Model) renderable1 : renderable1.getModel();
|
||||
if (model != null)
|
||||
{
|
||||
drawModelOutline(model, lp.getX(), lp.getY(),
|
||||
Perspective.getTileHeight(client, lp, wallObject.getPlane()),
|
||||
drawModelOutline(model, wallObject.getX(), wallObject.getY(), wallObject.getZ(),
|
||||
0, outlineWidth, color, feather);
|
||||
}
|
||||
}
|
||||
@@ -1141,8 +1126,7 @@ public class ModelOutlineRenderer
|
||||
Model model = renderable2 instanceof Model ? (Model) renderable2 : renderable2.getModel();
|
||||
if (model != null)
|
||||
{
|
||||
drawModelOutline(model, lp.getX(), lp.getY(),
|
||||
Perspective.getTileHeight(client, lp, wallObject.getPlane()),
|
||||
drawModelOutline(model, wallObject.getX(), wallObject.getY(), wallObject.getZ(),
|
||||
0, outlineWidth, color, feather);
|
||||
}
|
||||
}
|
||||
@@ -1180,7 +1164,7 @@ public class ModelOutlineRenderer
|
||||
Model model = graphicsObject.getModel();
|
||||
if (model != null)
|
||||
{
|
||||
drawModelOutline(model, lp.getX(), lp.getY(), graphicsObject.getHeight(),
|
||||
drawModelOutline(model, lp.getX(), lp.getY(), graphicsObject.getZ(),
|
||||
0, outlineWidth, color, feather);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3410,5 +3410,15 @@
|
||||
"z1": 1,
|
||||
"z2": 1
|
||||
}
|
||||
],
|
||||
"11830": [ // Goblin Village & mind altar
|
||||
{ // Grim Tales tower
|
||||
"rx1": 21,
|
||||
"ry1": 10,
|
||||
"rx2": 27,
|
||||
"ry2": 15,
|
||||
"z1": 2,
|
||||
"z2": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user