Commit Graph
240 Commits
Author SHA1 Message Date
ac-stef fe6f9e92a7 tab and formfeed cleanup 2015-06-10 14:28:50 +02:00
ac-stef f3e72b8fb7 remove gettext
DOCREF gettext
2015-06-10 14:28:50 +02:00
ac-stef 8745d002f0 new commands to edit map config items
automapconfig
  Enables the "automatic embedded map config data" feature, which means
  with the next map save the map config file gets renamed and the map
  config data stored inside the map file.

mapsoundslotusage <map sound slot number>
  Returns a list of map entity indices which use a certain map sound slot.
  If the sound is unused, it returns an empty string.

deletemapsoundslot <map sound slot number> <"purge">
  Deletes an unused map sound slot. If "purge" is specified as second
  argument, it also deletes an used slot (including all map entities
  which use that sound). Also enables automapconfig.

editmapsoundslot <map sound slot number> <map sound path> <maxuses>
  Edits path/name and maxuses parameters of a mapsound slot. Only
  non-empty parameters actually change something. The command returns
  the resulting data of the map sound slot. If only the map sound slot
  number is specified, no changes are made, but the current data is
  returned. Therefore the command can be used to get and set parameters.
  If anything is changed, automapconfig is enabled.

mapmodelslotusage  <mapmodel slot number>
  Returns a list of map entity indices which use a certain mapmodel slot.
  If the mapmodel is unused, it returns an empty string.

deletemapmodelslot <mapmodel slot number> <"purge">
  Deletes an unused mapmodel slot. If "purge" is specified as second
  argument, it also deletes an used slot (including all map entities
  which use that mapmodel). Also enables automapconfig.

editmapmodelslot <mapmodel slot #> <radius> <height> <z-offset> 0 <path>
  Edits the parameters of a mapmodel slot. Only non-empty parameters
  actually change something. The command returns the resulting data of
  the mapmodel slot. If only the mapmodel slot number is specified, no
  changes are made, but the current data is returned. Therefore the
  command can be used to get and set parameters.
  examples:
    editmapmodelslot 33 "" "" -5
      sets the z-offset of slot #33 to -5 without affecting other params
    echo (editmapmodelslot 33)
      print the current parameters of mapmodel slot #33
      for example: 0 0 0 0 "makke/lightbulb"
  If anything is changed, automapconfig is enabled.

gettexturelist <includes> <excludes> <extensions>
  Returns a table of all texture files fitting a certain description.

  includes
    Optional list of path prefixes to include in the table.

  excludes
    Optional list of path prefixes to exclude from the table.

  extensions
    Optional list of filename extensions to include in the table.

  All files found under packages/textures are examined. By default, the
  command returns a list with two columns: path and filename. If "excludes"
  is exactly one path prefix to exclude, the table gets a third column
  with path names without that prefix. If "extensions" is exactly one
  extension which does not start with the character '.', the table gets
  an additional (third or fourth) column containing file names without
  that extension.

  examples:

    echo (gettexturelist)
      outputs two columns like "noctua/wall" "wall02.jpg"

    echo (gettexturelist "" "map_editor skymaps")
      same, but omits skymaps and special textures for the editor

    echo (gettexturelist makke)
      outputs only textures by makke and adds a third column
      like "makke/rattrap" "rb_box_03.jpg" "/rattrap"

    echo (gettexturelist "skymaps/" "" "_ft.jpg")
      outputs four columns like
        "skymaps/egypt" "egypt_ft.jpg" "egypt" "egypt"
        "skymaps/humus" "meadow_ft.jpg" "humus" "meadow"

textureslotusage  <texture slot number>
  Returns a list of mapmodels who use that texture as skin. If no mapmodel
  uses the texture, but world geometry does, a string of whitespace is
  returned. If the mapmodel is unused, an empty string is returned.

deletetextureslot <texture slot number> <"purge">
  Deletes an unused texture slot. If "purge" is specified as second
  argument, it also deletes an used slot. All mapmodels that use that
  texture as skin are changed to default skin. All world geometry, which
  uses the texture, is instead set to use slot #255. Slots below #5 always
  require "purge", no matter if they are in use (default slots).
  Also enables automapconfig.

