Commit Graph
106 Commits
Author SHA1 Message Date
ac-stef c54eb7f173 calcmapareastats()
new metrics to assess map geometry
2016-08-26 14:08:55 +02:00
ac-stef e1ce0979d0 rewrite calculation of map geometry bounding box
and rename client-side struct "mapdims" to clmapdims (to avoid confusion
with server-side data)
2016-08-26 14:08:55 +02:00
ac-stef 32ffd3a4cd replace non-thread-safe functions
replace all uses of strtok, localtime, gmtime and readdir

on platforms without safe versions, use homebrew or unsafe...
2016-02-28 23:14:47 +01:00
ac-stef 697197bd5b generalise sorting of lists of integer sets 2016-02-07 18:34:31 +01:00
Jani-Markus Maunusandac-stef d570eccd16 fixed missing include for Windows build 2015-09-19 15:43:43 +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 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 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 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
ac-stef 010a7579be remove ability to write map file format 9
didn't work properly anymore anyway
2015-05-27 15:47:04 +02:00
ac-stef b1b789eefc rename transformoldentities
now that old entities also get re-scaled, "transformoldentitytypes" is
more appropriate
2015-05-18 14:59:41 +02:00
ac-stef ae82b6b22e add attr5..7, add mapmodel pitch and roll
Keys 5, 6 and 7 (in combination with the scrollwheel) can be used to alter
the new entity attributes.

Pressing editmeta (LCTRL by default) speeds up the scrolling.

(Parts of the roll code are borrowed from Alejandro V. Garcia's commit
"Model rotations, experimental" from January 2013)

Note: coop edit is now broken between "next" and older clients, but I
  don't want to bump the protocol just yet.
2015-05-18 14:59:41 +02:00
ac-stef b4b1c0bf91 add debug warning for unknown argument keywords
"weapon asault" will now print a warning to console.
2015-03-24 02:06:19 +01:00
ac-stef 348f640507 new tool functions 2015-02-08 17:39:15 +01:00
ac-stef 7e7834af2c wrapper functions for threading and semaphores
allow the standalone linux server to use posix libraries instead of SDL
(using SDL can be forced by defining AC_FORCE_SDL_THREADS)
2015-02-08 17:39:14 +01:00
ac-stef 4fdba4fa4a less ugly mapdims
replaced the mapdims array with a struct with properly identified members

also reduced the calclight postfilter to actually used map areas
2014-11-12 17:52:44 +01:00
ac-stef 3bbe1f9555 fix mandatory client logfile
The logfile can't be created before the commandline arguments are parsed,
because before that, the home directory is unknown. This patch logs
into a memory buffer which is then copied to the logfile as soon as
the logfile is created after processing the commandline arguments.

The memory buffer is created during the initialisation of global variables,
and destroyed after the logfile is created.
2014-10-06 12:43:32 +02:00
ac-stef c3d4713904 clean up map header handling
Older versions of ac did not obey the map header field "headersize".
When a map was written, only the "version" field was updated, even if
the new written header had a different size. Thanks to bigger headers
in map versions 7 & 8 (and now smaller headers again in 9), the headersize
of basically all official maps is bogus. This fix makes sure, only proper
headersizes are written. It also makes the game tolerate different (bigger)
headers - and keeps their content untouched. Future map format extensions
can use this to add header information without breaking existing map parsers.

This patch establishes a new map format 10, which is identical to format 9,
with the exception that the headersize field is guaranteed to be correct.
Format 10 also allows any amount of additional header data.

