#216 Key binds interfering with cheats (again)

open
nobody
None
5
2012-10-11
2012-10-11
No

An old issue pops up again, this time with the new "fly" cheat. If you have the Quit function bound to the "Y" key, you cannot type "fly".

Discussion

  • Andrey Budko

    Andrey Budko - 2012-10-11

    What do you suggest?

     
  • Tirsa Poppins

    Tirsa Poppins - 2012-10-17

    Prefix all cheat codes with "TNT" (if they aren't already) to be like "tntcomp", for example. Place them into a look-up table. Every time a user enters "TNT" process X key strokes (where X = the length of the longest cheat code minus "TNT") as potential cheat codes, comparing the keys pressed against the look-up table and ignoring any binds (like "Y" = quit) for the length of X. If the sequence of the pressed keys matches a cheat code in the table, execute that code; if it does not match do nothing.
    Or perhaps replace "TNT" with "e6y" if you like. ;)

     
  • Tirsa Poppins

    Tirsa Poppins - 2012-10-17

    Or you can make three look-up tables: one for "id*" codes, one for "tnt*" codes and one for "e6y*" codes. The value of X would seem to be 8 then, as "idchoppers" is probably the longest cheat code.

     
  • Andrey Budko

    Andrey Budko - 2012-10-17

    So I'll not able to move for 8 key strokes after pressing TNT? I switch weapon by these keys, for example.

     
  • Fabian Greffrath

    Hm, this would need a 10 byte (for "idchoppers") ring buffer that saves the last 10 keys pressed and gets checked if it contains a cheat each time a key is released.

     
  • Fabian Greffrath

    Sorry for my last post, this was brain diarrhoe. I was playing the latest SVN snapshot r4303 and believed I suffered the same issue when I played Chex Quest and tried to enter cheats. However, the reason was that the chexdeh lump that changes the cheat strings could not get loaded, because I still had an old version of prboom-plus.wad installed on my system.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks