nanos-world / issues

Issue Tracker for nanos world
9 stars 1 forks source link

User can't toggle a stance mode bind once it's set by scripting #996

Closed Timmy-the-nobody closed 9 months ago

Timmy-the-nobody commented 9 months ago

Prerequisites

Your Environment

Description

The key binded to toggle a stance mode becomes unusable for a stance mode that was set by scripting

Steps to reproduce the behavior

1: If you have "lua_run" package, type this in your server console: lua_run Character.GetByIndex(1):SetStanceMode(StanceMode.Crouching) (replace the index by your controlled character index)

2: Then try to press the "Crouch" keybind (it should be broken)

3: Toggle the keybind of another stance mode (like "Prone") will "fix" the issue

This issue isn't only visible with StanceMode.Crouching, if you set the stance mode via scripting to another stance, like StanceMode.Proning, you'll be able to observer the same behaviour (prone toggle locked from client binds)

Expected behavior

The client shouldn't be blocked from toggling it's controlled character stance mode after the stance mode was changed by scripting

Actual behavior

Changing the stance mode of a character via scripting makes the toggle ignore client inputs

gtnardy commented 9 months ago

I did a quick fix for this that will work for now, this whole "Modes" system is quite dirty and would need a big refactor

Timmy-the-nobody commented 8 months ago

I did a quick fix for this that will work for now, this whole "Modes" system is quite dirty and would need a big refactor

Thank you! I'll take a look soon