SC_AngelScript icon indicating copy to clipboard operation
SC_AngelScript copied to clipboard

Make Cvar methods const

Open fnky opened this issue 9 years ago • 0 comments

The Cvar class methods are non-const, preventing them from being called if you have a const handle to an instance. Cvar is the native cvar class, not the Angelscript version.

See AngelScript CVarGetPointer bug?

Also consider adding helper methods to set the value for cvars directly by passing them through to enginefuncs_t::pfnCvar_DirectSet. Providing a helper method to convert to float would be nice.

Reported by Duko.

fnky avatar Feb 09 '17 23:02 fnky