Commit Graph
7781 Commits
Author SHA1 Message Date
ac-stef ec2cdb4533 print filenames for errors in map and model config files 2017-05-17 14:13:45 +02:00
ac-stef 6bafdb0037 allow particle type names in md2emit and md3emit
md[2|3]emit <tag name> <particle type> <attrib1> <attrib2>

  particle type may now be numeric 0..19 or one of SPARK, SMOKE, ECLOSEST,
  BLOOD, DEMOTRACK, FIREBALL, SHOTLINE, BULLETHOLE, BLOODSTAIN, SCORCH,
  HUDMUZZLEFLASH, MUZZLEFLASH, ELIGHT, ESPAWN, EAMMO, EPICKUP, EMODEL,
  ECARROT, ELADDER, EFLAG

also: cleanup

DOCREF md2emit md3emit
2017-05-16 17:50:00 +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 e256971725 allow empty strings as result of inputcommand 2017-05-16 13:08:21 +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 458b911ecd fix initialisation of entropy pool
have to know home dir before loading entropy.dat

add dummy screenshots on keypress events during first run to get entropy
2017-05-13 20:02:18 +02:00
ac-stef cf55e54faa fix damage indicator overflow after fastforward
break up shiftgametime() time jumps into 5-second jumps and five 1-second
jumps for the last five seconds

rename respawnoffset to lastdeath (because that's what it is)
rename clientside nextmillis to skipmillis (because that's what it does)
2017-05-13 03:46:00 +02:00
ac-stef e093b9f215 remove exception for color codes in conc 2017-05-12 19:53:55 +02:00
ac-stef 12925eaebc attribute damage blend effects to spectated player
...and clear it in case a different player is followed

also: cleanup
2017-05-12 19:07:38 +02:00
ac-stef 33af150e23 fix menu texture preview updates
it was kind of naive to hope, that newstrings would not reuse the exact
same freed memory that was used for the last string at least sometimes...
2017-05-12 13:49:23 +02:00
ac-stef abd37fe6d4 add command to rebuild mapmodel registry
While the mapmodel registry works fully automatically for all auto-
downloaded models, it does not check for manual changes to the filesystem.
To clear models from the list that have been deleted from the profile
directory and to add models that have been downloaded outside the game,
this new menu entry can be used.

mapmodelregistryclear deletes all loaded mapmodel attributes

loadallmapmodels checks the filesystem for mapmodels and loads them
(all trees below packages/models/mapmodels, in home, zips, mods, install)

Both together rebuild the whole mapmodel database.

DOCREF mapmodelregistryclear
2017-05-12 13:27:57 +02:00
ac-stef b33ad603d4 cleanup
c removed

DOCREF c
2017-05-12 01:33:55 +02:00
ac-stef 59389a14f9 use menuselectionbgcolor for all menu item types 2017-05-11 22:48:27 +02:00
ac-stef 4a7109b352 cleanup
that algorithm never worked
2017-05-11 22:26:49 +02:00
ac-stef 824d460262 write more data to clientlog in case of crash
write the stackdump and the cubescript history (if available)
at least try to close the clientlog file
2017-05-11 17:47:21 +02:00
ac-stef 3e1578c35f fix crash with menuselectiondescbgcolor 2017-05-07 20:30:55 +02:00
ac-stef deafcaab00 add batch map conversion stage to find stray entities
find entities in the middle of 8x8 solid cubes

removed a few ents from depot and venison
2017-05-06 19:37:36 +02:00
ac-stef 5eec79d792 add batch map conversion stage to find some unnecessary heightfields
In old versions of AC it was necessary to trick with heightfields to raise
a pickup entity. However, for quite some time now, pickups can be raised
by attribute.

This additional stage for convmap finds pickup entities where the
heightfield is most probably unnecessary. Fixing is manual work, though.

Updated those pickups on 16 maps.

Also fixed a playerstart on desert3
2017-05-06 00:52:31 +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 fc82b82b85 cleanup 2017-05-04 16:28:04 +02:00
ac-stef 5e638565f8 cleanup
- un-inline stuff that really doesn't need to be
- unify weapon id checks
- shrink guns
2017-05-02 21:38:58 +02:00
ac-stef 777638f3a9 ignore z differences when drawing radar 2017-05-02 00:39:30 +02:00
ac-stef a1687afb4c remove realtime model modding
models can still be changed by mod packages
2017-05-01 22:01:14 +02:00
ac-stef 64c146e52d texture fixes on dev_arabian
thx BrutalSystem
2017-04-30 22:57:07 +02:00
ac-stef 8d21f39ad9 more mouse code cleanup
- remove sensitivity training (should be rewritten in cubescript, if
  actually required)
- more documentation on mouse sensitivity parameters
- some renaming

DOCREF findsens
2017-04-30 21:15:05 +02:00
ac-stef f9223149ec mousemove code cleanup
- remove esoteric option to choose between a*b/c and a/c*b
- some comments added

DOCREF scopesensfeel
2017-04-30 20:36:35 +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
ac-stef deb73081e8 fix missing musicpreload range check 2017-04-28 16:55:55 +02:00
ac-stef 68c7ad1fe6 cleanup pi
use only one constant for Pi, in case we ever need to change it
2017-04-28 15:18:00 +02:00
ac-stef 967fd62077 cleanup 2017-04-26 16:14:39 +02:00
ac-stef 8e08cddaa7 improve cutcolorstring
now takes the width of characters into account

also: fix wraparound for docrefs
2017-04-24 21:48:57 +02:00
ac-stef 9739464381 unify menu slider width calculation
* fixes bug with text input fields with less than 15 chars allowed
* recalculates slider width for resolution and font changes (on menu open)
* new tab-like function for '\n' in menuitems: sync with slider width
  (see example in menus_edit.cfg in this commit)

DOCREF menuitem
2017-04-24 19:51:40 +02:00
ac-stef 227e6651f5 add option to sync tabs in menus
menusynctabstops 0|1
    if enabled(1), tab positions in a menu are synchronised
    default is off(0)
    affects menu title, header and items but not footer or descriptions

DOCREF menusynctabstops
2017-04-24 19:51:40 +02:00
ac-stef 066c820231 add menu output for reference searches
changed command:

  docfind <pattern> <silent>

    Searches for pattern in all reference entries. If <silent> is zero or
    omitted, all found references are listed.

    A table of all found entries is returned as result. For each entry,
    the index of the doc entry string that contains the pattern is listed.

new command:

  getdoc <ref> <idx>

    Returns a string of the doc entry specified by <ref>. String index
    numbers match with the result of docfind.

      0   name
      1   description
      2-  remarks

DOCREF docfind getdoc
2017-04-24 19:51:40 +02:00
ac-stef 78380dc45d fix docref
* now restricted to command references
* some parameter checks added

  docref <reference command>
    adds a reference to another command to the current commands
    description

  docrefvisible 0|1
    if set to 0, docrefs are not rendered (default 1)

DOCREF docref docrefvisible
2017-04-24 19:51:40 +02:00
ac-stef 8fdbee225e texture fixes
thx BrutalSystem
2017-04-24 00:14:44 +02:00
aurhat 782a885289 Fix and improve menu with keyinput items
1. Added background to description of selected keyinput item.
2. Added warning to menu footer, when user tries to bind already bound key.
3. Cleanup, fixed background color in description of selected active
menu items, when "menuitem" is absent in the menu.
2017-04-22 16:14:35 +02:00
ac-stef d73b0313cb fix text input field rendering of hidden text
also: show hidden content of input field as long as CTRL is pressed
2017-04-22 15:10:02 +02:00
ac-stef 6af6f650d1 fix double free in opengzfile
Now gzstream->open consistently does not keep a copy of the input stream
in case of failure - no matter the type of failure.
2017-04-22 12:41:51 +02:00
gy_beandac-stef 9820e59adb Fix local hitsound priority
Local hitsounds (/hitsound 2) work by running CubeScript
command `sound`, passing hitsound sound number and
priority (highest). However, `sound` command doesn't actually
take the second priority argument and always uses default normal
priority.

This commit adds the second prioity argument to `sound`.
It accepts numeric priority levels as well as string names.

Also use highest priority for server hitsounds (to be consistent with
local hitsounds).

(was pull request #164)

DOCREF sound
2017-04-20 13:53:55 +02:00
ac-stef c2d64d3a2b fix menu layout
- fix calculation of footer lines, menu pages and menu widths
- make sure, FONTH is never zero
- unify menu action execution
- clean up some code
2017-04-19 15:39:45 +02:00
aurhat 682c3b7425 Add number of pages in menu 2017-04-05 21:30:05 +02:00
aurhat 75e7481532 Play pull sound, when other players activate grenade 2017-03-28 21:53:40 +02:00
David Carlierandac-stef 3335508955 Memory leaks and delete operator fixes.
(pull request #168)
2017-03-26 15:42:29 +02:00
aurhat 419f667c0d Fix player model attack animations
Fixed animation of other players during following activities:
1. during jumping and attack - show attack animation;
2. during weapon reloading - don't show attack animation;
3. during grenade activation - don't show attack animation.
2017-03-21 23:50:45 +01:00
aurhat 0525981799 Limit docskip to doclines offset and reset it when docs disappears 2017-03-20 22:44:18 +01:00
aurhat 0c75b8ef4b Execute action after pressing Enter in menu text field 2017-03-20 22:42:21 +01:00
David Carlierandac-stef baa44b5eb2 fix linkage issue for *BSD system
openbsd does not have librt

(commit derived from #167)
2017-03-08 15:17:12 +01:00
aurhat 4d2d326136 Cleanup 2017-02-18 22:40:07 +01:00
aurhat 7ca26bc458 Change limit of chars in server name used by sbconnect 2017-02-12 21:31:00 +01:00