Commit Graph
183 Commits
Author SHA1 Message Date
ac-stef 035d7caf2f thread-safe and fully buffered logging
Uses own thread to actually write to logs, so the main thread can't be
blocked by a slow logfile. Log entries are buffered in two ringbuffers,
one for the main thread and one for all other threads. The main thread
will copy the second buffer to the main buffer periodically. The main
thread buffer is read from the log worker thread.

Since two buffers are kept, there are now several functions to add a log
entry:

  mlog()
    for main thread functions only: will never block

  tlog()
    other threads only: may block, until main thread copied some entries

  xlog()
    automatically determines, which thread it's been called from and
    then writes to the proper buffer (will block accordingly)

To avoid improper usage, mlog and tlog verify, if they are used correctly.
(Only for debug builds. An assert triggers, if necessary.)
2017-06-27 15:15:23 +02:00
ac-stef 1ca4ce54eb some server changes
tbc
2017-06-27 15:15:20 +02:00
ac-stef 954fe7ee7f cleanup edithide
- replace by simple bitmask
- rewrite showedithide, setedithide and seteditshow in cubescript
- menu added for convenient use

setedithide and seteditshow no longer accept entity type numbers as
parameters - only entity type names

showedithide, setedithide and seteditshow are considered deprecated

  edithideentmask

    Integer variable containing a bitmask of hidden entity types.

DOCREF showedithide setedithide seteditshow edithideentmask
2017-05-31 03:00:38 +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
ac-stef 1afd7515ab simplify masterserver type selection
Use a plain cubescript variable instead of a commandline switch.

mastertype
  0: classic direct TCP connection
  1: HTTP connection (via proxy) (default)

DOCREF mastertype "--mastertype="
2017-05-22 20:44:58 +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 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 e1ce0979d0 rewrite calculation of map geometry bounding box
and rename client-side struct "mapdims" to clmapdims (to avoid confusion
with server-side data)
2016-08-26 14:08:55 +02:00
ac-stef f3e72b8fb7 remove gettext
DOCREF gettext
2015-06-10 14:28:50 +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 e318ecd68e integrated automatic embedded map config files
This patch enables an option to keep the map config embedded in the map
file - with autogenerated content. Any changes to map config data will be
written with the map. This includes data by loadnotexture, loadsky,
mapmodel, texture, fog, fogcolour, mapsound and shadowyaw. Once enabled,
all changes with those commands become persistent to the map.

New variables:

mapsoundchanged
  Set to "1" with every command that changes mapsound slots. Should be
  used to trigger a rebuild of mapsound menus.

New/changed commands:

mapsound
  Now returns the number of the created slot.

mapmodel
  Now returns the number of the created slot.

texture
  Now returns the number of the created slot.

loadsky
  Is now a builtin string variable (instead of a command), which means,
  that the current value can easily be retrieved or edited.
  The skymap name in the argument is now required to start with
  "textures/skymaps/" - but that part of the path can be omitted.
  examples:
    loadsky steini/steini2 (loads textures/skymaps/steini/steini2_*)
    loadsky textures/skymaps/steini/steini2 (same)
    loadsky ../foo/bar (loads textures/foo/bar_*)
    echo $loadsky

getnotexture
  Returns the current "notexture" path. (Set by loadnotexture)

dumpmapconfig (available for debug binaries only)
  Writes the current automatically generated map config to
  dumpmapconfig.txt.

DOCREF mapsoundchanged mapsound mapmodel texture loadsky getnotexture
2015-05-18 14:46:03 +02:00
ac-stef 6ede08d011 keep the last five versions of saved.cfg and init.cfg
Renames the existing saved.cfg to saved-old-1.cfg (and an existing -1 to
-2, and so on) before the new saved.cfg is written.

This should help in cases where players mess up their config, because the
config is deleted with a five-game-starts delay.
2014-11-02 23:17:00 +01: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
ac-stef d3bda71212 map file addons: embedded config file; persistent undo/redo data
This commit establishes an extensible way of storing additional data in
map file headers. Those header extras can be permanent, like the embedded
config file or be used only once after map load like the undo/redo data.

Additional extra data can be easily added and will not break backward
compatibility, so this map format should hold up for quite some time.

To make things easier for mappers, maps can now be saved without invoking
the various optimisations. That, in combination with the stored undo data,
means, that editing a map can be picked up at exactly the same state, as
the map was saved in.

Maps will automatically be written in the appropriate fashion, depending
on the situation:
 1) for sendmap: no optimisation, no undo data
 2) savemap during editing: no optimisation, with undo data
 3) savemap when not editing: optimised, no undo data
 4) savemapoptimised: optimised, no undo data
(For savemap to save different maps during editing, the variable
 preserveundosonsave has to be "1". It is "0" by default.)

All of the above map files can be played without problems - they only
differ in file size. (However, maps with undo data may be too big to send)

The new command "embedconfigfile" will load the config file, include it in
the map header and rename the original text file.

"extractconfigfile" will write an embedded config file to a separate file
and remove it from the map header.

Embedded config files take precedence over regular config files and
therefore make it harder for cheaters to play with modified config files.

further changes: cleaned up some debugging code; more ASSERTs
2014-05-15 16:07:52 +02:00
ac-stef c3d4713904 clean up map header handling
Older versions of ac did not obey the map header field "headersize".
When a map was written, only the "version" field was updated, even if
the new written header had a different size. Thanks to bigger headers
in map versions 7 & 8 (and now smaller headers again in 9), the headersize
of basically all official maps is bogus. This fix makes sure, only proper
headersizes are written. It also makes the game tolerate different (bigger)
headers - and keeps their content untouched. Future map format extensions
can use this to add header information without breaking existing map parsers.

This patch establishes a new map format 10, which is identical to format 9,
with the exception that the headersize field is guaranteed to be correct.
Format 10 also allows any amount of additional header data.

This patch also cleans up the transformation routines for old map entities.
2014-01-27 23:01:23 +01:00
RandumKiwi 6188854697 v1202
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7645 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-11-09 22:57:02 +00:00
Lucas GAUTHERON ab294c1b2d MS now writes to servers.cfg directly and progress bar is fixed
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7638 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-11-09 14:07:51 +00:00
Lucas GAUTHERON a57f87582e game protocol and version bump
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7606 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-10-12 22:03:40 +00:00
Lucas GAUTHERON 4fe5069c3f ms domain changed
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7536 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-08-12 08:52:41 +00:00
Ronald Reagan ee4d03ef54 Version changes mac side and VERSION bump (1111->1200), xcode project update (may break compatibility)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6961 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-12-08 21:59:14 +00:00
aerkefiende 19f4558112 Command line now can use the mouse input as well (thanks to Felix-The-Ghost and SKB)
conskip fix (thanks to SKB)
new windows binaries

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6926 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-11-12 21:53:44 +00:00
Bukz 55a04c8cff fixes/MAXCL reduced to 16/protocol bump
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6813 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-05-29 21:31:43 +00:00
sireus 9e1437e9bc configurable masterserver port
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6791 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-04-20 16:49:39 +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
aerkefiende 06f73f4627 Replaced Tabs with 4 spaces in every source file
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6561 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-07-31 15:44:57 +00:00
Lucas GAUTHERON 414572e574 rewind a demo, set time remaining
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6424 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-05-14 12:11:51 +00:00
Lee Salzman c392b3d010 clean up messy anisotropy patch
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6017 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-01-17 19:27:32 +00:00
flowtron 0b63d7d07e new shotgun behaviour
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6012 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-01-17 18:27:53 +00:00
flowtron 79e97740c2 move SVN waaay outside (even potential) branches game
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5901 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-11-19 20:04:30 +00:00
Glen Masgai 9ed62eec8d version bump
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5878 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-11-15 16:43:04 +00:00
Rafael Barreto 3ada3cd193 fixing version number
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5678 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-08-23 14:46:27 +00:00
Rafael Barreto 0c0cc2c97c version 1.1.0.3 (protocol update), inclusion of the auth things, server vote fixes, client side warning about version updates
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5671 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-08-22 19:17:09 +00:00
Rafael Barreto b01dc4eddc bug fixes/enhancements: findsens, scripts, "gospectate", clean up and bug fix update 1.1.0.2 (do not revert this)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5600 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-08-11 21:07:48 +00:00
flowtron f189af6934 VERSION 1101
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5571 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-08-08 17:13:22 +00:00
flowtron 31f92b1b83 VERSION still 1100
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5556 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-08-07 19:49:30 +00:00
flowtron 5c2a282a9f finishing the previous fix - thanks to stef for alerting us of the problem
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5555 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-08-07 18:23:12 +00:00
Rafael Barreto 69cd78b09c fix server side password check
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5546 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-08-05 21:56:29 +00:00
flowtron deb082b15b show/hide sets of sparklies in editmode
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5441 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-22 16:40:18 +00:00
Rafael Barreto 6cbd7cb554 the correct fix for the maxclient issue
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5436 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-22 00:20:32 +00:00
flowtron 7f3ea00b9f introducing CC - colo(u)rchar
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5356 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-13 17:15:52 +00:00
Rafael Barreto aacd6d38ea ms back to assault.cubers.net and abuse-autokick message
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5155 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-06-07 18:16:26 +00:00
Rafael Barreto 7208dbb44f hudextras, points, protocol, clean up and so on
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5090 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-05-28 19:46:02 +00:00
Rafael Barreto d174d82e1d Fixing lss nade spawn, some HUDEXTRAS stuff, and temporarily reverting the cursor related functions to 1.0.4 ones
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5076 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-05-27 02:21:37 +00:00
flowtron 68f797ac65 AC_VERSION 1100
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4818 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-05-07 19:24:59 +00:00
Rafael Barreto 8527719515 Redirecting the MS for testing purposes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4813 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-05-04 21:25:27 +00:00
Lee Salzman 7d90c91175 WIP port of sauer master server
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4803 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-05-04 19:42:40 +00:00
Lee Salzman 0a352e793b removing old vector typedefs
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4788 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-03-11 23:19:42 +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
driAn 581ecdb9f6 translated main menu to german, omitting header info in gettext calls, libs, test gettext call in menuitem render
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4629 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-08-12 20:58:29 +00:00
ac_stef ca14425cfd refactored server commandline parsing
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4145 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-01-18 00:29:15 +00:00