[crossfire] Key repeat and keybindings

Arvid Brodin arvidb at kth.se
Wed Oct 23 19:58:25 CDT 2013


I recently started playing Crossfire (on a private server, together with my girlfriend, if you can believe it! :).

It's a surprisingly addictive game! And we're slowly finding nice features like auto-pickup and -mapscale. So thanks! :)


There are a few things that we are both annoyed with though. One is the key press handling. If I "walk" by holding a direction key, it seems key repeats are queued so that the PC continues to walk long after the button is released. Usually into a trapped door...

Similarly with search: hold down the search key to make a thorough search of the immediate area (say, 4 x 5 searches), and after the key is released, and additional 2 x 5 searches or so are made before the PC can do anything else. The delay is a couple of seconds and makes the client feel really sluggish. This usually happen when something horrible shows up, like a "sweet little girl". (She killed me. Oh, the shame!)

Is there a reason not all buttons are "level-triggered" during non-text-entry? I've taken a look at the code, and it seems the server handles run/fire differently than other commands? 

Also, it would be great to split run into attack and run, so that running into doors does not make one sick (and only trying to open them with "attack" does). (And I accidentally slaughtered a cleaning lady the other day for the same reason.) I.e. only direction key == move (and move only) while pressed. And CTRL modifier for attack, SHIFT for fire, as today.


Another somewhat related thing that really confused me in the beginning are the built-in keybindings. These do not show up in the Keybindings dialog. Somewhere in one of the beginner's maps, I think I was told to bind "use_skill find traps" to something - and I naturally chose 's'. And was told:

"Warning: Keybind search may conflict with new binding."

OK, now just what does that mean?? (I understand it now, but as a complete beginner that was just weird. Hmm, it's still weird - why have two commands for the same thing?) Why not just use default keybindings instead of the built-ins (i.e. if no keybindings file was found)? This would mess things up a bit for people upgrading their client, but should be easily fixed by binding 'a', 's', 'd' etc.



Maybe I can take a look at these things. Would there be interest in patches, or are there reasons things are like they are?


-- 
Arvid


More information about the crossfire mailing list