Commit Graph
7402 Commits
Author SHA1 Message Date
aurhat 99ee7d10ef Change user data path for the dev version on Mac
Also one more directory level.
2015-11-16 21:03:48 +01:00
gy_be 5d1a9cac19 Fix a memory leak in command.cpp
Do not forget to free command name and its arguments if
it's not allowed in current execution context.
2015-11-09 10:20:24 +03:00
aurhat 4607af6438 Change IRC server in Travis settings 2015-10-20 22:30:34 +02:00
aurhat 747763fdf7 Show flag scores in "death camera" state 2015-10-20 21:57:16 +02:00
aurhat cf554261b9 Update licensing informations 2015-10-13 20:24:23 +02:00
ac-stef 0e6476806a fix crouching, jumping and doublejumping
* fix the old check for different jump start heights as requirement
  for doublejumps
* better handle multiple binds for the "jump" command
* delay relaxed floorclamping for crouching
* remove some redundant code
2015-09-27 00:28:34 +02:00
ac-stef 196d47d34e limit max speed by consecutive doublejumps
Instead of applying 25% bonus speed with every executed doublejump (with
potentially unlimited top speed), limit the reachable max speed to 125%
of regular full speed.

This limits regular gameplay only marginally but removes a lot of cheat
potential.
2015-09-26 15:32:27 +02:00
ac-stef d75409a29c fix ladder physics
When both "forward" and "backward" keys are pressed, now the action
matches the last pressed one. Now the keys work on the ladder exactly
as with regular movement.
2015-09-26 11:34:47 +02:00
ac-stef 5006663d19 update VC project file
and add workaround for missing C99 type uint64_t in VC2008
2015-09-24 23:17:50 +02:00
ac-stef 917df65a51 remove all instances of round()
VS2008 doesn't have round() in math.h and the old inline function (removed
in 50d1413d, had problems in newer compilers). Now floor() or straight
casting to int is used. Let's see, which MS compiler will trip on that...
2015-09-24 19:51:50 +02:00
aurhat b06a5209e3 Add background to description of active menu items
DOCREF menuselectiondescbgcolor
2015-09-21 20:36:12 +02:00
aurhat fa047595b6 Add header to alternate views in serverbrowser
Also clean up SEARCH category.
2015-09-21 20:33:50 +02:00
aurhat cbddcf05cf Add searching for map and demo in menu
Searching is by map/demo names and descriptions (also custom descriptions,
in case of demo).

DOCREF menudirlist
2015-09-21 20:29:15 +02:00
aurhat 6268f5c118 Remove/adjust dependencies on Windows 2015-09-20 13:13:01 +02:00
aurhat 07ad1cedda Update xcode project - replace libcurl 2015-09-20 01:28:19 +02:00
Jani-Markus Maunusandac-stef d570eccd16 fixed missing include for Windows build 2015-09-19 15:43:43 +02:00
aurhat 6c99a9d2a3 Show "whois" info in one line 2015-09-18 21:27:16 +02:00
ac-stef 6571c8b012 new menu to configure package server priorities 2015-09-17 19:14:30 +02:00
ac-stef 16565a2e05 allow package servers to be disabled or deleted
This is coded into the priority of a server:
* a priority of -1000 or lower marks a server as disabled
* a priority of -10000 or lower excludes a server from being saved to
  pcksources.cfg at program end, so a game restart will delete the server
  from the list
2015-09-17 16:41:05 +02:00
ac-stef 12a05d41e9 add interface for timedwait on semaphores
According to SDL documentation, the SDL implementation of timedwait may
suck on some platforms, so it should only be used, where high CPU usage
during the wait is no issue.

getpckserver() will now only wait for one second for access to the
package server list and return an error instead of waiting indefinitely.
2015-09-17 16:40:59 +02:00
ac-stef cbd0e7b4bc add timeout and manual abort to connect() 2015-09-15 13:18:03 +02:00
ac-stef ecc63d7047 more thread wrapper functions
Add code to detach threads without losing any ressources.
(use POSIX libs when SDL is not available)
2015-09-15 13:18:03 +02:00
ac-stef f6c161bcc5 add map export to format 9
Export to the map format of AC 1.2. Use with caution. Experimental.
2015-09-14 16:32:56 +02:00
ac-stef f424c95a7f allow the package server ping thread to take ages
Don't have the main thread wait for the ping thread, because the ping
thread may take a long time to respond - when a server connection can't
be established. Sadly, there's no timeout for "connect()".
2015-09-14 16:03:09 +02:00
ac-stef 5a4b605b33 fix flag drop position under water
Just placing the flag on top of the water didn't work for fully flooded
map areas, as the flag went out of reach.
This fix tries to float the flag up to the surface and stops, if something
blocks the way.
2015-09-14 13:57:55 +02:00
aurhat 7bba47a0dd Show on minimap indicative arrow at editing local player 2015-09-12 12:52:27 +02:00
ac-stef 532453b9f8 tweak command completion
If the fragment is also a full command, skip that command during the first
round of TAB completions.
2015-09-08 21:03:06 +02:00
ac-stef 396eae3ee0 fix #131
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)
2015-09-08 20:22:07 +02:00
aurhat 03a39feab8 Don't show players outside of map on minimap
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.
2015-09-08 15:09:24 +02:00
ac-stef 91753026dc fix enet issue #31
easier to fix the library than every use of the functions
2015-09-08 11:51:02 +02:00
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