ValveSoftware / halflife

Half-Life 1 engine based games
Other
3.69k stars 622 forks source link

[GoldSource - Minor] Options->Keyboard->Use Defaults button doesn't reset all commands #716

Open ghost opened 11 years ago

ghost commented 11 years ago

You will see an error:

"\\" isn't a valid key

Then do

In after.cfg we won't see:

bind "+" "sizeup"
bind "-" "sizedown"
bind "=" "sizeup"
bind "F10" "quit prompt"

and we will see one extra line

bind "k" "+voicerecord"

Counter-Strike 1.6

In after.cfg we won't see:

bind "+" "sizeup"
bind "-" "sizedown"
bind "=" "sizeup"
bind "i" "showbriefing"
bind "F6" "save quick"
bind "F7" "load quick"
bind "F10" "quit prompt"
bind "PAUSE" "pause"

and we will see one extra line

bind "l" "showbriefing"

Counter-Strike: Condition Zero

In after.cfg we won't see:

bind "+" "sizeup"
bind "-" "sizedown"
bind "=" "sizeup"
bind "F6" "save quick"
bind "F7" "load quick"
bind "F10" "quit prompt"
hAnnahf commented 11 years ago

I guess those commands just got removed and it's just a remnant of it.

ghost commented 11 years ago

Nope. They're working. sizeup and sizedown are working in Software mode

davidw-valve commented 11 years ago

Thanks for the report. This should be fixed in the next release.

ghost commented 11 years ago

Hello. I think you forgot to commit the fix :laughing:

Fixed white bar at the bottom of the screen and low FPS when running a 16-bit desktop under windows 
Fixed crash if you used the swapdemo command incorrectly 
Cleaned up default keybindings 

Crash is fixed, 16-bit issue is fixed (kind of), this issue - I see no difference.

ghost commented 11 years ago

You didn't fix it... I repeat all my steps again

You will see an error:

"\\" isn't a valid key

Then do

Half-Life

In after.cfg we won't see:

bind "+" "sizeup"
bind "-" "sizedown"
bind "=" "sizeup"

two string are different before.cfg

bind "F10" "quit prompt"
bind "END" "centerview"

after.cfg

bind "F10" "quit"
bind "END" "force_centerview"

I think, to fix it, you should correct \common\Half-Life\valve\gfx\shell\kb_def.lst old: https://gist.github.com/MaxKorz/5302175#file-kb_def-lst my suggestion: https://gist.github.com/MaxKorz/5302175#file-kb_def_new-lst

CS, CS:CZ, TFC, etc - same issue

metita commented 5 years ago

This is not fixed. @kisak-valve reopen please.

SamVanheer commented 5 years ago

It is actually mostly fixed. The commands that were removed are useful only in Software mode, so removing the bindings ensures that only commands that work in all renderers have default bindings.

The size commands don't serve much of a purpose anyway. You can already choose from all supported resolutions and even specify a custom resolution using command line parameters. If you need bindings for them you can easily add them yourself.

As far as the other commands go, both center view commands do the same thing. The old command forced the view angles to center immediately whereas the other command will make you automatically aim to center at the speed of the v_centerspeed cvar.

Most of the time you won't even notice the difference.

The quit command no longer supports the prompt argument. There is code to set some globals if there are arguments but nothing happens so the change is likely as a result of that. The WON version does prompt before quitting when quit prompt is used so it did exist before.

That leaves only the error regarding the \\ key not being valid. That entry can be removed to prevent the error from showing in the console.

It is worth noting that the file default.cfg still contains bindings for these commands. It also binds END to centerview, just like the current version of kb_def.lst. This cfg file is never executed (not even in the WON version from the looks of it) so it can be safely ignored.