Raptor007 / aq2-tng

Action Quake 2: The Next Generation. Raptor007's sandbox for testing changes. When verified stable, this code is pushed to the official aq2-tng repo:
https://github.com/aq2-tng/aq2-tng/tree/bots
4 stars 2 forks source link

In-game menu instructions #58

Open dynamic0 opened 7 years ago

dynamic0 commented 7 years ago

TNG has in-game-menu with these navigation instructions. Maybe change the keys to actually represent the real bindings of invnext, invprev, inven and invuse since they are not always default, or just remove the instructions completely? menuissue

Raptor007 commented 7 years ago

The AQ2 menu is somewhat unintuitive for new players, so I don't think the instructions should be removed.

The menu is generated by the server, and I don't think it has any way of getting the client's key binds. However, I could make those 3 lines of the menu customizable by the player, so if you rebind the keys you could also update your menu to match. I think that's the best fix possible.

Raptor007 commented 7 years ago

Bad news. I just tried adding a new CVAR_USERINFO variable but it didn't register on the client. I don't think there's any way to get the client to volunteer new information to the server; the list of userinfo variables seems to be hard-coded into the client exe.

It is possible to make a new command like menukeys [ ] ENTER TAB but you would have to execute it on the client after you connect to the server, so you couldn't just add it to your autoexec.cfg. You could do something like bind tab "menukeys [ ] ENTER TAB; inven".

dynamic0 commented 7 years ago

That's unfortunate. I don't like the idea that commands does not work until joining the server (like radiogender)

What I think would be the best, is to make every client use Uparrow, Downarrow, Enter and TAB for navigating. Though there probably would be problems with executing double commands, if one of the keys above has been bound to something else.

Raptor007 commented 7 years ago

The server can't force client keybinds, or even change the defaults. The brackets work because the Quake2 client default binds for those keys are invprev and invnext.

The default binds for uparrow and downarrow are +forward and +back which become positive and negative values of ucmd->forwardmove in ClientThink. In theory it's possible to use that data to move the menu cursor, but it means you wouldn't be able to walk or fly with the menu open (because W and S are also +forward and +back). I don't think this is a good trade-off.

These are the limitations of being a Quake2 mod.