runelite-api: add getConvexHull to Actor
This commit is contained in:
@@ -68,4 +68,6 @@ public interface Actor extends Renderable
|
||||
* Returns the logical height of the actor's model. This is roughly where the health bar is drawn.
|
||||
*/
|
||||
int getLogicalHeight();
|
||||
|
||||
Polygon getConvexHull();
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ import net.runelite.rs.api.RSCombatInfo1;
|
||||
import net.runelite.rs.api.RSCombatInfo2;
|
||||
import net.runelite.rs.api.RSCombatInfoList;
|
||||
import net.runelite.rs.api.RSCombatInfoListHolder;
|
||||
import net.runelite.rs.api.RSModel;
|
||||
import net.runelite.rs.api.RSNode;
|
||||
|
||||
@Mixin(RSActor.class)
|
||||
@@ -188,4 +189,16 @@ public abstract class RSActorMixin implements RSActor
|
||||
graphicChanged.setActor(this);
|
||||
eventBus.post(graphicChanged);
|
||||
}
|
||||
|
||||
@Inject
|
||||
@Override
|
||||
public Polygon getConvexHull()
|
||||
{
|
||||
RSModel model = getModel();
|
||||
if (model == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return model.getConvexHull(getX(), getY(), getOrientation());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user