also stripped assaultcube.sh, server.sh and install_or_remove_menuitem.sh
of unnecessary or just wrong stuff
added script to generate checksum file packages/misc/checksums_md5.txt,
which is used by check_install.sh to look for missing and modified files
- provide a function to easily assemble and execute the command
- context-selective execution of hooks
- restrict potentially exploitable or harmful hooks to singleplayer-modes
This new feature reads a list of config files from a zip file named
config/configtemplates.zip and checks each file, if it is already
existing in the game's search path. If it can not be found, it will
be created in the user's home dir (where saved.cfg gets written).
Before this, the config files were installed with the rest of the game,
and if the user customised any of the files, he most likely did not move
the file to his personal directory first. A re-install in the same place
would then overwrite the customised file.
This feature creates the files where they will usually not be overwritten.
To use the feature, before packaging the game, the files
config/autoexec.cfg
config/favourites.cfg
config/pcksources.cfg
have to be archived into a zip file
config/configtemplates.zip
The zip file should not contain directories. It should not be checked
into git. The original single config files should not be distributed
with the package.
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.
* no longer slows down the player under water
* no longer plays sounds for water transitions
* still plays underwater sound and shows underwater visual effects
fixes issue #56
* 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
* make sure, unsaved edits only count in editmode (otherwise "watercolour"
in map configs would already be "edits")
* nicer filenames for backup-xmaps
* catch failed xmap file write access
* unsavededits is now flag (!= 0) and counter - to enable scripts to
detect "new edits".
new commands:
xmap_delete_backup deletes the backup xmap
xmap_keep_backup moves the backup xmap to a regular named spot
xmap_rename changes the nickname of an xmap
when nades are thrown in shallow water with high enough speed, they
slow down while in the water - then, when they reach the surface again,
they jump out of the water
this patch takes 90% off of nade topspeed while leaving water
Until now, only the physics at corners between solids worked.
Corners between open space cubes (like sockets or platforms) did not work.
Basically, those corners were treated as square cubes. Higher mip corners
were worse, since they were treated as one square piece. To verify this,
raise an aligned 16x16 field on an empty map, then make an 8x8 corner.
Making the corner makes no difference for the physics...
This patch fixes all kinds of corners. It uses code from the renderer to
interpret the map geometry, so that the physics matches the visual.
All corner types now work also with higher mips (for example 4x4 corners).
Corner bounces are preferred in some cases, to prevent hitting hidden
geometry (for mappers who make larger corners from several small corners).
We lose some precision here, but it fixes the ancient drop bug.
I also cleaned up some unused bs.
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.
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
this patch gives the same occlusion resolution as NUMRAYS 2048, but still
maintains a table with only 512 entries
also, the 1536 additional rays start their search at the nearest already
found solid
This fix is no longer needed, because the new corner handling in the
physics engine does no longer care about those cubes. Also, they can
now be cleaned up by mapmrproper.
* separated "loading the map" from "collecting map statistics"
* replaced the buggy toptimize with mapmrproper as default
pre-save optimiser
* add timestamps to loadmap-stats
"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)
if by some freak accident the list gets corrupted, the textures are no
longer accessible from the map editor
this check makes sure, that nothing is missing
* 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)
* 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
* fixing edit paste
* fix power of 2 check for corner selection
* fix pasting multiple selections changed target selections
* fixing editdrag: plugging memory leak
* fixing editdrag: proper binding of keys
* fixing editdrag: allow deselecting (by selecting a second time)
* make a little more room for undos (RAM is cheap and maps are big)
* some cleanups
- fix possible crash in conc (but it's still an ugly hack)
- fix noob usage of strcmp
- flag some memory leaks (it would be nice, if the author(s) would clean
up the mess himself)
- fix crash in substr
- whitespace cleanup
there are plenty more memory leaks in command.cpp - for example, every
goto in cubescript does not clean up anything
now /savemap after /newmap saves to "newmap.cgz" instead of ".cgz"
also, voting for a nonexistent map in singleplayer leaves the client in
some sort of a broken state. this fix blocks the vote.
and: newmap is blocked in bot modes, since that isn't working stable.
the printf format "llx" can not be used on all platforms (for example,
mingw uses a different name for it)
this patch provides a function, that manually converts a 64-bit integer
to a hex string
Thx, Jpablon
This workaround lowers the optimisation level for those parts of the code,
that gcc 4.7 (and probably other versions) would compile to a binary that
crashes after a while. The previous solution for this so-called "linux bug"
was to use clang instead of gcc.
Thx, Jpablon, for doing all the work on this.
This makefile allows changing the compiler to g++ or requesting debug
binaries without editing the makefile.
The makefile sets default values for CXX and ACDEBUG, then reads values
from the file Makefile_local (if it exists). A commandline parameter
overrules both.
Makefile_local is not part of the repository, so it can be changed without
git caring (or nagging) about it. It is listed in .gitignore.
To switch to g++, create a file "Makefile_local" with the content
"CXX=g++".
To compile debug binaries, type "make clean install ACDEBUG=yes".
When g++ is used, "fast-math" is now enabled.
- press B to get the former filled volume view
- raise the value of tagnumfull to get both views simultaneously
- cubescript parameters should be cleaned up before release
The function will now also take care of obsolete clip entities, which
gives the mapper the opportunity to tag clip areas manually and then
have the envelopped (and therefore obsolete) clip entities removed.
When done, the map will be cleaned of "clip & plclip" tags, since clip
already includes the properties of plclip.
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.
In addition to the existing clip- and plclip-entities, this patch provides
a new approach to provide the same: clip areas by tagging cubes.
Each cube of a map has a parameter "tag". All tags in all existing ac maps
are currently zero. It is a leftover from cube 1. This patch uses the tag value
to determine, if a cube (from floor to ceiling) should be forbidden for
players (tag 0x80) or every moving object (tag 0x40). Tagclips have several
advantages over classic clip entities: they are fast to establish (mark
area, then /edittag 0x80) and are "cheap" for the engine. Tagclips do not
increase the number of entities. As tagclips are always floor to ceiling,
they can't be used to build stairs or platforms. Tagclips should be
preferred over clip entities, but can coexist without problems.
Technically, setting the tag value to 0x40 or 0x80 causes the physics
engine to handle the cube like a "solid".
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.
fixes some assumptions of the engine about the rendering
of mipmapped solid areas at the edge of the world
(confirm bug with an 8x8 solid in the corner of a /newmap)