Sometimes the enet build seems to get messed up and "make" won't work
anymore in ../enet. The mrproper target tries to clean up ../enet, but
if it doesn't work, it deletes ../enet/Makefile manually. This triggers
a configure run in ../enet with the next make invocation - which should
fix everything.
The codeblocks editor cleans up surplus whitespace with every save by
default. That's nice, as long as everyone uses it. Otherwise, changes in
whitespace will creep into most commits and make the diffs hard to read.
Therefore: one commit with _only_ whitespace changed.
* SDL_GetTicks() returns uint
* there's no need to make a fuss about "starting" and "stopping" the clock
* instead of stopping the clock, we can now just get the elapsed time
The light calculation requires the random generator to be seeded with a
constant - otherwise repeated light recalculations would make the lights
change.
This patch allows the random generator to go back to the state before the
static seed().
The file packages/models/playermodels/RVSF/07_Blue-Red.psd had a filesize
of over nine megabyte - and was of no use to the game. It made all recent
game packages 9MB bigger than they had to be. That's about the size of
all game textures combined...
If someone still needs the file, check it out from an older commit.
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
Renames the existing saved.cfg to saved-old-1.cfg (and an existing -1 to
-2, and so on) before the new saved.cfg is written.
This should help in cases where players mess up their config, because the
config is deleted with a five-game-starts delay.
Until now, the angles of mapmodels (and ctf-flags) were rounded to the
nearest 15-degree-step during rendering. This patch moves the rounding
to the time of placement of the model. Now the angle can be changed freely
after the model has been placed.
This commit also changes the angle resolution to 0.25 degree.
When changing the angle (press "1" + scrollwheel), additionally pressing
editmeta (a.k.a. LCTRL) changes the increments of the wheel from 1 to 10.
During a savemap with format 9, the angle resolution is reduced again, to
keep compatibility. Therefore, this features is only for testing right now.
It won't be preserved during a save (at least, as long as format 9 is used)
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.
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.
- a client will now write all os console messages to "clientlog.txt"
- at every game start, the log file gets rotated (with five old logs kept)
- commandline parameter "-N" can be used to limit the number of lines
(after the lines are logged, the file is closed)
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.