* Convert back slashes into forward slashes.
* Make sure that there's no slash at the end.
In theory this is a noop, just making the output somewhat more readable.
This would have prevented the 7.44 release f*ckup. In practise this
shoudl never happen, because there's always baseq2/ but you never know
and it's better to be sure.
This prevents Sys_FindFirst() further down below getting called with
wrong arguments, returning a null pointer. The null pointer crashes
the filesystem. :/
When Q2 runs in windowed mode, SDL can never switch to the wrong the
resolution. The resolution isn't switched, of course. The work around
prevented Q2 from creating Windows larger than the resolution of the
primary display. For example a primary display of 1280x1024 prevented
a window size of 1680x1050 on the much bigger secondary display.
Normally stdout and stderr are buffered. In case of a crash the last
lines aren't written to the stdout.txt, making post mortem debugging
difficult. Forcing both FDs to unbuffered mode ensures that everything
gets written. The performance impact is negliable.
Even tough it is a multi user os, due to BeOs heritage and being backwards
compatible with, the desktop runs as root, thus its dog get eaten after all...
Combs all Raw search paths to find game dirs containing PAK/PK2/PK3
files. If multiple uniquely-named directories exist, then show a "mods"
option on the "Game" menu and allow selection of desired mod on new
eponymous submenu. Includes fix for memory leak of mapnames (read from
"maps.lst") when changing games.
When the "game" directory is changed, clear the current list of maps in
the "start network server" menu so that it will be re-initialized the
next time the menu is accessed.
so it waits for about the time of one frame at 60fps, but independently
of the actual framerate.
Without this fix, wait is broken unless vsync is on, because
CBuf_Execute() is called about 1000 times per second by Qcommon_Frame(),
even if no render- or packet-frame is executed.
(vsync "fixes" this because then we have a real wait at the end of each
renderframe)
We busy-looped for 5000 microseconds, i.e. 5 milliseconds, which reduces
the framerate to < 200fps
I guess the value was copypasted from Sys_Nanosleep() below, but
that was nanoseconds of course..
Anyway, busy-looping for 5 *micro*seconds instead fixes it.
Angle kicks are used for weapon recoil, damage kicks and the like.
Setting the `cl_anglekicks` to `0` ignored them, they're read from
the network but not displayed. The cvar is cheat protected, it's
reset to `1` on server connect.
Rquested by Martin via mail.
In coop it's often hard to get on the same elevator together, because
they're immediately triggered once the first player steps on it.
This cvar sets a delay (1 second by default) for the elevator to wait
before moving, so other players have some time to get on it.
If you like elevators/platforms that suck, just set it to `0` :-P
Currently only used in func_plat, if it turns out that other entities
are used for automatically triggered platforms, we'll have to adapt
those as well (I guess wait_and_change() is generally useful for that).
We're not bumping the savegame version because they should only break in
an uncommon corner case: *Coop* savegames created with clients including
this change will not work on older clients - SP savegames are not
affected and old savegames on new clients also still work.
In coop a weapon can be picked up only once. That's annoying, because in
coop ammunition is sparse and not getting the ammunition that comes with
a weapons make things worse. When `coop_pickup_weapons` is set to `1` a
weapon may be picked up if:
1) The player doesn't have the weapon in their inventory.
2) No other player has already picked it up.