Commit Graph
405 Commits
Author SHA1 Message Date
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
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
sireus 17c20e4ebc fix for players not spawning correctly in demos (fix doesn't seem to break anything, but please confirm)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6773 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-03-30 11:46:00 +00:00
Lucas GAUTHERON 744af34959 send teamkills to clients (new protocol, SV_RESUME changed)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6741 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-12-22 09:11:55 +00:00
Lucas GAUTHERON 2da4116977 hudgun crosshair bug fix (the nade bug still needs to be fixed)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6705 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-11-21 20:08:52 +00:00
Bukz e339ad3f75 new native alias "onPM"
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6702 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-11-21 16:24:45 +00:00
sireus 31994bd84c crash fixes (it's %cN, not %sN)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6700 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-11-19 20:52:30 +00:00
Lucas GAUTHERON 526e9e22e5 TMP revert
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6698 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-11-13 16:43:14 +00:00
Lucas GAUTHERON 70d8421100 testme : /lockteams, /forceteam [cn] [team], "matchteamsize" removed
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6696 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-11-12 13:22:59 +00:00
flowtron 9af43c0762 gettext can't handle "\f" - please use the CC constant!
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6669 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-10-18 16:16:37 +00:00
flowtron 5f3fb3ef67 keep SPECT state across spawns
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6665 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-10-15 23:57:27 +00:00
Lucas GAUTHERON 5a67575974 minor fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6653 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-09-16 20:51:57 +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
Bukz b3b27ce3ae teamkill info upon ban/kick/whois for jamz :)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6581 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-08-16 13:03:22 +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
Rafael Barreto 32712318da doing it better... (still testing the exploit, tbh)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6494 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-06-04 14:14:37 +00:00
Rafael Barreto a8401fd1e3 fixing that obvious map requirements exploit... (no more exploits for the next 6 months...)
@ other devs: check my fix... I expect to not block any good map

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6490 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-06-03 21:19:44 +00:00
Lucas GAUTHERON f6bbd73b2a cubescript events update, fixes and doc.
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6476 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-05-28 19:35:18 +00:00
Lucas GAUTHERON 101193eba7 cubescript updates : events fixed, cleaned & doc'd,+ finishing compatibility system.
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6475 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-05-28 08:59:56 +00:00
Lee Salzman 6411ed3dc5 warning fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6444 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-05-16 13:15:57 +00:00
Lucas GAUTHERON ad48145196 $curdemofile
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6432 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-05-14 15:09:47 +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
Lucas GAUTHERON b049b36c9e warning fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6315 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-04-24 14:35:42 +00:00
sireus af7e5e8c36 hudguns when spectating
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6286 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-04-18 15:34:16 +00:00