Commit Graph
277 Commits
Author SHA1 Message Date
ac-stef cb2e20af98 optionally hide closest entity filename info
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
2017-05-30 10:43:55 +02:00
ac-stef 72e5b08463 add edit info panel
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
2017-05-30 10:43:55 +02:00
ac-stef 753474c401 menu updates
- separate settings menus for console and scoreboard
- some sorting
- "return" command removed

DOCREF return
2017-05-29 00:00:26 +02:00
ac-stef 5e20a2343b add animated inlined images for console text
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
2017-05-28 23:29:06 +02:00
ac-stef c97461a0f5 docs fixes and cleanup
- 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
2017-05-24 20:11:11 +02:00
ac-stef 8ece94d5bb allow menu checkboxes to change position
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
2017-05-24 02:09:17 +02:00
aurhatandac-stef 71a75a9dce Update keyboard menus 2017-05-24 02:09:09 +02:00
ac-stef d0b309320b really cleanup sound
- 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
2017-05-22 17:30:51 +02:00
aurhat e126faef15 Cleanup 2017-05-21 22:08:04 +02:00
ac-stef 6f03d1819b add menu for cubescript hooks
- 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
2017-05-16 13:11:32 +02:00
ac-stef 67a6b78353 add team frag counters for non-flag modes
hideteamscorehud 0|1

  same as hidectfhud before, but also for non-flag team modes

DOCREF hideteamscorehud hidectfhud
2017-05-14 20:57:58 +02:00
ac-stef b33ad603d4 cleanup
c removed

DOCREF c
2017-05-12 01:33:55 +02:00
ac-stef b650fca2ca persistidents cleanup
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
2017-05-05 15:50:59 +02:00
ac-stef 1b596e059a roll update
- 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
2017-04-29 18:23:23 +02:00
aurhat ab43f7acd5 Add command to return CN of spectated player
Also cleanup and added key shortcut to "whois" spectated player
(bound to "I" by default).

DOCREF spectatecn
2016-12-25 22:47:50 +01:00
ac-stef 206cbdcbd1 better AR approximation
and some fixes
2016-12-03 14:54:18 +01:00
aurhat ee7f75cc10 Add menu for spectate mode key binds 2016-11-29 20:10:35 +01:00
ac-stef 06de0ddf3c re-add default resolutions
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.
2016-11-24 01:32:54 +01:00
ac-stef 570e6aba2f only show available screen resolutions
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
2016-11-24 00:32:07 +01:00
aurhat 72dfcd73fe Cleanup
"showminremain" enabled by default, "fovcompat" removed.

DOCREF showminremain fovcompat
2016-10-14 21:49:53 +02:00
aurhat 1d91e49bbe Add high-res player skins
Thanks protox aka PrimoTurbo, the author of the high-res player skins:
http://primoturbo.deviantart.com/art/AssaultCube-Protox-HQ-Reskin-202784715

High-res player skins are added in mod zip package.
They are disabled by default.
2016-10-10 15:57:15 +02:00
aurhat 923feb249a Add detection and setting resolution as in desktop
Partially the code is ported from Sauerbraten.
Commit changes also menu items in Display resolutions menu.

DOCREF setdesktopres
2016-10-08 20:40:19 +02:00
ac-stef dae7773d68 fix involuntary shooting when switching guns while throwing a nade
also: more aggressive middle mouse button
2016-09-16 21:08:48 +02:00
ac-stef cb630bde49 add per-map overrides to disable graphics features
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
2016-09-04 17:44:22 +02:00
ac-stef b7d797d73c new menu for edit mode key binds
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
2016-08-26 14:34:44 +02:00
ac-stef daae49273d remove __fontsetting
instead, "curfont" returns name of current font

DOCREF __fontsetting curfont
2016-08-26 14:30:29 +02:00
ac-stef c4b570e8fd new menus for account management
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
2016-08-26 14:28:54 +02:00
ac-stefandaurhat 158a33caed cleanup config files
* moved compatibility.cfg and autosave.cfg to config/opt/
* firstrun.cfg merged into defaults.cfg

DOCREF compatibilitymode alive currole curmode getclientmode curteam
DOCREF findpn pstat_score orderscorecolumns
2016-08-15 11:52:49 +02:00
ac-stef 639067a003 add new ktf flag direction indicator
enabled by default, disable with "hidektfindicator 1"

DOCREF hidektfindicator
2016-08-05 16:26:24 +02:00
ac-stef 192a918844 add settings menu for crosshair effects 2016-08-05 13:33:28 +02:00
ac-stef f36c1661d8 less ugly screenshot type slider code
also: persistent
2016-08-05 01:42:02 +02:00
aurhat c1e9daee1e Cleanup 2016-07-17 13:27:10 +02:00
aurhat 1829ebff17 Improve settings for crosshairs
Also change resetmenu to resetcurmenu and some cleanups.
2016-05-22 23:06:24 +02:00
ac-stef 665c359907 add resetmenu
Short script to combine "delmenu" and "newmenu" as used in menuinit
scripts.
2016-02-07 18:34:32 +01:00
ac-stef 6571c8b012 new menu to configure package server priorities 2015-09-17 19:14:30 +02:00
aurhat 2fb111adf4 Fix wall clock with 12h format
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.
2015-09-08 01:05:54 +02:00
ac-stef f603031018 add zip mod package settings menu
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.
2015-09-07 14:53:56 +02:00
aurhat f10342fa80 Improve game time and wall clock display
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
2015-09-06 22:09:00 +02:00
aurhat 3a4edff826 Cleanup
Among other things it fixes masterserver compiling.
2015-08-16 16:44:18 +02:00
aurhat 6605a20e00 Add a wall clock with local time
It uses strftime formatting from "wallclockformat" alias.

DOCREF wallclockformat
2015-08-06 21:08:46 +02:00
aurhat 54c09b8c48 Remove/adjust gibnum in preset gfx settings 2015-07-15 21:58:36 +02:00
aurhat 5df5fec352 Reorder and cleanup gamma settings
Remark: "gamma" command changes gamma only temporary, to next map start.
2015-07-15 21:57:44 +02:00
aurhat 297b5c69f8 Improve audibility of sounds
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.
2015-07-15 21:56:15 +02:00
aurhat 9c0f99f2a1 Cleanup
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.
2015-07-04 11:30:58 +02:00
aurhat bfc273ee52 Select automatically menu item with chosen weapon 2015-06-13 23:40:05 +02:00
ac-stef fe6f9e92a7 tab and formfeed cleanup 2015-06-10 14:28:50 +02:00
ac-stef d249f00e88 clean up gibsgore and poniesmode 2015-06-10 14:28:50 +02:00
ac-stef d99d456a36 allow dyngamma for all maps 2015-06-10 14:28:50 +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
aurhat 1d497ac4d8 Add dedicated crosshair in edit mode
DOCREF loadcrosshair
2015-04-28 20:47:54 +02:00