Commit Graph
429 Commits
Author SHA1 Message Date
ac-stef 1ca4ce54eb some server changes
tbc
2017-06-27 15:15:20 +02:00
ac-stef db9bd67be9 protocol bump
no longer compatible with 1.2.0.2

also: nade effect quantisation fixed
2017-06-27 15:15:20 +02:00
ac-stef 800e4f3a13 add reset option for loadcrosshair
loadcrosshair reset

    loads all default crosshairs (including teammate and scope)

    short form of "loadcrosshair default default.png ; loadcrosshair
    scope red_dot.png ; loadcrosshair teammate teammate.png"

DOCREF loadcrosshair
2017-06-10 00:15:58 +02:00
ac-stef dbcb040eeb menu code cleanup
* fix some memory leaks
* rename stuff
* fix crash

Removed commands and variables:

  chmenumdl (replaced by menumdl)

  scorefont (replaced by "menufont score mono")

  menuitemvar (better handled with fully dynamic menus)

Changed commands:

  menufont menu font

    Sets the font for a specific menu. If menu is "", the currently
    initialised menu is used. Example: menufont score mono

  menumdl menu mdl anim rotspeed scale

    Assumes the function of the previous chmenumdl. If menu is "", the
    currently initialised menu is used. Specifies, which model to render
    and how. If only menu is specified, no model is rendered.

DOCREF chmenumdl scorefont menufont menumdl menuitemvar
2017-06-06 13:17:20 +02:00
aurhat e126faef15 Cleanup 2017-05-21 22:08:04 +02:00
ac-stef 2f99b368f0 allow mnemonics for execution context levels
scriptcontext and isolatecontext now allow plain text mnemonics for
context level arguments (one of CORE, CFG, PROMPT, MAPCFG, MDLCFG)

also:

- cleanup (some dead code and dead prototypes removed)
- some stuff renamed
- script errors now show context levels
- conc is no longer thread-safe (but slightly faster)

DOCREF scriptcontext isolatecontext
2017-05-18 16:19:01 +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 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 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
aurhat 72dfcd73fe Cleanup
"showminremain" enabled by default, "fovcompat" removed.

DOCREF showminremain fovcompat
2016-10-14 21:49:53 +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 fc3c77868f add hardcoded stairs command for coop
stairs xs ys

  Places stairs in all selections. xs and ys determine the step width
  in x- and y-direction.

DOCREF stairs
2016-09-16 14:06:27 +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 1310516c14 keep track of map load errors
Collect warnings during load_world() and issue a warning at the end. Most,
but not all warnings already printed a message - which usually scrolls out
of the console quite fast.

The collected value is also given back by the loadmap command, which
allows batch editing scripts for maps stop at problematic maps.

Mapsound errors are not detected, if soundvol is zero. Missing textures are
not flagged, if notexture is set.

The error code is ored together from those elements:

0x0000001  entity attribute overflow
  One or more map entities had attribute values, that are no longer
  supported with map format 10. Rework manually.

0x0000010  map decoder error
  Indicates a damaged map file.

0x0000100  world error -1
  Map is completely solid. Very funny.

0x0000200  world error -2
  Map border is not solid. Fix manually.

0x0001000  missing skymap texture files
0x0002000  missing world texture files (only if no notexture is set)
0x0004000  missing mapmodel files
0x0008000  missing mapsound files

0x0010000  bad mapsound command in map config
0x0020000  bad mapmodel command in map config
0x0040000  bad texture command in map config
0x0080000  bad loadnotexture command in map config

0x0100000  error during loading of mapmodels (see earlier console output)

0x1000000  out of range integer value in map config (for example, "fog 0")
0x2000000  out of range float value in map config
0x4000000  generic cubescript error in map config

The command loadmap is now also available for non-debug builds.

DOCREF loadmap
2016-08-30 20:56:58 +02:00
ac-stef a45d926919 remove current auth system
* fix tiger hash for bigendian (we use the byte output, not the chunks)
* remove all ECC functions and comment out all calls to it
2016-08-26 14:28:53 +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 32ffd3a4cd replace non-thread-safe functions
replace all uses of strtok, localtime, gmtime and readdir

on platforms without safe versions, use homebrew or unsafe...
2016-02-28 23:14:47 +01:00
aurhat 730b0ed7ee Fix state of player1 during watching a demo with arena mode
That fixes switching to edit mode during demo watching.
Also some minor fix added.
2016-01-17 22:18:59 +01:00
ac-stef 816aed4ba6 rewire zip packages inside the virtual filesystem
* change priority of zip packages from "highest" to "just below home dir"
* strict naming rules for zip packages
* require all zips to be below directory "mods/"
* only allow zips to intoduce files below "packages/" (or with a special
  zip package name also below "config/")
* make zip package config persistent (saved to init.cfg)

WARNING: intermediate commit - autodownload system defunct!

DOCREF (removed) addzip removezip
2015-09-07 14:53:56 +02:00
aurhat cf2a8018ff Fix colour of team messages in non-team mode
When spectator will send in non-team mode a message in team chat, then
other spectators will see it in blue colour - earlier was wrongly green,
like for normal chat.
2015-08-17 22:07:06 +02:00
aurhat 577d6a00d2 Fix arenaintermission reset
Arenaintermission was reset only after own spawn, now it will be reset
also during being in team spectator (in multiplayer or demo mode).
2015-07-16 23:13:05 +02:00
ac-stef f3e72b8fb7 remove gettext
DOCREF gettext
2015-06-10 14:28:50 +02:00
ac-stef f774e4d841 higher resolution for entity attributes
Interpret the values for entity yaw angles and clip entity sizes as
fifths or tenths of cubes or degree.

This makes some entity attributes appear as float values to the user.
The map file still only keeps integer values - but now they are
interpreted differently - for example, a health pack elevation value of 6
now means 0.6 cubes instead of 6.

Note: the scaling factors are hardcoded - use ENTSCALE5 or ENTSCALE10
whereever possible. For generic entity editing, the scaling values are
also stored in entscale[] - but that table can not be changed without
breaking the map format! This scaling is similar to the treatment of the
vdelta values of map cubes.
2015-05-27 15:47:04 +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
aurhatandac-stef 8b2b7e0ac7 Change switching between spectate and edit mode
1. In multiplayer this switching isn't allowed, because it was broken
   and messed up, for example other players didn't see concurrently
   spectating and editing player.
2. In demo mode switching from spectate to edit mode is improved.
3. Several years broken code for edit mode is reverted.
2015-05-03 22:42:06 +02:00
ac-stef 0f8dbf69aa introduce temporary aliases
An alias, that was at least once used with the new "tempalias" will not be
written to saved.cfg.

So, now there are four ways to create aliases:

1) alias (or "=")
  General alias, who's value gets saved at game exit in saved.cfg, and
  restored at the next restart - unless the alias was created at a time,
  where persistidents was zero (usually during execution of the game's own
  config files during startup).

2) const
  Creates an alias, that can not be changed. Makes it harder for users
  to destroy their config.

3) push
  Reassigns an alias with a new value. After "pop", the old value is
  restored. Allows the use of "local" aliases in scripts. Also avoids
  name conflicts.

4) tempalias
  Like "alias", but the value will not be written to saved.cfg.

The commit also changes aliases, written by the engine itself, to "temp":
gametimestart, __getmaprevisions

DOCREF tempalias
2015-03-06 14:17:08 +01:00
ac-stef 39cbee947d Merge branch 'master' into next 2015-02-08 16:17:04 +01:00
aurhat 67049f5e73 In demo mode show info about different map rev only if map is loaded 2015-02-07 14:26:12 +01:00
aurhat 990f6e9c8b Fix output messages in console
Fixes:
1. show time remaining in system console after each minute;
2. correct form of minute(s);
3. show info "everyone died!" instead of "team SPECTATOR has won
the round!" in demo mode;
4. show correct info to which team (name) was player forced, when player1
is spectator.
2014-12-06 17:17:19 +01:00
ac-stef 8604c198e9 cleaning up cubescript hooks
- provide a function to easily assemble and execute the command
- context-selective execution of hooks
- restrict potentially exploitable or harmful hooks to singleplayer-modes
2014-11-12 17:06:35 +01:00
aurhatandac-stef 79943778e7 Show list of demos in "Download demo" menu 2014-07-08 19:02:17 +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
aurhat b566c54664 Two fixes of wrong messages about change to active/spectate mode.
First fix causes, that when player1: plays non-team mode + already is in active mode + changes team to enemy, then will appear message: "you can't switch teams while being alive".
Current wrong message is: "you can't change to active mode".

Second fix disables redundant info: "$playername changed to active play", after change to enemy team in non-team modes, when he is already in active mode.
2014-05-22 20:58:46 +02:00
aurhatandac-stef 56c8a2295b Fix lets to disable a roll of remote players.
This is fix of https://github.com/assaultcube/AC/issues/16 .
Btw sending permanently the rolls of remote players is waste of bandwidth and money of server owners, so this pointless feature should be ultimately removed.
But untill it won't, the fix should be implemented, in order to not annoy players spectated other players.
2014-05-15 17:35:08 +02:00
aurhatandac-stef 126c5325d5 Fix of non-working "Watch other demo" after watching demo with arena mode.
This is fix of https://github.com/assaultcube/AC/issues/19 bug.
Currently, when player spawns in arena mode, all menus disappear, in order to force him to play and not being idle.
That causes problem, that  "Play demo" menu disappears, when you watch demo with arena mode, and choose "Watch other demo".
It happens so, because after chosing "Watch other demo" player spawns on empty map, what causes vanishing of  "Play demo menu".
The commit causes, that menus are automatically closed exclusively then, when player is connected to server, because only then this feature is desired.
2014-05-15 17:35:08 +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
Lucas GAUTHERON 7b339be34b maxrollremote should better work like maxroll (0..20)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7598 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-10-12 08:13:57 +00:00
Bukz 1578084964 better onReload + documentation
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7460 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-04-11 21:31:38 +00:00
Bukz 39bff67587 onCallVote fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7253 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-02-23 00:09:52 +00:00
Bukz 235767531a onPM fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7238 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-02-19 23:37:20 +00:00
aerkefiende 49ea40557a onDisconnect alias now returns the clientnumber (-1 for local players)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7142 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-01-27 20:42:33 +00:00
aerkefiende 58abfb3ace Sound bug fix by Felix-The-Ghost
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7117 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-01-19 21:44:40 +00:00
aerkefiende 66f8feee3b Replaced every tab with 4 spaces
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6927 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-11-12 22:28:11 +00: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 907ecb044a can now explicitly specify target team on forceteam vote
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6897 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-09-30 20:07:22 +00:00
sireus 98d17a20eb votable time limit
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6881 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-09-17 22:41:38 +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
Lucas GAUTHERON 629d7346c3 retrieve IP addresses when players join and allow cubescript to fetch these IPs
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6859 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-08-23 10:43:25 +00:00
sireus 66bcbbbabe experimental compatibility mode for 1.1.0.4 demos
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6848 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-06-29 14:19:40 +00:00