diff --git a/client/zoneCreator.lua b/client/zoneCreator.lua index 616fa2a..db4baa2 100644 --- a/client/zoneCreator.lua +++ b/client/zoneCreator.lua @@ -235,9 +235,8 @@ function zoneCreator.freecamMode(bool) end end -RegisterCommand('+usePoint', function() +local function usePoint() if not zoneCreator.active then return end - if not zoneCreator.cursor then return end if zoneCreator.deleteIndex then @@ -245,19 +244,20 @@ RegisterCommand('+usePoint', function() else zoneCreator.addPoint(zoneCreator.cursor) end -end, false) +end +RegisterCommand('+usePoint', usePoint, false) +RegisterCommand('-usePoint', usePoint, false) +RegisterKeyMapping('+usePoint', 'Add/Remove Point', 'keyboard', 'c') -RegisterCommand('+editPoint', function() +local function editPoint() if not zoneCreator.active then return end if not zoneCreator.cursor then return end - zoneCreator.editPoint() - -end, false) - +end +RegisterCommand('+editPoint', editPoint, false) +RegisterCommand('-editPoint', editPoint, false) RegisterKeyMapping('+editPoint', 'edit Point', 'keyboard', 'k') -RegisterKeyMapping('+usePoint', 'Add/Remove Point', 'keyboard', 'c') local function polyCreator() zoneCreator.freecamMode(false) @@ -363,4 +363,4 @@ end return { mloDoor = mloDoor, polyCreator = polyCreator -} \ No newline at end of file +}