Commit Graph
123 Commits
Author SHA1 Message Date
flowtron 29b723a822 COOP is always allowed 2021-06-21 10:28:46 +02:00
RonaldReagan 55e6cf302f #263 Expose vita data to server admins (protocol bump) 2021-05-11 20:34:48 -06:00
drian 7d0e84fe95 #108 merged 'Pause' PR - work in progress 2021-04-14 09:19:22 +02:00
ac-stef 1fe478aae4 cleanup protocol
...and get master to compile again

DOCREF hudextras mapstats_hud nextGameMode
2017-06-27 15:15:25 +02:00
ac-stef 0b44cf1c9c reduce compact pos packet size by two more bit 2017-06-27 15:15:25 +02:00
ac-stef 94d0203bc6 cleanup pos packets
* remove roll
* optimise for size
* new protocol data type: unsigned integer with known size
* highres yaw encoding
* double resolution for pitch angles -30°..30°
* half resolution for pitch angles -90°..-30° and 30°..90°
* proper rounding for pitch and yaw values
* same resolution for yaw and pitch for both pos packet types
* restore transmission of the velocity vector
2017-06-27 15:15:24 +02:00
ac-stef 7fe7e47317 improved demo recording
The demo data is collected, hashed and compressed fully in memory, mostly
in a worker thread.

While in memory, each demo is identified by an unique sequence number,
which is, for example, used to request a download by the client.

If so configured, the demo is written to file by the worker thread.

If F10 is pressed later than two minutes into the next game, instead of
downloading the last game, the current game is scheduled to be
automatically downloaded when it ends.

At the end of a game, all clients and the server sign the demo file.
2017-06-27 15:15:24 +02:00
ac-stef 2f80c5bae5 add channel for less important server messages
(so that the client can choose to not display them)
2017-06-27 15:15:24 +02:00
ac-stef 7d1edd0fa1 cleaned up demo filename nonsense
If a filename does not contain at least mode, map and timestamp (due to
messed up format strings), the default format is used to ensure unique
filenames.

server side: added server parameters

  demo_max_number
    number of demo files to hold in RAM

  demo_save
    enable/disable writing of demos to file

  demo_path
    demo file path and filename prefix

  demo_filenameformat
    format string to assemble demo information to a filename
    %g : gamemode (int)
    %G : gamemode (chr)
    %F : gamemode (full)
    %m : minutes remaining
    %M : minutes played
    %s : seconds remaining
    %S : seconds played
    %h : IP of server
    %H : hostname of server (client only)
    %n : mapName
    %w : timestamp (formatted by demo_timestampformat)

  demo_timestampformat
    timestamp format string (see strftime() for format options)
    if the string starts with 'U', UTC is used - otherwise local time

client side:

changed demonameformat and demotimeformat to SVARs

  demonameformat
    like demo_filenameformat

  demotimeformat
    like demo_timestampformat

removed demotimelocal getdemonameformat getdemotimeformat getdemotimelocal

DOCREF demonameformat demotimeformat
DOCREF demotimelocal getdemonameformat getdemotimeformat getdemotimelocal
2017-06-27 15:15:24 +02:00
ac-stef 0b656d2380 add server-side player vita database
The server keeps track of every player ID that ever connected successfully.
This database stores the last names and IPs used by the player and the
last countries the connections came from. Some stats are counted, like
"time connected" and "total tks". Most importantly, the database stores
rights (like admin) and restrictions (like ban). All rights and
restrictions are kept as dates (or timecodes), so, for example, if your
ban date is in the future, you are banned - and if it's in the past, you
can play. The collected stats are meant to help server owners at managing
players - especially, if they want to give someone admin rights.

The database is periodically saved to a file and read from that file on
startup. The default file is config/servervita.cfg and one backup is kept
in config/servervita_bak.cfg. During server start, if the regular file
can't be loaded, the backup is tried instead.

While the server is running, it checks periodically for a file named
config/servervita_update.cfg, and if the file exists, it is renamed to
a backup filename including a timecode and read and merged into the
database. The automatic rename makes sure, that a file is only read once.
Using such updates, a server owner can easily give several people admin
rights or for example, add clan tags for a whole list of IDs. (Yes, the
database also stores a clan tag for every ID...)

The database also stores two short comments for every ID. One can only be
read by server admins, but the other one is public. The public reason, for
example, can state a reason for a ban.

One database record takes up 264 bytes of RAM. During autosave, accounts,
that have not been used for a specified time (default 12 months), will
not be written. After a server restart, those old records will be gone.

Currently, there is no process in place, to also clean up old records
from RAM. Maybe, that'll be added later...
2017-06-27 15:15:23 +02:00
ac-stef d6af5be3da add auth to client server connect protocol 2017-06-27 15:15:23 +02:00
ac-stef 0148c5b9a9 add new protocol data type for IP addresses
(to avoid casting IPs to signed integer)

also mute single number debug messages for compound data structures like
string and key: no longer print a debug message for every char of a string
2017-06-27 15:15:23 +02:00
ac-stef 110a209d4e move validmapname
add map name checks to servermap::load()
2017-06-27 15:15:22 +02:00
ac-stef 7dc72aebb1 add basic functions for game mode bitmasks 2017-06-27 15:15:22 +02:00
ac-stef 25deee5287 more versatile disconnect reasons 2017-06-27 15:15:21 +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 ad5a438b86 remove legacy mode for filtertext
was no longer in use
2017-05-22 19:50:31 +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
aurhat 4d2d326136 Cleanup 2017-02-18 22:40:07 +01:00
ac-stef 2436478c64 add new protocol data type for asymmetric small integers
best suited for values ranging from -1 to 252
2016-10-02 12:59:25 +02:00
ac-stef aca74e1b59 allow copy, paste, undo, redo and selectionwalk in coop edit
limited to selection areas of at max 4096 cubes, which is 64x64 cubes
2016-09-17 22:11:07 +02:00
ac-stef 27c8f43711 add zipped message packets 2016-09-17 22:11:07 +02:00
ac-stef 4dc54e22b5 allow more edit commands in coop edit
The edit protocol now allows the following commands in multiplayer:

  arch, slope, edittag, edittagclip, selectionrotate, selectionflip

also:

  mapenlarge has been limited to size 10 in multiplayer

  entitiy undelete in multiplayer has been fixed

SV_EDITS, SV_EDITD and SV_EDITE are to be cleaned up with a protocol bump

DOCREF arch slope edittag edittagclip selectionrotate selectionflip
2016-09-16 14:06:27 +02:00
ac-stef 9965f53d28 fix filtertext
cropping space should work now
2015-09-07 14:53:57 +02:00
ac-stef cf2c37e3da add tab char to richtext filter
translate "\t" to a tab character
2015-06-10 14:28:42 +02:00
ac-stef 148719c0f7 add script command for menu items with alternate fonts
Also: add '\a' to the list of escaped characters and remove storage of
  unneeded "filename".

mitemaltfont <altfont> <text> <action> <hoveraction> <desc>
  Displays a menu line with a text which may contain chars from an
  alternate font.

  altfont
    Name of the alternate font.

  text
    Content of menu line. Chars from the alternate font have to be marked
    with "\a". Alternate font chars have no width and are just rendered
    above the following text. Use spaces to counter that.

  action, hoveraction, desc
    Same function as with other menu lines.

DOCREF menuitemaltfont
2015-06-10 14:12:43 +02:00
ac-stef ae82b6b22e add attr5..7, add mapmodel pitch and roll
Keys 5, 6 and 7 (in combination with the scrollwheel) can be used to alter
the new entity attributes.

Pressing editmeta (LCTRL by default) speeds up the scrolling.

(Parts of the roll code are borrowed from Alejandro V. Garcia's commit
"Model rotations, experimental" from January 2013)

Note: coop edit is now broken between "next" and older clients, but I
  don't want to bump the protocol just yet.
2015-05-18 14:59:41 +02:00
ac-stef 786a6cdce1 filename filtering for media files
No more spaces in filenames. The only allowed chars are a-z, A-Z, 0-9 and
"-_.()".

An exception are texture filenames, which may also have a prefix command
like "<decal>" included.

Also fixed some memory leaks in media download.
2015-05-18 14:46:03 +02:00
ac-stef bdf3f0f5cb option to crop leading and trailing whitespace for filtertext 2015-05-17 00:24:38 +02:00
ac-stef 1d1e995454 fix some warnings 2015-04-18 15:24:31 +02:00
ac-stef 29dd50bde6 fix: keep path and uppercase in demo filenames
votes now distinguish between demo and map votecalls and filter the
filename appropriately

also: remove paths from map names cleanly
2014-05-25 00:35:22 +02:00
ac-stef a0286d2b3f replace textfilter functions with one-fits-all version
* replaces filtertext() with a version with a dozen of single filters
  that can be used in any combination
* defines classes of allowed characters for strings for various uses
  (see protocol.h line 153ff)
* now the allowed charset of, for example, player names is defined
  in one location only
* fixes issue #58
2014-05-24 12:59:19 +02:00
Lucas GAUTHERON ff4bb6c8e5 map vote message fixed (when using custom game times)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6999 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-12-27 10:41:42 +00:00
sireus 74b873ddba various whois-related cleanups and fixes (fixes demos again)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6865 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-08-24 19:55:42 +00:00
sireus 0666067f2e more spectator cleanup (just use switchteam, and auto-kill player on server side)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6784 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-04-13 11:39:11 +00:00
sireus 8f39911eb0 cleaned up spectator mess a bit
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6781 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-04-05 13:19:06 +00:00
Lucas GAUTHERON e542188cd4 weird crashes "fix" (still fixme)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6767 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-03-11 10:55:20 +00:00
Lucas GAUTHERON 89cb2165b1 msgsizelookup bug fix (oops) and win32 binaries
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6617 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-08-28 08:48:29 +00:00
Lucas GAUTHERON 87ea1d0823 private messages (chat) & win32 binaries (warning: new protocol)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6614 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-08-27 18:52:19 +00:00
Lee Salzman c76d5a8106 filtertext tweak
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6521 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-06-08 12:03:47 +00:00
Lucas GAUTHERON 2bf81d4517 bot team survivor & bot tosok (not doc'd yet)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6504 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-06-05 16:18:18 +00:00
Bukz ecccb57c61 fixes/updates + BPF & BLSS
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6492 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-06-04 06:02:50 +00:00
Lucas GAUTHERON cce991d437 team lss, team pf (!testing only!) (bins included, vcpp 2010)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6479 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-05-30 17:30:38 +00:00
flowtron 53c35f4fd8 misc. changes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6056 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-02-05 09:44:07 +00:00
flowtron 31c87b3b2a protocol bump : 1132
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5708 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-10-04 20:39:37 +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 01c24f0228 checking if file system has space to write (linux only), reverting the protocol to make it compatible with 1.1.0.1, tagging AUTH as WiP, tunning the player/bot collision... preparing to release patch
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5656 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-08-19 19:46:56 +00:00
flowtron 928eed4de1 in-game AUTH
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5637 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-08-16 11:12:48 +00:00
Rafael Barreto d3c497e36a SV_SHOOT reduction
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5391 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-16 22:44:11 +00:00
Rafael Barreto 054594bec6 removing 3 ints from SV_SHOOT... and some other stuff
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5385 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-16 21:57:13 +00:00