Skip to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

model#getArea returns random parts of the model

Featured Replies

  • Developer

1. A description of the issue


Not correctly drawing the model, instead draws a random triangle of the model.


1d7b6308353d6e1d9b7218ffb9e38515.gif


 


2. Are you receiving any errors in the client canvas or the logger?


Nope


 


3. How can you replicate the issue?


Sure use this code:



public void drawEntity(Graphics2D g, Entity entity) {
Model model = entity.getModel();

if (model == null)
return;

Area area = model.getArea(entity.getGridX(), entity.getGridY(), entity.getZ());
g.draw(area);

// this code works
GraphicUtilities.drawModel(getBot(), g, entity.getGridX(), entity.getGridY(), entity.getZ(), model);
}

4. Has this issue persisted through multiple versions? If so, how far back?


No idea how far back.


  • Administrator

The documentation around model areas is lacking. But, model.getArea() returns the area for a random triangle.
You can use GraphicUtilities.getModelArea(Bot bot, int gridX, int gridY, int z, Model model) to calculate the area for the entire model.

  • Author
  • Developer

The documentation around model areas is lacking. But, model.getArea() returns the area for a random triangle.

You can use GraphicUtilities.getModelArea(Bot bot, int gridX, int gridY, int z, Model model) to calculate the area for the entire model.

owkee, gotcha.

  • Author
  • Developer

If you're on v2.4.11, your original code should work. I thought it was stupid to be getting the area of a random triangle and changed it.

 

Ya was wondering the same, I could not see any use for it though :D

You sure no scripts used it? ^^

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.