It's solution for missing hit/shot/etc. sounds:
1. decrease priority of ambient sounds to low, in order to hear more
non-ambient sounds with priority greater than low;
2. increase amount of sound channels to hear more sounds. Newer sound
cards on PC should be able to use more channels than only 32;
3. improve preset sound settings.
Remark: after these changes for default value of mapsoundrefresh (10)
break in playing ambient sounds, caused by playing sounds with greater
priority, isn't practically audible. The break is audible for greater
value, for example for mapsoundrefresh=1000.
Remarks:
1. Changed order in keycmds lets to keep alphabetical order in saved.cfg .
2. Earlier long information in docs about arguments of command could be
invisible for low aspect ratio (example: "weapon" command), now it's fixed.
getvarrange <what> <varname>
Gets range attribute <what> for builtin variable <varname>.
what
one of "min", "max" or "default"
varname
name of any builtin variable (integer or float)
DOCREF getvarrange
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
Lists all available skymaps. List is divided into skymaps provided by
the original install ("official") and custom skymaps located in the
profile directory.
textureslotusagelist <what>
Return a list of 256 numbers representing the number of uses for every
texture slot. If <what> is "onlygeometry", uses as map model skin do
not count. If <what> is "onlymodels", the uses in map geometry do not
count.
gettextureorigin <path>
Returns the location where the texture actually can be found. The
possibilities are:
"official": texture was found in the working directory, which
indicates an official texture.
"custom": texture was found in the profile directory, which means,
the texture is either manually installed or downloaded.
"package dir #x": texture was found in a mod directory.
"<file not found>": that.
textureslotbyname <texture path>
Returns the list of numbers of all texture slots which use that texture
file.
edittexturestack <floor|wall|ceiling> <texture slot number>
Puts a texture slot in a "last used" list up front. The first
parameter picks the list, the second parameter is the texture
slot number to be used for the next edit
getautomapconfig
Returns "1" if automapconfig is already enabled, "0" otherwise.
getmapsoundorigin <path>
Returns the location where the map sound file actually can be found. The
possibilities are:
"official": the sound file was found in the working directory, which
indicates an official mapsound.
"custom": the file was found in the profile directory, which means,
the mapsound is either manually installed or downloaded.
"package dir #x": mapsound was found in a mod directory.
"<file not found>": that.
mapsoundslotbyname <mapsound path>
Returns the list of numbers of all mapsound slots which use that texture
file.
getmapsoundlist
Returns a list of all *.wav and *.ogg files below packages/audio/ambient.
DOCREF textureslotusagelist gettextureorigin textureslotbyname
DOCREF edittexturestack getautomapconfig
DOCREF getmapsoundorigin mapsoundslotbyname getmapsoundlist
The command mapmodelattributes is now more appropriately named
"getmapmodelattributes", and the former "getmapmodelattributes" is now
named "listallmapmodelattributes".
DOCREF listallmapmodelattributes getmapmodelattributes
Pressing the middle mouse button toggles a pin on the "closest entity"
selector. The HUD will indicate the lock by showing "pinned" instead of
"closest" entity. All actions, that would otherwise affect the closest
entity, will affect the pinned entity instead. Deleting the locked entity
will unlock it.
toggleclosestentpin
Toggles the pin on the "closest ent" selector. Bound to MOUSE3
by default.
DOCREF togglelockclosestent
BACKSPACE in combination with editmeta (LCTRL) now undeletes the last
deleted entity. BACKSPACE in combination with editmeta2 (LSHIFT) brings
up the menu "deleted entities".
The edit menu now has a submenu "deleted entities" which lists all
deleted entities and undeletes the selected one.
undelent [<index>]
If no index is specified, the last deleted entity is restored. If an
index is given, the specified entity from the list of deleted entities
is restored.
getdeletedentities
Returns a list of deleted entities. Each line contains the entity type,
the position and all seven attributes.
unlistdeletedentity [<which>]
If <which> is a number, the specified entry from the list of deleted
entities gets removed. If <which> is "all", the whole list of deleted
entities gets deleted. If <which> is "last" the last deleted entity is
removed from the list of deleted entities.
Returns the number of entities on the list of deleted entities (even if
the parameter <which> was unknown or not specified).
DOCREF undelent getdeletedentities unlistdeletedentity
and use it to enable unscaled editing of entity attributes
(first editmeta key is still LCTRL - but it is already used during
editing entity attributes to provide 10x speed)
enumentities <entity type name>
Returns a list of the numbers of all entities of that type. If no such
entities exist or the entity type could not be recognised, the list is
empty.
DOCREF enumentities
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.
To fully build (and use) mapmodel menus, edit mode is required. This
change builds parts of the menus only in edit mode, to avoid errors.
When edit mode is entered, the menus are rebuilt fully.
A mapmodel entity is placed at a z-coordinate that is based on the floor
height of map geometry and a z-offset. The z-offset is a sum of the
entity attribute 3 and the third mapmodel slot parameter. The entity
z-offset can range from 0 to 255 while the mapmodel slot parameter can
be any integer including negative numbers. So, to place a mapmodel below
floor height, the mapmodel slot parameter has to be negative.
This script decreases the mapmodel slot parameter by one and increases
the z-offset of every mapmodel which uses that slot also by one. This
means, that all mapmodel are exact in the same place afterwards - but
the entity z-offset now has room to lower the mapmodel by one more cube.
The script requires one parameter: the mapmodel slot number.
If you need more z-offset available, run the script several times.
DOCREF mapmodelzoff
Generates a list of all available skymaps under packages/textures/skymaps
by checking for files with the ending "_ft.jpg".
Note: argument completion does not work properly for arguments with spaces.
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
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
* Fixed completely broken hitsound mute toggle
* Moved bullet sound toggles into appropriate menu
* Changed heartbeat toggle to use muteitem (for consistency)
* Fixed footsteps toggle (Previous behavior was to turn off all
footstep sounds, a toggle already existing elsewhere, rather
than muting the specific sound as it's intended to)
* Sorted sound menu (At grenadier's request)
"editbind E edittoggle" is needed for such cases, when edittoggle will be
bounded to key, for which editbind exists. Then that will allow to
exit from edit mode still with use a key.
auto-generate mapmodel menus depending on the actually available models
in the current map config.
Also fixes memory leak in "newmenu".
DOCREF mapmodelname mapmodelbyname mapmodelchanged
Changes:
1. added single aliases bounded to the keys, in order to maintain easier
the binds;
2. cleaned up binds;
3. updated Keyboard menu and fixed searching binds.
Remark: aliases bounded to the keys shouldn't have leading and trailing
white spaces, if they are present in Keyboard menu, otherwise they won't
be found. So construction like, for example: bind SLASH [ key_commandline ]
is inadmissible.
4. Alternate edit binds (default disabled) moved to
config/opt/alternateeditbinds.cfg and removed old_editbinds variable.
DOCREF old_editbinds
Fixed nested list in Cubescript, fixed conopen (now read-only), removed changeteam(),
fixed name of shortcuts for team survivor modes (so it fixes
https://github.com/assaultcube/AC/issues/73 ).
DOCREF ts tsurv btsurv