Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.

Conversation

@thaibossaw
Copy link

@thaibossaw thaibossaw commented Apr 7, 2025

Currently, ox_target limits the number of sprites being drawn per-frame using the literal value of the ox_target:drawSprite Convar. This is misleading, as the docs indicate the convar is simply used to toggle the drawing on/off, but what it's actually doing is limiting the number of sprites that can be drawn per frame, here:

local drawZoneSprites = GetConvarInt('ox_target:drawSprite', 24)

if drawN <= drawZoneSprites and zone.drawSprite ~= false and (contains or (zone.distance or 7) < 7) then

This is because we set the value of drawZoneSprites to be the exact value of the Convar, meaning if you set the convar to be 1, you end up with an odd behaviour where some sprites within range of other sprites will never show at the same time. See repro in video(s) below:

https://discord.com/channels/813030955598086174/1358472533409534255/1358474412336091187

https://discord.com/channels/813030955598086174/1358472533409534255/1358474678913470645

Looking at the default value for the convar when no value is set, it assumes a value of 24, so it stands to reason that if the convar is set to 1, we should probably set drawZoneSprites to be 24.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant