Skip to content

Update turning circles plugin#10027

Merged
iProdigy merged 2 commits intorunelite:masterfrom
anmcgrath:turning-circles-plugin-start-fix
Dec 31, 2025
Merged

Update turning circles plugin#10027
iProdigy merged 2 commits intorunelite:masterfrom
anmcgrath:turning-circles-plugin-start-fix

Conversation

@anmcgrath
Copy link
Copy Markdown
Contributor

Fix issues with plugin not working when started with player already on their boat by checking varbits every frame.

Fix issues with plugin not working when started with player already on their boat by checking varbits every frame.
@runelite-github-app
Copy link
Copy Markdown

runelite-github-app Bot commented Dec 30, 2025

@runelite-github-app
Copy link
Copy Markdown

runelite-github-app Bot commented Dec 30, 2025

Internal use only: Reviewer details Maintainer details

@iProdigy
Copy link
Copy Markdown
Member

checking varbits every frame

Are you sure this is necessary?

could you first try making the boolean volatile and/or checking every ClientTick instead

Set varbits once on startup and then only when they change
@anmcgrath
Copy link
Copy Markdown
Contributor Author

Hi @iProdigy I went back and revisited - now only setting on startup and then when they change.

I'm new to plugin development, is checking varbits each frame quite expensive? Appreciate your help.

@iProdigy
Copy link
Copy Markdown
Member

Hi @iProdigy I went back and revisited - now only setting on startup and then when they change.

Thank you

I'm new to plugin development, is checking varbits each frame quite expensive? Appreciate your help.

It's cheap (constant-time lookup from the getVarps array), but the first step (obtaining VarbitComposition) should be done from the client thread (and then the array lookup & bit shifting is fine to do per frame)... though the VarbitChanged approach is cleaner
https://github.com/runelite/wiki/blob/master/VarPlayers%2C-VarBits%2C-and-VarClients.md#how-varbits-work-internally

@iProdigy iProdigy merged commit 8dc78cd into runelite:master Dec 31, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants