* fix some memory leaks
* rename stuff
* fix crash
Removed commands and variables:
chmenumdl (replaced by menumdl)
scorefont (replaced by "menufont score mono")
menuitemvar (better handled with fully dynamic menus)
Changed commands:
menufont menu font
Sets the font for a specific menu. If menu is "", the currently
initialised menu is used. Example: menufont score mono
menumdl menu mdl anim rotspeed scale
Assumes the function of the previous chmenumdl. If menu is "", the
currently initialised menu is used. Specifies, which model to render
and how. If only menu is specified, no model is rendered.
DOCREF chmenumdl scorefont menufont menumdl menuitemvar
- omit step size for sliders with value descriptions
- optionally auto-determine max value by list length
menuitemslider text min max value display action wrap
menuitemradio text min max value display action
text: menu item text
min: min value
max: max value (or optionally -1 and set by display string length)
value: initial value
display: list of value descriptions or value step size
action: executed on value changes (new value in arg1)
wrap: if 1, wrap slider around (radio buttons always wrap)
DOCREF menuitemslider menuitemradio
it gets cut off on 5:4 screens...
hideeditslotinfo 0..2
0: show info always
1: only show "unassigned slot" if necessary
2: never show info
DOCREF hideeditslotinfo
updateeditinfopanel is a cubescript hook to provide additional information
about the current edit situation, like, for example, the closest entity.
The returned text is rendered on the right side of the screen.
Default for updateeditinfopanel is explainclosestentity which provides
detailed info about the closest entity.
editinfopanelmillis <n>
update the edit info panel every n milliseconds
hideeditinfopanel 0|1
render (0) or hide (1) the edit info panel
DOCREF updateeditinfopanel editinfopanelmillis hideeditinfopanel
Images are stored in packages/misc/igraph/*.png and loaded during game
start. Filenames consist of the image shorthand (mnemonic) and optional
frame times, separated by "_". Keep in mind, media file names may only
contain letters, digits and "_-.()".
All texts displayed in the game console are scanned for mnemonics prefixed
with ":". All found matches are replaced by the image.
The images are displayed as squares with width and height the same as the
regular font height. To create animations, put several square images side
by side into the file. For example, a 128x32 image is interpreted as four
frames. Frame duration is encoded in the filename, so, for example the file
"nop_1000_200_100.png" shows the first frame for 1000 milliseconds, the
second frame for 200 msec and the third (as the rest) for 100 msec.
Igraphs "1" to "9" are hardcoded and can be manually encoded in menu texts.
Use the new escape code "\i" plus the number of the image: "\i\1".."\i\9".
Other images can be used in menus as well, but the codes have to be fetched
by getigraph.
new commands:
updateigraphs
Checks for new files in packages/misc/igraph. Only necessary, if new
files are added during the game - for example, by mod package download.
getigraph <mnemonic>
Returns an encoded string to display an image outside the console, or
an empty string, if the mnemonic was not found.
new parameters:
igraphsize 80..300 (default 120)
scales the images (in percent)
igraphsizehardcoded 80..160 (default 106)
scales the hardcoded images "1".."9" (in percent)
igraphanimate 0..1 (default 1)
if 0, only the first frame of every image is displayed
igraphdefaultframetime 5..2000 (default 200)
used for images with multiple frames but no frame duration specified
in the filename
hideigraphs 0..1 (default 0)
if 1, no new images will be shown in the console
DOCREF updateigraphs getigraph igraphsizehardcoded
DOCREF igraphsize igraphanimate igraphdefaultframetime hideigraphs
- cleanup scoreboard menu code
- clientlog info messages for debug binaries only
- have debug binaries check for easy docs errors
- docinvalid now also checks for broken references
and: fix enumsounds, kill some CR, cleanup
menuitemcheckbox <text> <value> <action> <position>
Now takes an optional fourth parameter "position" in the range from 0
to 100, default 0, which moves the position of the checkbox over the
width of a text input or slider, with 100 being left and 0 being right.
DOCREF menuitemcheckbox
- collect most sound infos in one table and use it to generate the menus
- no more sound category checks with ranges
- now only PAINx and FOOTSTEP* sounds use hardcoded index numbers
enumsounds <list of categories>
Lists sound index numbers and short descriptions for all sounds of one
or more categories. The argument should contain one or more of PAIN,
OWNPAIN, WEAPON, PICKUP, MOVEMENT, BULLET, OTHER, VOICECOM, TEAM,
PUBLIC, FFA, FLAGONLY. All sounds with at least one of the flags will
be listed. Flag names prefixed with "!" will exclude all matching
sound from the list.
Example: /echo (enumsounds "VOICECOM !PUBLIC") will list all voicecom
sounds that are for teams only.
DOCREF enumsounds
- add new hook "autoexec", executed right after autoexec.cfg
- properly report errors during hook execution
- new script to edit the contents of an alias in the console
DOCREF autoexec
Restore the old persistidents system from AC 1.0, since it's working as
intended - if used properly.
As a reminder:
* aliases created by "const" and "tempalias" are never persistent
* aliases created or altered by "alias" or "=" become persistent, if
the persistidents flag is set during that operation
* persistidents if false during the execution of almost all config files
during game start - those files can create aliases with default values
which will not be persistent (until changed later while the flag is
set)
* before saved.cfg is executed, the flag is set and stays set all
throughout the game - which means, that all changes (from menus, for
example) will change the altered alias to "persistent"
* exceptions for map or model config files are unnecessary, since those
run restricted and can't create aliases anyway
* exceptions are necessary for "late run" config files like those in
config/opt/
The new command "persistidents" may be used to manually set or clear the
flag. It also returns the current state of the flag. If used in a config
file, the flag is restored to its original value when the file ends
execution.
In short: only late-run config files (meaning: run after saved.cfg was
restored) may need to manually set/reset the flag. Use const and tempalias
where appropriate and clear persistidents before creating an alias with a
not-to-save default value that may be changed and made persistent later.
DOCREF persistidents
- split into strafe roll (maxroll) and damage roll (maxrolleffect)
- locally recompute remote players roll (can be removed from pos pkt)
- fix maxrollremote
DOCREF maxroll maxrolleffect maxrollremote
The screen resolution menu now shows two batches of resolutions: first
those recommended by the graphics driver and then some more default
resolutions. Resolutions higher than the reported maximum are not listed.
setdesktopres was replaced by two variables reflecting the desktop
resolution (or zero, if not available): desktopw and desktoph
getdisplayresolutions returns a list of available screen resolutions
DOCREF getdisplayresolutions desktopw desktoph setdesktopres
The mapper has now the choice to disable several graphics features on
the client (for his map only, of course). The overrides are stored in
the map header.
mapoverride_nowaterreflect
If "1", water reflection is disabled. Useful, when odd water colours
are used to emulate other liquids that are not supposed to be that
reflective.
mapoverride_limitwaveheight
If "1", waveheight is capped at 0.1 max. Useful for small water
areas (like puddles), where higher waves would look weird.
mapoverride_nostencilshadows
If "1", stencil shadows are disabled. On clients, where stencil shadows
are otherwise enabled, blob shadows are used instead. If shadows are
disabled anyway, they stay disabled. Useful for dim maps, where hard
shadows make no sense.
The player is free to ignore any of those overrides:
ignoreoverride_nowaterreflect
If "1", mapoverride_nowaterreflect is ignored and regular client
settings are used.
ignoreoverride_limitwaveheight
If "1", mapoverride_limitwaveheight is ignored, and "waveheight" is
used unchanged.
ignoreoverride_nostencilshadows
If "1", mapoverride_nostencilshadows is ignored.
DOCREF mapoverride_nowaterreflect ignoreoverride_nowaterreflect
DOCREF mapoverride_limitwaveheight ignoreoverride_limitwaveheight
DOCREF mapoverride_nostencilshadows ignoreoverride_nostencilshadows
Two new commands, menuitemeditkeyinput and menuitemspectkeyinput, both
work the same as menuitemkeyinput - only for edit and spect binds.
The new edit keys menu should also work fine as edit key help :)
menuitem[|edit|spect]keyinput text bindcmd
Menuitem, that displays "text" and all keys, that bind "bindcmd" - in
game-, edit- or spect mode.
DOCREF menuitemeditkeyinput menuitemspectkeyinput
During startup, it is checked, if the game account needs to be unlocked
by password. If so, the password is asked and applied.
If no game account exists yet, the creation of a new account is offered.
new command "mypubkey": returns public key of game account, or empty
string, if no account exists or it is unusable (due to missing password,
for example)
DOCREF mypubkey
Stock strftime doesn't use capitalized "P", so for example on Windows
the wall clock didn't appear for 12h format. PM and AM are converted
to lowercase.
Zipped mod package files should be placed in "mods/" and need to contain
directory trees starting with "packages/" (or "config/"). The files from
a zip mod replace files, that exist in the original game install or add
new files.
The zip file should contain three special files:
desc.txt
Contains one line with a descriptive title for the package and ten
more optional lines with a detailed description.
preview.jpg
Preview picture for the mod. Must not exceed 128 kbytes. Aim for
512x512 pixel.
revision_n
Empty file. The "n" in the filename should be a valid integer number
instead, specifying the zip revision. Example "revision_123".
The settings menu shows the active mods in order of their priority - which
determines, which file to use, if several mod packages try to add or
substitute the same file. Zip files higher up in the list win.
1. Counting backward for gametimedisplay = 1 and forward for 2. The setting
added to HUD menu.
2. Changed name from clockdisplay to gimetimedisplay, in order to
distinguish clocks with system time and game time.
3. Added to wall clock options with UTC/GMT time and 12h format.
DOCREF clockcount clockdisplay gametimedisplay
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.