Commit Graph
472 Commits
Author SHA1 Message Date
ac-stef 4fdba4fa4a less ugly mapdims
replaced the mapdims array with a struct with properly identified members

also reduced the calclight postfilter to actually used map areas
2014-11-12 17:52:44 +01:00
ac-stef 3bbe1f9555 fix mandatory client logfile
The logfile can't be created before the commandline arguments are parsed,
because before that, the home directory is unknown. This patch logs
into a memory buffer which is then copied to the logfile as soon as
the logfile is created after processing the commandline arguments.

The memory buffer is created during the initialisation of global variables,
and destroyed after the logfile is created.
2014-10-06 12:43:32 +02:00
aurhatandac-stef 79943778e7 Show list of demos in "Download demo" menu 2014-07-08 19:02:17 +02:00
ac-stef 556b1eb7f2 add map vantage points
The vantage point is supposed to be a distinctive view on a map - like the
angle from which the preview picture was taken.

This commit adds three commands: clearvantagepoint, setvantagepoint and
gotovantagepoint. None has any parameters, all are only allowed in edit
mode. A map can only have one vantage point.
2014-06-23 16:15:47 +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
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 859df26089 refactored load_world and save_world
* separated "loading the map" from "collecting map statistics"
* replaced the buggy toptimize with mapmrproper as default
  pre-save optimiser
* add timestamps to loadmap-stats
2014-05-15 13:48:30 +02:00
ac-stef 24c5fada62 new cleanup tool for hidden map attributes
"mapmrproper" tries to optimize hidden attributes of maps in a way, that
the map can be handled in bigger chunks by the renderer.

The mipmapping routine does not take into account, if certain textures
of a cube are visible at all, when it collects otherwise identical cubes
to be handled en-bloc. "mapmrproper" changes invisible textures in a way,
that the cubes are in fact identical - so, that the mipmapper is satisfied.

This optimization is a bit too huge for now, to be used by savemap by
default (instead of toptimize()) - even though mapmrproper is far superior
to toptimize(). Since mapmrproper potentially changes a lot of textures,
it may be too annoying during the creation of a map anyway. It is a tool
to optimize the map, as soon as the geometry (and texturing) is done.

The optimizer does not change any map properties that are visible in any
way. The optical effect of slightly changing lighting of the map is caused
by the (light-) recalc() function at the end of the optimization run.
Every run of recalc() seems to have that effect (check for yourself, by
typing /recalc several times).

Before any changes are made, mapmrproper creates a backup, which can be
restored by "undo" (press "U"). Enable mipstats (F6), to see, what has
been done.

The command "calcmipstats" just counts all the mips in the current map,
and prints their numbers as 1x1/2x2/4x4/8x8/16x16/32x32/64x64.

Keep in mind, that map geometry /and/ lighting affects the mipmapping.
(To get a better idea of this, try changing the "lighterror" parameter)
2014-05-15 13:48:30 +02:00
ac-stef 50b3f6867c show detailed data of the cube inside editing focus
* shows all geometry data of the cube in editing focus in the hud
* can be toggled by F8 in editmode
* shows cuby type, floor and ceiling heights, vdelta and all textures

(if mipstats *and* edit focus details are requested: show focus detail)
2014-05-15 13:48:30 +02:00
ac-stef a37d437a2f nicer mipstat display
* display mistats in the hud instead of having them flood the console
* added display of 8x8 mips, just to show that they are possible

press F6 in editmode to see the difference
2014-05-15 13:48:30 +02:00
ac-stef 6f5635917f visualisation for tagclips
To keep things cheap, only tagged areas inside the editing grid are shown.
I added two variables, tagnum and taglife, to allow playing with the
parameters of the sparklies. Those should be removed later. The default
values work quite well on my really crappy onboard graphics card. Higher
values start dropping fps.

Also, the edit status line now shows the tag value of the cube pointed at.

The patch also fixes the bug, that the edit status line did not show
details about the selection, unless there was at least one entity in the
map.
2014-01-28 14:28:43 +01: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
Ronald Reagan de65e51bd0 Adding --mastertype switch. Allows switching between UDP and HTTP style masterserver
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7633 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-11-08 05:53:01 +00:00
Lucas GAUTHERON 1f9fae3779 autodownload: find best server after 100 gamestarts
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7544 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-09-21 08:10:41 +00:00
Lucas GAUTHERON 727bb4cb69 autodl: fix downloading for packages containing spaces in their names
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7499 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-06-24 12:39:45 +00:00
Bukz 2c37c1279a /getmap successfully installed cubescript callback, /dlmap command
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7442 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-30 17:12:34 +00:00
Lucas GAUTHERON ebcbbbc933 autodownload update
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7389 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-23 08:05:58 +00:00
Lucas GAUTHERON a7a1e46bcc merged branch
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7382 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-22 19:49:21 +00:00
Lucas GAUTHERON 9cbfd3e99a "Can't bind up/down keys via the menu" bug fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7334 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-10 01:29:36 +00:00
Lucas GAUTHERON 009ed2d8d8 alias/const simplified
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7312 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-05 18:42:05 +00:00
Bukz 7480f036d3 persistidents fixes (plz review/test)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7213 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-02-16 01:43:47 +00:00
Bukz 7ab718f74e /loadcrosshair fixes/updates (plz review/test)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7211 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-02-16 00:09:22 +00:00
Lucas GAUTHERON 294ea128a3 more customizable scoreboard, allow ratio to be displayed (again)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7032 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-01-05 22:47:31 +00:00
Lucas GAUTHERON 71f3e3815b save kill messages into saved.cfg instead of a separate file (client)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7030 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-01-05 22:28:52 +00:00
Lucas GAUTHERON f2a9b61683 drawzone: allow multiple zones to be drawn at once
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7013 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-12-30 20:40:41 +00: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
Ronald Reagan 44abbf67d1 New shotty sources
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6919 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-10-29 03:01:32 +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 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 417850ca60 fixed particle type guesswork
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6878 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-09-14 22:57:42 +00:00
Lucas GAUTHERON ef76f7f88d hardcoded burst fire settings (menus still TODO)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6862 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-08-24 16:01:10 +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
Bukz 0a0d09e73a /paste fix, use light data from destination not the source
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6804 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-05-23 15:21:24 +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
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
Rafael Barreto aa10c09bd3 sending defs to ms
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6756 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-02-09 16:16:16 +00:00
sireus 4a6b67de1f show flag count on HUD (WIP)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6748 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-01-30 12:54:18 +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 0e1bba1745 hardcoded votepending and getscrext
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6703 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-11-21 18:11:10 +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
Lucas GAUTHERON 8f90268d82 multiple selections support in editmode
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6647 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-09-14 14:59:40 +00:00
Lucas GAUTHERON 8da769b0c2 hardcoded bind/specbind/editbind (win client included to keep it compatible with resetbinds.cfg)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6622 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-08-30 18:17:38 +00:00
sireus 9563e02f64 ...and reset it
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6612 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-08-23 13:23:39 +00:00
Lucas GAUTHERON fc136cca48 warning fix (RK: ai == 1 was wrong but ai != 0 should have a better behavior)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6583 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-08-16 16:43:10 +00:00
RandumKiwi 9bc08a583f This switch shouldn't require a "1" to use it.
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6573 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-08-15 01:19:18 +00:00
Bukz dff42f8ee9 gametimestart & mapbackupsonsave
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6565 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-08-08 21:47:50 +00:00
Lucas GAUTHERON 23446ad685 curserver fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6531 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-06-12 16:50:36 +00:00
sireus b5c863a900 persistidents - control whether newly defined idents are persistent (suggested by Bukz)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6526 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-06-09 13:28:52 +00:00