Skip to content

Calling all Lua consvars

Monster Iestyn requested to merge calling-all-lua-consvars into next

This branch fixes several issues with custom consvars created using CV_RegisterVar in Lua scripts. I originally started out trying to fix CV_CALL consvars with no calling function (hence the branch's punny name) by adding an appropriate error check for that situation, but I decided to add some additional error-checking for:

  • consvars that lack a name to be identified by
  • consvars with CV_NOINIT but without CV_CALL

Additionally, everything in a Lua created consvar struct defaults to zero/nil now if not supplied. Apparently this was not done before, which may have been linked to the original CV_CALL issue I was fixing.

Edited by Monster Iestyn

Merge request reports

Loading