rebel1324 / NutScript

A free role-play framework for Garry's Mod.
http://nutscript.net
MIT License
65 stars 31 forks source link

Draw 3Dtext same way on single-draw as drawing all #298

Closed blt950 closed 4 years ago

blt950 commented 5 years ago

There has been a issue where the text doesn't look the exact same when you create it, and when you rejoin and get the list of all texts to render. This is because two different methods were used to draw it, where the first one did not support alignY, making texts appear at the wrong place, but then moving when you reconnected.

I just simple made both functions use the same drawing functions to ensure consistency of the displaying of text.

blt950 commented 5 years ago

I'm not so familiar with the used libraries in this plugin, so it's best that someone who knows them fixes the optimization. I just wanted to fix the inconsistency.

brianhang commented 5 years ago

There's some code duplication with setting the onDrawText callback, so a better fix would probably be to move the duplicated code into 1 function and call that instead.

ExtReMLapin commented 5 years ago

This code is slower