Commit Graph
19 Commits
Author SHA1 Message Date
aurhatanddrian f1eb081383 Fix water blinking
Blinking was good visible and annoying in edit mode, for example for
alpha=255. Backport from Sauerbraten.
Thanks BrutalSystem
2021-02-15 05:22:22 +01: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 d56d8f91b6 fix restricting watercolour
get coal down from 213 to 91 clipped entities
2016-09-28 16:22:11 +02:00
ac-stef 18375a7c18 sort shadow entities behind lights
- restrict watercolour to edit mode
- some map fixes
- add dev_coal
2016-09-25 16:07:06 +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 05e0bf5b30 new command to retrieve the water colour
getwatercolour

  Returns a string with the four components of the water colour, red,
  green, blue and alpha.

  Example: echo (getwatercolor)  --> 20 25 20 178

setwatercolour what value

  Allows setting the components of the water colour independently. "what"
  is either a keyword "red|green|blue|alpha" or the index number 0..3 and
  determines, which component is set to "value".

  Example:

    watercolour 0 0 0
      sets all colour components to zero

    setwatercolour red 200
      sets the red component to 200

DOCREF getwatercolour setwatercolour
2016-09-03 16:56:10 +02:00
ac-stef ea480a7b0c higher resolution for waterlevel
Interpret the waterlevel value as tenths of a cube.

This makes the waterlevel variable a float value to the user, while the
map file still stores an integer value - but now it is interpreted
differently - for example, a waterlevel value of 123 now means 12.3 cubes
instead of 123. Old map files are converted during loading.

Note: the values of waterlevel and hdr.waterlevel need to be in sync.

DOCREF waterlevel
2015-05-18 14:59:41 +02:00
ac-stef 493aefd34b fix: convert xmap path names for windows
* make sure, unsaved edits only count in editmode (otherwise "watercolour"
  in map configs would already be "edits")

* nicer filenames for backup-xmaps

* catch failed xmap file write access

* unsavededits is now flag (!= 0) and counter - to enable scripts to
  detect "new edits".

new commands:

xmap_delete_backup    deletes the backup xmap

xmap_keep_backup    moves the backup xmap to a regular named spot

xmap_rename    changes the nickname of an xmap
2014-05-19 12:31:26 +02:00
ac-stef b0649b5ea5 multiple map buffers for map editing: "xmaps"
An xmap holds everything related to map editing at a certain moment: it is
a map editing snapshot. It contains the name, the header, the geometry,
the entities, the extra headers, the undo/redo data and the cameraposition
from the moment, the snapshot was taken.

Xmaps are held in memory and, if persistentxmaps is set to "1", are saved
at game end and restored at game start.

xmap_list
  lists all xmaps currently in memory

xmap_store <nickname>
  create a snapshot and store it under the given nickname
  (nicknames have to qualify as valid filenames)

xmap_restore <nickname>
  restores the named snapshot. Also creates a backup snapshot of the
  current editing data.

xmap_restore
  restores the last automatic backup snapshot. Automatic snapshots are
  taken, a) before a snapshot is restored, b) before a new map is loaded
  (if there were unsaved edits on the map) and c) when the game ends (if
  there were unsaved edits).

xmap_delete <nickname>
  deletes the named snapshot.

Unsaved edits are flagged in the HUD with an "U" in the lower right
corner of the screen.

The files with the persistent xmaps are stored in mapediting/xmaps. After
they were restored at game start, the files are moved to
mapediting/xmaps/backups. Xmap files are cubescript files.
2014-05-15 17:34:25 +02:00
sireus b33116712c sane(r) command signatures (warning: huge commit)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6908 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-10-06 22:49:49 +00:00
sireus 55a68dde53 configurable wave height
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6847 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-06-28 21:52:48 +00:00
Lee Salzman 583412b07b fmod fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6659 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-09-28 19:41:04 +00:00
Lee Salzman 6c4b5b9a3a cheaper water animation
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6657 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-09-26 07:45:17 +00:00
flowtron e4bc0ea4c6 informative edittoggle
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5687 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-09-11 14:38:51 +00:00
Lee Salzman 54cc44c3db revising pch setup
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4690 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-11-07 06:42:37 +00:00
Lee Salzman a17d0e5ca8 glmatrix cleanup
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2761 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-09-25 12:14:20 +00:00
Lee Salzman 1613cee199 syntax cleanup
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2759 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-09-25 08:58:15 +00:00
Lee Salzman cc3b343169 reflection clipping cleanups
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2076 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-05-21 02:44:30 +00:00
Lee Salzman 875ed5eeb1 reflection scissoring optimization
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1830 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-04-28 07:27:48 +00:00