Commit Graph
148 Commits
Author SHA1 Message Date
ac-stefandaurhat 135f9f4a90 fully automatic keymap generation
If a key is not listed in keymap.cfg but SDL provides a good enough name
for the corresponding scancode, a keymap entry is generated automatically.

If a key can't be found when adding a bind, it is checked, if SDL can
resolve the key name. The resolved keybind is then used to recreate the
keymap entry - and the bind can succeed.

Some SDL names for scancodes may not be usable as keymap names: if the
name contains (, ), $ or ", it will be rejected. Also, SDL does not
provide names for all scancodes. Scancode names provided by SDL can be
platform-dependant, therefore recreating the bind may fail on a different
platform.

However, the feature should work fine with most nonstandard keys - and the
information written to clientlog can be used to amend keymap.cfg
2018-02-10 11:28:50 +01:00
ac-stef 83d0199867 command cleanup
changed commands:

  strstr haystack needle

    now returns position of needle in haystack (counting from 1)
    or zero, if not found

  substr string start len

    now counts negative length from total length
    "substr text 1 -2" now returns the text without first and last char

  strreplace text search replace

    no longer restricted to 260 char stringlengths

removed commands:

  swapelements, strpos (can be scripted, if required)

DOCREF strstr substr
DOCREF swapelements strpos
2017-06-07 23:20:00 +02:00
ac-stef aca74e1b59 allow copy, paste, undo, redo and selectionwalk in coop edit
limited to selection areas of at max 4096 cubes, which is 64x64 cubes
2016-09-17 22:11:07 +02:00
ac-stef 27c8f43711 add zipped message packets 2016-09-17 22:11:07 +02:00
ac-stef fc3c77868f add hardcoded stairs command for coop
stairs xs ys

  Places stairs in all selections. xs and ys determine the step width
  in x- and y-direction.

DOCREF stairs
2016-09-16 14:06:27 +02:00
ac-stef 4dc54e22b5 allow more edit commands in coop edit
The edit protocol now allows the following commands in multiplayer:

  arch, slope, edittag, edittagclip, selectionrotate, selectionflip

also:

  mapenlarge has been limited to size 10 in multiplayer

  entitiy undelete in multiplayer has been fixed

SV_EDITS, SV_EDITD and SV_EDITE are to be cleaned up with a protocol bump

DOCREF arch slope edittag edittagclip selectionrotate selectionflip
2016-09-16 14:06:27 +02:00
ac-stef 1f5b3ed92a add basic cert management 2016-08-26 14:28:54 +02:00
ac-stef 89f1f69eec readmapsthread
server: load all maps into memory, scan for more maps
in the background
2016-08-26 14:27:51 +02:00
ac-stef a860cc58b0 add a map license and comment string to the map header
Two new string variables, mapinfo_license and mapinfo_comment, are stored
withing the header of a map file.

The variables are automatically read and written during loading and
saving maps. Default values are empty strings. The comment string is
ignored, as long as no license string is set. The license string is meant
to hold an abbreviated name of the license, picked from a list of
known map licenses.

DOCREF mapinfo_license mapinfo_comment
2016-07-26 15:41:40 +02:00
ac-stef 535b9df746 define gamemode bitmasks 2016-02-07 18:34:32 +01: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 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 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 d3cdec0708 allow persistent menu selections
menuselectionpersistent
  Enables persistent selections for the currently displayed menu and also
  restores a previously saved selection. Probably most efficient inside
  "menuinit". The position is restored during execution of this command,
  so the menu entry has to already exist and the alias with the last
  position has to be read from saved.cfg. In autmatically created menus
  it may be necessary to execute the command with a short delay (see
  examples in this commit).

DOCREF menuselectionpersistent
2015-06-10 14:22:11 +02:00
ac-stef 786a6cdce1 filename filtering for media files
No more spaces in filenames. The only allowed chars are a-z, A-Z, 0-9 and
"-_.()".

An exception are texture filenames, which may also have a prefix command
like "<decal>" included.

Also fixed some memory leaks in media download.
2015-05-18 14:46:03 +02:00
ac-stef 03f974b2bc additional text attributes for mapmodels
This adds a means to store additional attributes for mapmodels, including
a caching mechanism, so the mapmodels don't have to be loaded to access
the information. The goal is, to provide fully automatic mapmodel menus
for map editing who also add information about downloaded mapmodels.

Model attributes are extracted everytime, when a model is loaded. At game
end, all available data is written to config/mapmodelattributes.cfg and
restored at next startup. On release, a file with all (but only) official
models should be included. Since autodownloaded models are usually "loaded"
after download, those are automatically added to the database. If someone
adds models manually to the directories (media pack, w/e), the command
"loadallmapmodels" can be used to try to find all available models. The
only way to delete something from the database, is to delete the file
config/mapmodelattributes.cfg when the game is closed.

The current list of attributes is:

keywords
  List of one or more menu topics to list the model under. Check
  config/menus_edit.cfg for available keywords. Unknown keywords will
  be listed separately.

desc
  Short name or description of the model. Will be used as menu entry.

usage
  Important information for how to use that specific model.

author
  Who created the mapmodel. If it's a derivative of another model, state
  the author of the mod (refer to the original author under "license", if
  you like). Always use the exact same spelling for the same author, to
  allow menus to automatically group models by author.

license
  Free-text attribute for license info or info about additional
  contributors (or original authors for derivated works).

distribution
  One of "official", "autodownload" or "manual". Other values default to
  "manual". This is used to determine, if a map contains only original
  media or media that can be download automatically.

version
  Single numerical value to separate older from newer versions. Defaults
  to zero. Higher numbers mean "newer". Maybe someone manages to implement
  a versioning system for custom media in the future...

New commands:

mdlattribute <attr> <value>
  To be used in model config files. Adds a value for a specified
  attribute to the model.

mapmodelregister <modelpath> <attr1> <attr2> ...
  Adds values for all attributes to a specific mapmodel. This is used to
  restore the cached values from config/mapmodelattributes.cfg during
  game start. Does not actually verify of load the model.

mapmodelattributes <modelpath> <attr>
  Returns the value of a specific attribute of a mapmodel. If modelpath
  is a number, it is interpreted as index for the list of models in the
  current map config. If no attribute name is specified, all attributes
  are printed to the console instead.

getmapmodelattributes <list of attribute names>
  Returns a table of all known mapmodels. Each model is listed with the
  modelpath and the values for the requested attributes. To be used
  instead of a fixed table in menu_edit.cfg. In addition to attribute
  names, the function also allows the keywords "explodekeywords" and
  "sortby:" as arguments. If "explodekeywords" is given, all mapmodels
  with more than one keyword are listed multiple times, once for each
  keyword. If an attribute name is preceeded by "sortby:" the list will
  be sorted by this table column. If "sortby:" is used several times,
  this first sort will have highest priority. The list is always sorted
  by path by default.

  example:
    getmapmodelattributes sortby: author sortby: desc explodekeywords

loadallmapmodels
  Tries to load mapmodels from /all/ paths below packages/models/mapmodels.
  Will throw a lot of error messages, because not all directories contain
  models to load. This command can be used to build or rebuild the
  complete list of all available mapmodels. It is only necessary, if models
  are added manually to the directories, since every mapmodel gets added
  to the list when it is loaded - which takes care of all automatically
  downloaded models.

DOCREF mdlattribute mapmodelregister mapmodelattributes
DOCREF getmapmodelattributes loadallmapmodels
2015-05-17 00:24:38 +02:00
ac-stef bdf3f0f5cb option to crop leading and trailing whitespace for filtertext 2015-05-17 00:24:38 +02:00
lucas.gautheron 19e4aff2dc Force respawn automatically in DM/TDM, PF and HTF in mastermode MATCH 2015-01-05 14:49:37 +01:00
ac-stef 29dd50bde6 fix: keep path and uppercase in demo filenames
votes now distinguish between demo and map votecalls and filter the
filename appropriately

also: remove paths from map names cleanly
2014-05-25 00:35:22 +02:00
ac-stef a0286d2b3f replace textfilter functions with one-fits-all version
* replaces filtertext() with a version with a dozen of single filters
  that can be used in any combination
* defines classes of allowed characters for strings for various uses
  (see protocol.h line 153ff)
* now the allowed charset of, for example, player names is defined
  in one location only
