project-lambdamenu icon indicating copy to clipboard operation
project-lambdamenu copied to clipboard

Add default keybinds

Open NotLazy opened this issue 3 years ago • 3 comments

I encountered an interesting issue today, and spent almost 10 hours trying to find the cause, thinking the problem was one of the resources on my server.

Then, I disabled lambda menu and the problem went away.

What was the problem you might ask?

ENTITY::APPLY_FORCE_TO_ENTITY(...) in script.cpp on line 1726

more specifically, the key press check on line 1718, which was checking for a NULL keypress, due to the default for keyConfig->ragdoll_force being NULL, among many other keybinds.

There's two fixes to this, either a properly configured lm-config.xml or properly defined defaults. I opted to update the codebase to define the defaults, for anyone in the future who might encounter this problem immediately after installing lambda menu.

I have zero clue why this issue only came up today, but it feels like it's important to resolve the issue non-the-less.

The defaults I chose, came from an old lm-config.xml I had on my desktop, which I'm unsure if I modified, or where it came from.

NotLazy avatar May 24 '22 12:05 NotLazy

I don't have time to check this just now but I will get to it. Thank you for spotting the bug and fixing it (even if I've never encountered it myself)

Firecul avatar May 24 '22 14:05 Firecul

Yesterday was my first time ever encountering it in over 3 years of using lambda menu.

Usually I use an lm-config.xml with my install so maybe that’s why I hadn’t found the issue sooner.

No rag doll also causes this issue to go unnoticed.

Before you merge this PR I might add another commit to resolve the root issue on top of the default keybinds.

I only found out lambda was the issue after stopping literally every single resource on my server.

NotLazy avatar May 24 '22 22:05 NotLazy

untested but built without errors, commit 0afe523 completely blocks get_key_pressed(NULL) from passing true.

NotLazy avatar May 24 '22 22:05 NotLazy