edittextureslot <texture slot #> <scale> <path>
  Edits the parameters of a texture slot. Only non-empty parameters
  actually change something. The command returns the resulting data of
  the texture slot. If only the texture slot number is specified, no
  changes are made, but the current data is returned. Therefore the
  command can be used to get and set parameters.
  examples:
    edittextureslot 33 "" "arcitool/rohbaubims.jpg"
      sets texture name of slot #33
    echo (edittextureslot 33)
      print the current parameters of texture slot #33
      for example: 0 "zastrow/3wood_crate_10.jpg"
  If anything is changed, automapconfig is enabled.

deleteentity <entity index/number>
  Deletes a map entity. (Note: deleting an entity only marks it as unused.
  It will be completely removed after saving and loading the map.)

editentity <entity index/number> <x> <y> <z> <attr1> <attr2> <attr3> <attr4>
  Edits a map entity. Edits only parameters given a non-empty value.
  Returns the values of all attributes (type, x, y, z, attr1-attr4).

  examples:

    echo (editentity 33)
      prints all attributes of map entity number 33
      for example "light 174 172 12  20 255 200 200"

    editentity 33 "" 173
      changes the y-position of entity 33 to 173

rereadtexturelists
  Variable, which is set to "1" when a texture is downloaded. Used to
  trigger menu rebuilds.

rereadsoundlists
  Variable, which is set to "1" when a sound is downloaded. Used to
  trigger menu rebuilds.

DOCREF mapsoundslotusage deletemapsoundslot editmapsoundslot
DOCREF mapmodelslotusage deletemapmodelslot editmapmodelslot
DOCREF textureslotusage deletetextureslot edittextureslot
DOCREF gettexturelist deleteentity editentity
DOCREF automapconfig rereadtexturelists rereadsoundlists
2015-05-18 14:46:03 +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 39cbee947d Merge branch 'master' into next 2015-02-08 16:17:04 +01:00
aurhat 6e0e7bb333 Optimize and fix autodownload feature
The commit:
1. fixes value of download speed in KB;
2. introduces unique names of progress_callback() functions;
3. removes one unnecessary write_callback() function;
4. removes duplicated code/info in loadmodel().
2014-11-26 21:05:07 +01:00
aurhatandac-stef c4ce44867f Fix reset of packages source servers list
Earlier "resetpckservers" command cleared this list, instead of reset
to the initial settings.
2014-11-15 17:37:30 +01:00
ac-stef 8604c198e9 cleaning up cubescript hooks
- provide a function to easily assemble and execute the command
- context-selective execution of hooks
- restrict potentially exploitable or harmful hooks to singleplayer-modes
2014-11-12 17:06:35 +01:00
aurhat 075c53a6b0 Better visibility for warning about outdated AC version
Commit changes also masterserver URL to AC homepage in info related
to this warning.
2014-09-20 16:45:22 +02:00
ac-stef 9fd7740855 remove non-thread-safe function call
conoutf can't be used from any thread other than the main one.
clientlogf may still mix up the output, but it won't crash.
2014-07-27 20:41:40 +02:00
aurhatandac-stef 7c4a7e54f4 Disable listdemos and getdemo in singleplayer 2014-07-19 14:38:33 +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
ac-stef d81c884cea removed now redundant code
and substituted "copy file and delete original" with "move file"
2014-05-19 18:48:54 +02:00
ac-stef d3bda71212 map file addons: embedded config file; persistent undo/redo data
This commit establishes an extensible way of storing additional data in
map file headers. Those header extras can be permanent, like the embedded
config file or be used only once after map load like the undo/redo data.

Additional extra data can be easily added and will not break backward
compatibility, so this map format should hold up for quite some time.

To make things easier for mappers, maps can now be saved without invoking
the various optimisations. That, in combination with the stored undo data,
means, that editing a map can be picked up at exactly the same state, as
the map was saved in.

Maps will automatically be written in the appropriate fashion, depending
on the situation:
 1) for sendmap: no optimisation, no undo data
 2) savemap during editing: no optimisation, with undo data
 3) savemap when not editing: optimised, no undo data
 4) savemapoptimised: optimised, no undo data
(For savemap to save different maps during editing, the variable
 preserveundosonsave has to be "1". It is "0" by default.)

All of the above map files can be played without problems - they only
differ in file size. (However, maps with undo data may be too big to send)

The new command "embedconfigfile" will load the config file, include it in
the map header and rename the original text file.

"extractconfigfile" will write an embedded config file to a separate file
and remove it from the map header.