* fixes issue #58
2014-05-24 12:59:19 +02:00
Lucas GAUTHERON a57f87582e game protocol and version bump
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7606 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-10-12 22:03:40 +00:00
Lucas GAUTHERON a5f1b055a8 protocol updated to 1200
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7554 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-09-29 08:30:50 +00:00
Lucas GAUTHERON c7b1fa19c2 distinguish auto-banned clients from vote-banned clients
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7307 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-05 12:37:49 +00:00
Lucas GAUTHERON d87098c4a0 prevent gbans from being passed through with admin passwords
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7002 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-12-29 00:16:44 +00:00
Lucas GAUTHERON 6607fcd7b3 curmodeattr fix (also fixes survival mode for me), svn protocol bumped (to avoid conflicts between beta and SVN)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6980 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-12-16 14:51:15 +00:00
aerkefiende d50042b783 Protocol change for the beta
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6954 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-12-07 16:43:48 +00:00
Ronald Reagan 44abbf67d1 New shotty sources
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6919 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-10-29 03:01:32 +00:00
sireus 74b873ddba various whois-related cleanups and fixes (fixes demos again)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6865 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-08-24 19:55:42 +00:00
Bukz 55a04c8cff fixes/MAXCL reduced to 16/protocol bump
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6813 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-05-29 21:31:43 +00:00
sireus 0666067f2e more spectator cleanup (just use switchteam, and auto-kill player on server side)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6784 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-04-13 11:39:11 +00:00
sireus f77654d8cf protocol bump
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6782 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-04-05 13:20:00 +00:00
sireus 8f39911eb0 cleaned up spectator mess a bit
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6781 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-04-05 13:19:06 +00:00
Lucas GAUTHERON 526e9e22e5 TMP revert
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6698 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-11-13 16:43:14 +00:00
Lucas GAUTHERON 70d8421100 testme : /lockteams, /forceteam [cn] [team], "matchteamsize" removed
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6696 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-11-12 13:22:59 +00:00
Lucas GAUTHERON 87ea1d0823 private messages (chat) & win32 binaries (warning: new protocol)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6614 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-08-27 18:52:19 +00:00
Lucas GAUTHERON 34933f7a52 game modes macros "improved"
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6577 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-08-15 18:46:22 +00:00
Lee Salzman 4a907532c6 warning fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6556 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-07-06 11:50:57 +00:00
Lucas GAUTHERON 2bf81d4517 bot team survivor & bot tosok (not doc'd yet)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6504 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-06-05 16:18:18 +00:00
Lucas GAUTHERON e17e881162 PF back to non-arena mode
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6502 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-06-05 13:54:44 +00:00
Bukz ecccb57c61 fixes/updates + BPF & BLSS
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6492 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-06-04 06:02:50 +00:00
Lucas GAUTHERON 2e399ed8cc pf / team pf arena modes ? (!testing!)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6480 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-05-30 18:28:42 +00:00
Lucas GAUTHERON cce991d437 team lss, team pf (!testing only!) (bins included, vcpp 2010)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6479 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-05-30 17:30:38 +00:00
flowtron 79e97740c2 move SVN waaay outside (even potential) branches game
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5901 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-11-19 20:04:30 +00:00
flowtron 31c87b3b2a protocol bump : 1132
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5708 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-10-04 20:39:37 +00:00
Rafael Barreto 0c0cc2c97c version 1.1.0.3 (protocol update), inclusion of the auth things, server vote fixes, client side warning about version updates
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5671 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-08-22 19:17:09 +00:00
Rafael Barreto 01c24f0228 checking if file system has space to write (linux only), reverting the protocol to make it compatible with 1.1.0.1, tagging AUTH as WiP, tunning the player/bot collision... preparing to release patch
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5656 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-08-19 19:46:56 +00:00
flowtron 928eed4de1 in-game AUTH
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5637 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-08-16 11:12:48 +00:00
flowtron 586611304a PROTOCOL 1130
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5559 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-08-07 23:04:53 +00:00
Rafael Barreto 53d17b76ad clean up, and FIXME comments
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5527 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-08-02 21:10:49 +00:00
Rafael Barreto 7a3897b4c7 credits included/fixed (thanks to Gibstick), some medal interface WiP (thanks to kirin), afk autokick not affecting spectators if the server is not full, and more anticheat compatibility
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5463 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-27 19:27:47 +00:00