Skip to content

use ConVar for wire render toggle#3583

Merged
Astralcircle merged 1 commit intowiremod:masterfrom
VDFOREVER:replace_to_clientconvar
Apr 13, 2026
Merged

use ConVar for wire render toggle#3583
Astralcircle merged 1 commit intowiremod:masterfrom
VDFOREVER:replace_to_clientconvar

Conversation

@VDFOREVER
Copy link
Copy Markdown
Contributor

Drawing wires can take up to 30 fps, I think it's worth replacing with ConVar to maintain the value

@bewflast
Copy link
Copy Markdown

bewflast commented Apr 12, 2026

those changes are not good for performance because :GetBool() is a way, way heavier than just do ~= 0 of a local variable

function Wire_Render is a hot-path code so i think there is a reason for a trick with local var which is modificated through console command instead of using convar abstraction

@Astralcircle
Copy link
Copy Markdown
Contributor

Should be bool instead number, idk why was it done this way. I don't see any big problems with using :GetBool(), so i'm merging PR

@Astralcircle Astralcircle merged commit 7d67118 into wiremod:master Apr 13, 2026
1 check passed
@VDFOREVER VDFOREVER deleted the replace_to_clientconvar branch April 13, 2026 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants