although I doubt, that anyone ever fell for that
(the fix prevents, that nickname completion can change the first char of
the console string to a slash, which would change the line from chat to
command)
When client connected to server (or started to play demo), where there was
a player dead since this client connecting, then position of the player
on minimap (and radar) was displayed wrongly outside of the map, sometimes
for the whole match. Now such positions will be hidden.
Stock strftime doesn't use capitalized "P", so for example on Windows
the wall clock didn't appear for 12h format. PM and AM are converted
to lowercase.
Mapmodels which were not found once are put on a list and not tried to
be loaded again. With this commit, the list is cleared during a map load
if autodownload is enabled. This causes all missing models to be
downloaded.
Fixes issues with manually aborted autodownloads.
http get now uses two timeout values: one for the max time since last
server response, and one for total download time.
When AC is waiting for a server response (before a http header was
received), the progress bar will show the timeout "completion".
getmod modname
Try to download mods/modname.zip from all configured package servers.
Does not automatically activate the mod. The zip files are limited to
one megabyte total.
DOCREF getmod
Zipped mod package files should be placed in "mods/" and need to contain
directory trees starting with "packages/" (or "config/"). The files from
a zip mod replace files, that exist in the original game install or add
new files.
The zip file should contain three special files:
desc.txt
Contains one line with a descriptive title for the package and ten
more optional lines with a detailed description.
preview.jpg
Preview picture for the mod. Must not exceed 128 kbytes. Aim for
512x512 pixel.
revision_n
Empty file. The "n" in the filename should be a valid integer number
instead, specifying the zip revision. Example "revision_123".
The settings menu shows the active mods in order of their priority - which
determines, which file to use, if several mod packages try to add or
substitute the same file. Zip files higher up in the list win.
addzipmod zipname
Add the zip package file "mods/zipname.zip" to the virtual file system.
Only files below the path "packages/" are added (and also files below
"config/", if zipname starts with "###"). If the size of the zip file
is below zipcachemaxsize, the whole zip file is cached in memory.
(Un-cached zip files are kept open at all time, so caching keeps the
number of simultaneously opened files lower.)
zipmodremove zipname
Removes one zip file from the virtual file system.
zipmodclear
Removes all zip files from the virtual file system.
zipmodlist [what]
Lists zip files in "mods/". By default, or if "what" is "all", all zips
are listed. If "what" is "active", only those zips, that are already in
use, are listed. If "what" is "inactive", only the unused zip files are
listed.
zipmodgetdesc zipfile
Reads and returns the first 11 lines from the file "desc.txt" in the
named zip file. The first line is supposed to contain a descriptive
title for the zip (for use in menus) and the next 10 lines should
contain a more detailed description (also for use in menus).
The command also unpacks "preview.jpg" from the zip and mounts it as a
temporary file under the name "packages/modpreviews/zipname.jpg".
zipmodgetfiles zipfile
Returns the list of files contained in a zip file.
zipmodgetrevision zipfile
Returns the revision number of the zip file. The number is supposed to
be part of a filename: "revision_n". If no such file is found in the zip
file, the return value is zero. The content of the revision file is not
relevant and a file size of zero is recommended.
DOCREF addzipmod zipmodremove zipmodclear zipcachemaxsize
DOCREF zipmodlist zipmodgetdesc zipmodgetfiles zipmodgetrevision
By specifying a title string in the second argument to chmenutexture,
a picture is rendered instead of a texture. The title string is
displayed instead of the texture resolution. The variable menupicturesize
holds a size modifier for pictures, similar to menutexturesize.
DOCREF chmenutexture menupicturesize
* own source file for autodownload
* use cleaned up zip functions
* use new http get function (no more curl)
* enforce strict file naming rules and file size limits
* ping all package servers on every game start to determine ping times
* support media file update lists (also kept on package servers)
* allow users to manually prioritise package servers
* automatically select server with newest media file revision
new or changed commands:
addpckserver hostname [priority]
Adds a host name to the list of package servers. If a priority is given,
it influences the sorting of servers. Servers with higher priority are
queried first. If servers have the same priority, they are sorted by
ping. Default priority is zero.
getpackageserver
Returns a table with four columns of all configured package servers. The
columns are: host name, priority, ping and resolved.
"resolved" is a flag, indicating, if the server answered the ping during
game start.
removed cubescript idents: sortpckservers gamestarts
DOCREF addpckserver getpckserver
* change priority of zip packages from "highest" to "just below home dir"
* strict naming rules for zip packages
* require all zips to be below directory "mods/"
* only allow zips to intoduce files below "packages/" (or with a special
zip package name also below "config/")
* make zip package config persistent (saved to init.cfg)
WARNING: intermediate commit - autodownload system defunct!
DOCREF (removed) addzip removezip
* based on the enet socket layer
* supports redirects, range requests and gzip encoding
* automatically tries to re-use existing connections
* easy multithreading
* writes output to file or ram buffer
1. Counting backward for gametimedisplay = 1 and forward for 2. The setting
added to HUD menu.
2. Changed name from clockdisplay to gimetimedisplay, in order to
distinguish clocks with system time and game time.
3. Added to wall clock options with UTC/GMT time and 12h format.
DOCREF clockcount clockdisplay gametimedisplay
- suppress error messages during map config execution, just like all
missing media errors are suppressed during the first attempt
- don't queue manual attempts to load nonexisting skymaps for download
(this is now consistent with other manual media use)
In second and next lines server description lost formatting, so also
colors, and it could be cut.
Now text in footer will be also divided by spaces, and not characters
(not applicable in case of long continuous strings).
LAN servers should be always visible, when user opens serverbrowser with
LAN servers only. And don't allow to switch from there to alternate views,
because for searchlan = 2 it doesn't make sense.
When spectator will send in non-team mode a message in team chat, then
other spectators will see it in blue colour - earlier was wrongly green,
like for normal chat.
When player1 spectated alive player and this watched player disconnected,
then camera1 pointed out still this non-existing player, for one main loop.
It had such negative effects, that hudgun could disappear to AC restart,
also AC crashed sometimes.
Tested mainly in tosok, on last alive player in a team.
Check printf-like functions like conoutf, if format strings and argument
lists match.
This commit also fixes a lot of code parts that actually had mismatching
argument lists - or did things, that this check does not like.
numtime() was rewritten in an ugly but very portable fashion (it's
recommended to stay away from "long long" format entries, because errors
usually only come up at runtime).
(some code was copied from sauer)