Bug: Only movement keys work on game start

Get help with installing and running the Cafu Engine here. This forum is also for general questions and discussion of all aspects regarding the Cafu Engine.
SoulRider
Posts: 95
Joined: 2014-04-06, 00:16

Bug: Only movement keys work on game start

Postby SoulRider » 2014-09-28, 16:11

This bug has been in ever since I have been working with Cafu engine, but now I am using my slower laptop, the process is extended, this leads me to believe the problem is related to an update or think issue.

Problem

After pressing fire to spawn, the only keys that work are the movement keys. for a random period of time, but noticably longer on laptop, than it was on my much more powerful desktop, I can not jump, select a weapon, or press tab to bring up the scoreboard. All I can do is run around, mouselook and keyboard look work, but none of the other keys do.

Then after an non-constant period of time, suddenly I can use the keys. I can jump, select weapons and bring up the scoreboard (which still doesn't disappear by the way).

Resolution

Unknown. I have had a look, and I thought it might be due to the position in main loop of initalizing the keys, but I put the scoreboard key in with the movement keys, and it is still affected by the issue. This has been in vanilla cafu since I began testing before the component system was implemented. Is it possible that there is a better key management solution out there? Form what i've seen WXwidgets has a fair few problems.
User avatar
Carsten
Site Admin
Posts: 2130
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: Bug: Only movement keys work on game start

Postby Carsten » 2014-09-29, 16:17

Hi SoulRider,

thanks for the report. I can reproduce this here, but only if I use the left mouse button to spawn. If I press "R" instead, I can use the SPACE key for jumping immediately.

I will have a deeper look into this later today (or maybe tomorrow, as I have to finish fixing something else in CaWE first). I don't think it's a problem with wxWidgets though (which usually works reliable and well), but probably rather one of the 2D GUIs that is consuming our key events...
Best regards,
Carsten
User avatar
Carsten
Site Admin
Posts: 2130
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: Bug: Only movement keys work on game start

Postby Carsten » 2014-09-30, 14:52

Still working on it, but the problem does not occur if:

  • "R" is pressed to respawn,
  • the mouse is moved before the LMB (left mouse button) is pressed to respawn,
  • the LMB is pressed once more after a problematic respawn.
Best regards,
Carsten
User avatar
Carsten
Site Admin
Posts: 2130
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: Bug: Only movement keys work on game start

Postby Carsten » 2014-10-01, 11:34

Ok, I've just committed a fix.

Please let me know if it works as expected.
Best regards,
Carsten

Return to “Cafu Engine Support and Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest