Commit Graph
4344 Commits
Author SHA1 Message Date
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 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
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
aurhat da2d3ef4cc Update packaging/releasing resources/informations 2016-12-27 19:24:49 +01: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
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
ac-stef 60a7fa9e17 don't pitch weapons and playermodels 2016-11-21 22:11:41 +01:00
ac-stef 8cd6d15247 hide hudgun while menu shows a mapmodel
...to avoid overlap
2016-11-20 15:20:16 +01:00
aurhat 55142cbe41 Add transparent 32x32 icon to AC window
It bases on .../docs/images/icon.png from AC website repository,
just removed empty space, edges changed to more noticeable.
Note: on Mac an icon from assaultcube.icns is used.
2016-11-19 18:19:45 +01:00
ac-stef 76fadbae52 use camera pitch when browsing mapmodels
-10°..10° is treated as zero
2016-11-17 15:30:11 +01:00
ac-stef 551a501546 fix entity todo list 2016-11-07 15:31:05 +01:00
ac-stef e12d25dc95 add todo list for entities
Add some commands to support an entity TODO list. Entity errors during
map load are automatically added to the list. The list is saved and
restored with xmaps. A keybind (no default key assigned) to scroll
through TODO entities was added.

The list is indented as a means for automated map check scripts to
return a list of entities to fix.

cleartodoentities [index]
  Clear list of TODO entities. The list is also deleted, when a new map
  is loaded.
  If an entity number is given as an argument, only entries for this
  entity are cleared.

addtodoentity index comment
  Add the entity #index to the TODO list. Add optional comment.

enumtodoentities
  Returns a list of TODO entities. Returns entity index number and comment
  for every entry.

DOCREF enumtodoentities addtodoentity cleartodoentities
2016-11-05 17:42:30 +01:00
ac-stef 5177988bac show faulty playerstarts as yellow players 2016-11-03 14:20:34 +01:00
ac-stef dc3abca170 less buggy filter function
likes highres skins
2016-11-03 01:19:11 +01:00
ac-stef 5af661ddeb debug switch to filter out some load_world errors
do not flag some map config errors that can be fixed by search&replace
(for use in map conversion scripts only)
2016-11-01 00:40:10 +01:00
ac-stef 64a7eef335 some fixes 2016-11-01 00:40:07 +01:00
aurhat e52c7b4e6e Fix warnings in Xcode 2016-10-25 20:43:39 +02:00
aurhat 7c27ddd167 Update Xcode project
Note: in InfoPlist.strings there is current AC version.
2016-10-25 20:32:00 +02:00
aurhat 9849a73c26 Backport SDLmain files from SDL 1.2.15 for Xcode
Important: always custom code should be added to disable
error sounds because of SDL_ENABLEAPPEVENTS - after keys
pressing (see code below "ADDED SO IT DOESN'T BEEP BECAUSE
WE ENABLE SDL_ENABLEAPPEVENTS" comment).
2016-10-25 20:27:12 +02:00
aurhat eae2625f7c Add dev SDL 1.2.15+ framework for Mac only
Note: the last commit is from 07.09.2016:
http://hg.libsdl.org/SDL/changeset/0c1a8b0429a9
2016-10-25 20:24:25 +02:00
ac-stef 71a12bfe82 allow custom mapmodels to depend on other custom mapmodels
By adding a "requires"-attribute to the mapmodel config file, a mapmodel
can trigger the map editor to include another model and have it loaded
during map load. This can be used to create model modifications which
use ressources of another model. For example, a new model can provide a
different skin for an existing model - and that attribute will make sure,
that the required original model is also loaded.

This mechanism does not work, if the attribute is changed after the map
is finished, because the map editor has to copy the dependency into the
map config file. After adding the attribute, the map has to be written at
least once (the dependencies are checked during savemap).

The point of dependency-attributes is to make sure the custom original
model is also loaded from a package server. Mods of official models do not
need to use the attribute, because the official model does not need to be
downloaded. The attribute is necessary, if one model on akimbo depends on
another model on akimbo.

The mapmodels that are required by other models have an additional
parameter "1" added to their mapmodel command in the config file - which
will preload the model during map load, even if no entity actually uses it.
The additional parameter is handled automatically.

The new command updatemapmodeldependencies triggers the dependency check
manually - which will make required models appear in the model list. This
is done automatically during savemap.

Changed commands:

  mapmodelslotusage

    now returns a single space, if the model slot is not used by any
    map entity, but is required by another model (with entities)

  mapmodel

    allows one more parameter - if "1", the model is preloaded, even if
    no entities use it

  mdlattribute requires <modelname>

    if used, specifies that the current model depends on parts of another
    custom model (which therefore also has to be downloaded)

    can only be used once per model config

    example:

      mdlattribute requires makke/signs/exit

        could be used in signs/loading-dock/md2.cfg to reuse
        makke/signs/exit/tris.md2

DOCREF mdlattribute mapmodel mapmodelslotusage
2016-10-16 21:54:22 +02:00
ac-stef 701d33af55 fix "no snprintf on VS" 2016-10-16 14:37:08 +02:00
ac-stef 1b5877e3fc treat CR as LF in cubescript
this hopefully doesn't break too much stuff...
2016-10-16 13:38:34 +02:00