bb0fc01e38
Until this commit a cinematic was aborted as soon as any key were marked down when finishing the user command and sending it to the server. The whole logic to detect if a key is down is broken, for example `vid_restart` may leave keys marked down that are in fact up. And there's the possibility to inject fake key events from nearly everywhere. I'm not really sure but I suspect that even the server may be able to inject key events. Therefore untangle the cinematic abort code from the user command processing, it should depend only on real key strokes: 1. Introduce a new global variable `abort_cinamatic` and set it to `cls.realtime` as soon as a key down event is detected. The only exceptions are Escape and Shift, because opening the menu and toggeling the console should never abort a cinematic. 2. When starting a cinematic `abort_cinamatic` is set to INT_MAX, because it needs to be higher than the current `cls.realtime`. 3. When a cinematic is running, `cls.key_dest` is set to `key_game` (`key_menu` and `key_console` are ignored, keys send to the menu or the console should never abort a cinematic; `key_message` can / should never happen while a cinematic is running) and `abort_cinamatic` is less than `cls.realtime` the cinematic is aborted. `abort_cinamatic` less than `cls.realtime` is necessary because the client needs one frame to pop up the menu or toggle the console and set the `cls.key_dest` accordingly. `abort_cinamatic == cls.realtime - 1` is not possible because not every frame finishes a user command. This closes #502. |
||
---|---|---|
doc | ||
src | ||
stuff | ||
.gitignore | ||
CHANGELOG | ||
CMakeLists.txt | ||
LICENSE | ||
Makefile | ||
README.md |
Yamagi Quake II
Yamagi Quake II is an enhanced client for id Software's Quake II with focus on offline and coop gameplay. Both the gameplay and the graphics are unchanged, but many bugs in the last official release were fixed and some nice to have features like widescreen support and a modern OpenGL 3.2 renderer were added. Unlike most other Quake II source ports Yamagi Quake II is fully 64-bit clean. It works perfectly on modern processors and operating systems. Yamagi Quake II runs on nearly all common platforms; including FreeBSD, Linux, OpenBSD, Windows and macOS (experimental).
This code is built upon Icculus Quake II, which itself is based on Quake II 3.21. Yamagi Quake II is released under the terms of the GPL version 2. See the LICENSE file for further information.
Documentation
Before asking any question, read through the documentation! The current version can be found here: doc/010_index.md
Releases
The official releases (including Windows binaries) can be found at our
homepage: https://www.yamagi.org/quake2
Unsupported preview builds for Windows can be found at
https://deponie.yamagi.org/quake2/misc/