Embedded config files take precedence over regular config files and
therefore make it harder for cheaters to play with modified config files.

further changes: cleaned up some debugging code; more ASSERTs
2014-05-15 16:07:52 +02:00
ac-stef eb60302e67 cleanup
- fix possible crash in conc (but it's still an ugly hack)
- fix noob usage of strcmp
- flag some memory leaks (it would be nice, if the author(s) would clean
   up the mess himself)
- fix crash in substr
- whitespace cleanup

there are plenty more memory leaks in command.cpp - for example, every
goto in cubescript does not clean up anything
2014-05-14 22:54:37 +02:00
Lucas GAUTHERON 5feb0daae5 rewind command crash fix (Closes #2) 2014-01-18 22:47:29 +01:00
James Harris 6db804ea19 Fix server sorting (official maps option) and grammar/punctuation fixes to securemapcheck
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7687 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-12-26 23:15:06 +00:00
RandumKiwi 86a63fc554 Fix for some buggy libcurl versions (linux).
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7656 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-11-10 18:54:27 +00:00
Ronald Reagan a5c804fa57 We want our colon.
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7632 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-11-08 05:50:32 +00:00
Lucas GAUTHERON 2070fe4b79 MS: serverlist requested with HTTP
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7601 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-10-12 21:09:42 +00:00
Lucas GAUTHERON e09f3600a1 indent fix, cleanup
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7575 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-10-06 15:39:27 +00:00
Lucas GAUTHERON a3d24e2c3d autodl fix when no writing permissions (2/2)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7574 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-10-06 15:35:18 +00:00
Lucas GAUTHERON 98cc2d91ac autodl crash if no writing permissions fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7569 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-10-05 12:24:22 +00:00
Lucas GAUTHERON 03a73c40e7 no autodl spam
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7535 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-08-09 17:27:57 +00:00
Lucas GAUTHERON 727bb4cb69 autodl: fix downloading for packages containing spaces in their names
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7499 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-06-24 12:39:45 +00:00
Lucas GAUTHERON 63e5844722 sortpckservers: detect the best server to download content from
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7482 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-05-12 12:43:47 +00:00
Lucas GAUTHERON e25bf23db7 display overall download progress while downloading packages
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7466 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-04-26 22:49:09 +00:00
Bukz c0d60d0fc6 make the go_to console message optional
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7443 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-30 18:19:12 +00:00
Bukz 2c37c1279a /getmap successfully installed cubescript callback, /dlmap command
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7442 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-30 17:12:34 +00:00
Lucas GAUTHERON ebcbbbc933 autodownload update
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7389 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-23 08:05:58 +00:00
Lucas GAUTHERON a6e408eb13 autodl switch
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7386 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-22 20:18:40 +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
aerkefiende 49ea40557a onDisconnect alias now returns the clientnumber (-1 for local players)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7142 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-01-27 20:42:33 +00:00
sireus b33116712c sane(r) command signatures (warning: huge commit)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6908 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-10-06 22:49:49 +00:00
sireus 66bcbbbabe experimental compatibility mode for 1.1.0.4 demos
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6848 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-06-29 14:19:40 +00:00
sireus bd9a5b801a fixed windows build errors
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6796 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-04-25 17:31:20 +00:00
sireus 34e56ae7d1 use var lang instead of alias LANG, and some cleanup in language detection
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6774 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-03-30 12:44:07 +00:00
Rafael Barreto aa10c09bd3 sending defs to ms
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6756 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-02-09 16:16:16 +00:00
Lucas GAUTHERON 994d5e0485 setadmin 0 fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6742 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-12-29 10:15:20 +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
Bukz 5a7e64793f onPickup fix, onDisconnect, docs
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6606 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-08-20 23:00:10 +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
Lucas GAUTHERON f6bbd73b2a cubescript events update, fixes and doc.
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6476 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-05-28 19:35:18 +00:00
Lucas GAUTHERON ad48145196 $curdemofile
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6432 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-05-14 15:09:47 +00:00
Lucas GAUTHERON 414572e574 rewind a demo, set time remaining
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6424 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-05-14 12:11:51 +00:00
Lucas GAUTHERON e09157c29b hudecho can be disabled
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6397 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-04-30 00:34:08 +00:00
Bukz 0aecce709f hudecho
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6392 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-04-29 15:51:10 +00:00
flowtron f3e4d1b73b minor comments & fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6151 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-03-28 20:07:29 +00:00