This patch also cleans up the transformation routines for old map entities.
2014-01-27 23:01:23 +01:00
Lucas GAUTHERON 2f55903ad0 messy patch tmp revert
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7491 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-05-27 17:25:21 +00:00
Lucas GAUTHERON bfd0d79d8f map restriction fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7490 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-05-26 20:43:01 +00:00
Lucas GAUTHERON 624dd348d7 make the server store more map data (more accurate pickup calculations)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7487 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-05-26 16:40:57 +00:00
Lucas GAUTHERON a7a1e46bcc merged branch
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7382 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-22 19:49:21 +00:00
Lucas GAUTHERON 704f6f8415 map check: linear rather than quadratic
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7342 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-10 19:35:59 +00:00
aerkefiende 06f73f4627 Replaced Tabs with 4 spaces in every source file
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6561 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-07-31 15:44:57 +00:00
Rafael Barreto f891f1dff3 ty tempest! changing diff from char to int
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6496 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-06-04 15:06:42 +00:00
Rafael Barreto 32712318da doing it better... (still testing the exploit, tbh)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6494 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-06-04 14:14:37 +00:00
Rafael Barreto a8401fd1e3 fixing that obvious map requirements exploit... (no more exploits for the next 6 months...)
@ other devs: check my fix... I expect to not block any good map

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6490 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-06-03 21:19:44 +00:00
flowtron 2d9edb6dc4 rewrite of radar-code
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6110 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-02-27 22:16:28 +00:00
flowtron 87d69da51f minor fixes & comments
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6101 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-02-14 18:02:48 +00:00
Lee Salzman 5243cdf249 gzstream closing fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5739 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-10-10 02:16:21 +00:00
Rafael Barreto d8a3695deb mapdim in server side
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5660 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-08-19 23:50:08 +00:00
Rafael Barreto 9325b67f1a clean up, some commands from kirin (thank you for the work), some anticheat compatibilities, balance teams saner check, check for map quality in the maprot, and more clean up
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5651 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-08-17 15:03:41 +00:00
Rafael Barreto b75856ceed clean up, and checking the distance of the items (all official maps pass in the check)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5531 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-08-03 01:08:42 +00:00
Rafael Barreto 3e4c92b493 fixing the coop vote/map check issues, adding some anticheat compatibility
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5500 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-31 00:16:58 +00:00
flowtron 94dc526837 lots of whitespace
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5265 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-02 16:49:20 +00:00
Rafael Barreto ec9df808b2 maxdim comments, fix the Marea value, shotgun frag fix (i thought it was already committed)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5251 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-06-29 15:47:32 +00:00
Rafael Barreto d04d036204 map/test layout fix, vote now will appear when the player connects, combo pistol/sniper now included
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5203 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-06-19 23:47:14 +00:00
Rafael Barreto 72d710081a bug fix (respawn issue), smarter mfilter, other stuff
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5059 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-05-26 20:06:38 +00:00
Rafael Barreto bc01595024 blocking bad maps in client side, and beginning the work with the medal system
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5031 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-05-24 17:24:33 +00:00
Rafael Barreto be1d72d7cc Armor icon hud, and blocking too much open maps
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4937 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-05-19 20:31:15 +00:00
Rafael Barreto 5835817777 Carbine sounds, and testing 15 dmg for smg
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4911 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-05-18 16:36:38 +00:00
Rafael Barreto b336718efa Some bad maps will be blocked from now, and a bit more spread to shotgun
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4886 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-05-16 21:34:52 +00:00
Rafael Barreto 04a9648130 Height density calculation
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4837 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-05-13 03:37:17 +00:00
Lee Salzman d1253d6394 added support for ambient light
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4737 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-12-03 12:21:21 +00:00
Lee Salzman 9256ee374b support for loading from zip files
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4717 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-11-08 00:53:19 +00:00
Lee Salzman e725e5ed8c string function cleanups
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4714 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-11-07 22:44:32 +00:00
Lee Salzman 54cc44c3db revising pch setup
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4690 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-11-07 06:42:37 +00:00
Lee Salzman 6e7a51b3db VC warning fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4689 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-11-07 06:35:12 +00:00
flowtron 5196e222ce MediaPack-aware mapformat (MAPVERSION 7)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4657 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-10-12 19:33:59 +00:00
Lee Salzman d32f92065a faster matrix inverse
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4653 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-10-06 07:21:15 +00:00