This is a special case, the bug was already present in Vanilla Q2: If a
server is offering assets for download but is missing some files the
USP download code runs in an endless loop. CL_ParseDownload() detects
that something is wrong and calls CL_RequestNextDownload() which tries
to download the same file again... Work around this by skippig over that
file.
This closes#552.
The new ordering was introduced in 16ee007, fixing some problems with
the wrong sound getting played when an entity triggers several sound at
the same timestamp. This broke the behavior of the mods, in #558 dday
was mentioned, muzzle flashe sound prevent the firing sound from getting
played.
Since we don't control the source of all mods, add a simple band aid
fix: Use the new ordering for baseq2, xatrix and rouge. Use the old
ordering for everything else.
An alternative approach is being discussed in #564.
I don't remember why we restricted it to client startup. The original
code executed it everytime when `game` changed... Revert to that
behavior. Look here if some problems come up. ;)
Closes#544.
Adaptive vsync is a often requested feauture and easy to implement. Set
`r_vsync` to `2` to enable. This is untested because my system doesn't
support it.
There already was one (that I only recently fixed) for semicolon, but
the same problem can happen with quotes or $ (which is used in macros)
(single-quote ' is probably not affected, added it just to be sure)
regardless of keyboard layout, with a special exemption for layouts
where that key generates a quote character (like the Brazilian one)
because you may wanna type a quote into the console.
(It's SDL_SCANCODE_GRAVE, that key between Esc, 1 and Tab)
The old hack of matching for ^, ~ and ` in Char_Event() didn't work very
well for layouts we didn't anticipate, which is especially relevant with
the recent Scancode fallback, which for example allows binding the ^ key
on Belgian keyboards (which is on SDL_SCANCODE_LEFTBRACKET, far away
from the "console key"), but in that case would *also* open the console.
This is mostly straight-forward, except for a small hack to prevent the
key from generating text input (on German layouts you otherwise get
"^" in the console when closing+opening it), which requires the
"console key" to be pressed without any modifiers like Shift or AltGr.
Yes, it's ugly, but it works and all the uglyness is contained in
IN_Update() and on the other hand Char_Event() becomes less ugly :)
If we can't map a SDL_KEYDOWN/KEYUP events SDL_Keycode to a known
Quake2 K_* keycode, we try to map the SDL_Scancode to one of the new
K_SC_* YQ2 scancodes instead.
The scancode name corresponds to the key at that position on US-QWERTY
keyboards *not* the one in the local layout, for example the German 'Ö'
key is K_SC_SEMICOLON.
This way (hopefully!) all keys on common keyboards can be bound,
regardless of their layout. The key name won't be immediately obvious
to the user, but it's only a fallback and better than nothing.
fixes#543
this way it's easier to tell if a key constant is not handled.
Also, there was a half-finished workaround to allow binding a ';' key
(which apparently in configs would otherwise be interpreted as
command separator), now that should actually work (=> special case
it in Key_KeynumToString())
This is an enhancement to the previous `yield` work:
* Don't enforce `-march=armv8-a` for aarch64 builds, because it is the
initial ARMv8 revision and compilers will either use that or something
newer.
* Refine preprocessor guards around `asm("yield");` so the code isn't
compiled in if unsupported by the current `-march='.
Submitted by @smcv in #535.
On MacOS texture is cleaned up after render and code have to copy a whole
screen to texture, other platforms save previous texture content and can
be copied only changed parts.
YQ2 has a much more precise Sys_Milliseconds() than Vanilla Quake II and
it always start at 0, not some other semirandom value. If the client is
started by `./quake2 +connect example.com" or all user just walk their
way to the menu there's a very high propability that two ore more
clients end up with the same qport... We can't use rand(), because we're
always starting with the same seed, so all clients generate more or less
the same random numbers and we end up in the same situation.
So just call time(). It's portable and more or less in line what the
original code did for Windows. It may be necessary to implement some
kind of fallback logic just in case that still two clients end up with
the same qport, but that's a task for another day.
Closes#537.