Commit Graph
7372 Commits
Author SHA1 Message Date
aurhat 2fb111adf4 Fix wall clock with 12h format
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.
2015-09-08 01:05:54 +02:00
aurhat b7643a5200 Remove obsolete dependency on wldap32
wldap32 was linked to removed libcurl, so it's unnecessary now.
2015-09-08 01:05:54 +02:00
ac-stef d86f6cc6ff rename ERROR macro
seems to be defined otherwise on windows
2015-09-07 22:34:35 +02:00
ac-stef 8f06af0e59 travis update
don't install curl libs
2015-09-07 19:52:06 +02:00
ac-stef 6c97202aa3 retry mapmodel downloads
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.
2015-09-07 14:53:57 +02:00
ac-stef 68c3ea43b1 improved http error handling
* don't treat 404 as http error
* real errors return -1 and disconnect
* -1 is treated as real error
2015-09-07 14:53:57 +02:00
ac-stef 58e033a1e3 add debug info to autodownload
In debug binaries and/or when the variable autodownloaddebug is set to 1,
more debug output is produced.

DOCREF autodownloaddebug
2015-09-07 14:53:57 +02:00
ac-stef fd2109adc5 add support for port and path settings for autodownload servers
actually, addpckserver now supports a full url as "host" field - but only
domain, port and path are used
2015-09-07 14:53:57 +02:00
ac-stef 9965f53d28 fix filtertext
cropping space should work now
2015-09-07 14:53:57 +02:00
ac-stef 7bdd91bc9f improved timeout handling and progress bar for 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".
2015-09-07 14:53:57 +02:00
ac-stef 0f37595c30 alternative progress visualisation for map and mod downloads
no need to switch to the loadingscreen for those
2015-09-07 14:53:56 +02:00
ac-stef 491c8aa0fa curl be gone 2015-09-07 14:53:56 +02:00
ac-stef 50369fe920 use new http get to retrieve list from masterserver
curl ite domum
2015-09-07 14:53:56 +02:00
ac-stef 026dad73cd add support for downloadable zip mod packages
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
2015-09-07 14:53:56 +02:00
ac-stef f603031018 add zip mod package settings menu
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.
2015-09-07 14:53:56 +02:00
ac-stef 04aba22e16 more commands to manage zipped mod packages
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
2015-09-07 14:53:56 +02:00
ac-stef 394ddd12f7 allow chmenutexture to display pictures as well
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
2015-09-07 14:53:56 +02:00
ac-stef 7988443b1d partial autodownload rewrite
* 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
2015-09-07 14:53:56 +02:00
ac-stef c8313a946e add memfiles: temporary files held in ram
WARNING: intermediate commit - autodownload system defunct!
2015-09-07 14:53:56 +02:00
ac-stef 6c58c9f307 add easy to use functions to read from zip files
..without mounting the zip into the file system first

WARNING: intermediate commit - autodownload system defunct!
2015-09-07 14:53:56 +02:00
ac-stef 816aed4ba6 rewire zip packages inside the virtual filesystem
* 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
2015-09-07 14:53:56 +02:00
ac-stef 0dab3ade48 some zip changes
* use streams to read zip files
* include bugfixes from upstream
2015-09-07 14:53:56 +02:00
ac-stef 743bb7965c stream interface for memory buffers
* read-only access through regular stream functions
* automatic cleanup with reference counter
2015-09-07 14:53:55 +02:00
ac-stef da426c93cf stream interface for uchar vectors
* read- and write-access through regular stream functions
* automatic cleanup
2015-09-07 14:53:55 +02:00
ac-stef ff523df873 new http get function
* 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
2015-09-07 14:53:55 +02:00
aurhat f10342fa80 Improve game time and wall clock display
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
2015-09-06 22:09:00 +02:00
ac-stef 8f6b5d5802 fix skymap autodownload error handling
- 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)
2015-08-28 11:55:09 +02:00
aurhat 3456304702 Fix formatting of menu footer in second and next lines
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).
2015-08-22 13:54:56 +02:00
aurhat c27e5e05d2 Fix displaying LAN servers
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.
2015-08-22 13:50:20 +02:00
ac-stef 06f59e0559 use safe strings
(cleanup)
2015-08-21 15:51:36 +02:00
aurhat cf2a8018ff Fix colour of team messages in non-team mode
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.
2015-08-17 22:07:06 +02:00
aurhat 3a4edff826 Cleanup
Among other things it fixes masterserver compiling.
2015-08-16 16:44:18 +02:00
aurhat 673286d25b Fix custom packages downloading on Windows 2015-08-16 16:44:04 +02:00
aurhat 24043589fc Improve setadmin
Don't kick, when player typed "setadmin 1" without any password.
2015-08-16 16:43:46 +02:00
aurhat 62072d9887 Update Code::Blocks project for Windows 2015-08-16 15:27:23 +02:00
aurhat 798b0a6582 Fix camera1 after player disconnection
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.
2015-08-16 14:18:21 +02:00
aurhat 6605a20e00 Add a wall clock with local time
It uses strftime formatting from "wallclockformat" alias.

DOCREF wallclockformat
2015-08-06 21:08:46 +02:00
aurhatandac-stef ac32f7e2f7 Remove outdated gettext dependencies 2015-08-03 20:58:00 +02:00
ac-stef 50d1413d5c fix some warnings
Removed homebrew round() - now we just use the math library.
2015-08-03 20:57:50 +02:00
ac-stef 826499c12d enable gcc to check arguments of printf-like functions
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)
2015-08-02 19:40:41 +02:00
aurhat b2845b7c15 Improve "clean" screenshot
The parameter of blankouthud is "frames", so for example 1000 will take
20 seconds at 50 fps or 1 second at 1000 fps.

DOCREF blankouthud
2015-08-01 22:17:40 +02:00
aurhat 47485bea24 Add rewind menu 2015-07-28 22:17:32 +02:00
Frank LENORMANDandac-stef e268794af7 some fixes 2015-07-18 01:25:18 +02:00
Frank LENORMANDandac-stef 3ec0b1218d abide by the rules for reference objects 2015-07-18 00:51:00 +02:00
aurhat 577d6a00d2 Fix arenaintermission reset
Arenaintermission was reset only after own spawn, now it will be reset
also during being in team spectator (in multiplayer or demo mode).
2015-07-16 23:13:05 +02:00
aurhat 54c09b8c48 Remove/adjust gibnum in preset gfx settings 2015-07-15 21:58:36 +02:00
aurhat 5df5fec352 Reorder and cleanup gamma settings
Remark: "gamma" command changes gamma only temporary, to next map start.
2015-07-15 21:57:44 +02:00
aurhat 048e951a38 Update .gitignore's 2015-07-15 21:57:05 +02:00
aurhat 297b5c69f8 Improve audibility of sounds
It's solution for missing hit/shot/etc. sounds:
1. decrease priority of ambient sounds to low, in order to hear more
non-ambient sounds with priority greater than low;
2. increase amount of sound channels to hear more sounds. Newer sound
cards on PC should be able to use more channels than only 32;
3. improve preset sound settings.

Remark: after these changes for default value of mapsoundrefresh (10)
break in playing ambient sounds, caused by playing sounds with greater
priority, isn't practically audible. The break is audible for greater
value, for example for mapsoundrefresh=1000.
2015-07-15 21:56:15 +02:00
ac-stef 380b8a1ebf cleanup shotgun code
no functional changes, only cleanup
2015-07-12 20:22:49 +02:00