Commit Graph
39 Commits
Author SHA1 Message Date
ac-stef 53f169274a fix end of string for the autogenerated embedded map config 2015-05-27 15:47:04 +02:00
ac-stef 7dc9dd54c9 reload map sound config when sound volume is changed from zero
It's a crowbar fix for a very stupid bug, but anything else would involve
debugging audio code. Sue me.
2015-05-27 15:47:04 +02:00
ac-stef ea480a7b0c higher resolution for waterlevel
Interpret the waterlevel value as tenths of a cube.

This makes the waterlevel variable a float value to the user, while the
map file still stores an integer value - but now it is interpreted
differently - for example, a waterlevel value of 123 now means 12.3 cubes
instead of 123. Old map files are converted during loading.

Note: the values of waterlevel and hdr.waterlevel need to be in sync.

DOCREF waterlevel
2015-05-18 14:59:41 +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 e318ecd68e integrated automatic embedded map config files
This patch enables an option to keep the map config embedded in the map
file - with autogenerated content. Any changes to map config data will be
written with the map. This includes data by loadnotexture, loadsky,
mapmodel, texture, fog, fogcolour, mapsound and shadowyaw. Once enabled,
all changes with those commands become persistent to the map.

New variables:

mapsoundchanged
  Set to "1" with every command that changes mapsound slots. Should be
  used to trigger a rebuild of mapsound menus.

New/changed commands:

mapsound
  Now returns the number of the created slot.

mapmodel
  Now returns the number of the created slot.

texture
  Now returns the number of the created slot.

loadsky
  Is now a builtin string variable (instead of a command), which means,
  that the current value can easily be retrieved or edited.
  The skymap name in the argument is now required to start with
  "textures/skymaps/" - but that part of the path can be omitted.
  examples:
    loadsky steini/steini2 (loads textures/skymaps/steini/steini2_*)
    loadsky textures/skymaps/steini/steini2 (same)
    loadsky ../foo/bar (loads textures/foo/bar_*)
    echo $loadsky

getnotexture
  Returns the current "notexture" path. (Set by loadnotexture)

dumpmapconfig (available for debug binaries only)
  Writes the current automatically generated map config to
  dumpmapconfig.txt.

DOCREF mapsoundchanged mapsound mapmodel texture loadsky getnotexture
2015-05-18 14:46:03 +02:00
aurhat 3d143a07bc Fix "alive" state for sounds
Earlier player in spectator mode heard still tinnitus and heartbeat sounds.
2015-01-06 13:00:42 +01:00
Ronald Reagan ab31e10ee3 Fixes OpenAl Error (A004) upon shutdown.
Basically removes the buffers _after_ stopping all sounds.
2014-11-13 01:32:52 -08:00
ac-stef 3606a4200c print more version info during init
also fixed parsing the audio device string
2014-07-26 11:19:36 +02: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
Bukz 28933e4e8d menu fix/saved.cfg cleanup
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7260 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-02-26 23:07:50 +00:00
aerkefiende 0c371cf539 Dead people don´t have tinnitus
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7023 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-01-01 23:09:51 +00:00
Lucas GAUTHERON c9de0d8eb8 disable heartbeat in osok gamemodes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7014 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-12-30 22:08:35 +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
Lucas GAUTHERON 37efdcdb3e registersound fix, + new "showgrid" variable
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6729 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-12-10 18:03:04 +00:00
sireus 6b0515e0bb VARP
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6563 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-08-02 10:15:52 +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
sireus 2e3de34c60 heartbeat sound
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6549 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-06-29 20:25:42 +00:00
Lee Salzman a4b83ef2ba warning fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6248 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-04-14 15:24:11 +00:00
flowtron d5b9b3efea FIX: bug-ID 3192360 - text is required for voicecom command.
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6111 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-02-27 22:17:33 +00:00
flowtron 7f6abd3d4b 32 sounds @ once
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5918 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-11-21 00:49:21 +00:00
flowtron b7cf748063 don't play local VCs if voicecomsounds is "Off"
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5569 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-08-08 16:46:11 +00:00
flowtron ed72dc0e7a really use the new VCs - plus attribution to DES|GeneralDisarray in creditmenu.cfg
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5529 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-08-02 23:19:46 +00:00
flowtron ea5bf0cca6 enable new VoiceComs
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5520 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-08-02 18:15:22 +00:00
flowtron 27feddeff8 fix music-delay issues - see end of config/sounds.cfg for preload_music option
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5354 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-13 07:55:38 +00:00
Rafael Barreto 2157072cc7 forbidden speech dictionary, deny coop for read only maps, and some suggestions from sam about client/server crashes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5138 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-06-04 00:42:58 +00:00
Lee Salzman 78ad6b8420 give reload sound higher priority
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4827 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-05-08 22:44:47 +00:00
Lee Salzman be94c703f2 setsize -> shrink
setsizenodelete -> setsize
deletecontentsa -> deletearrays
deletecontentsp -> deletecontents
vrealloc -> growbuf



git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4787 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-03-11 23:06:26 +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
ac_stef 050772c523 16 minor fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4153 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-02-09 13:40:44 +00:00
driAn 8b63ffeb44 audiomanager refactoring, class-ified world objects, member access cleanups
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3952 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-12-08 21:17:11 +00:00
driAn 3ef184e1d8 fixed footstep sound radius bug
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3883 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-12-06 13:32:38 +00:00
driAn 04fd93d840 sound radius limitations
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3879 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-12-05 23:02:40 +00:00
driAn 61c6ed5f67 fixed name collision
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3794 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-11-29 00:25:14 +00:00
driAn 02cf7f903f sound code refactoring, made sourcescheduler a singleton
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3792 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-11-28 22:50:15 +00:00
driAn dbcc3317ec further audio code refactoring, new cubescript macro for calling class objects inline-ish
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3764 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-11-26 19:53:23 +00:00
driAn 74e1468ee3 ac audio architecture refactoring
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3760 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-11-25 22:50:35 +00:00