After startup of LAN servers browser there appeared sometimes also remote
servers, instead of only LAN servers.
I such case "si.lastpingmillis=servermenumillis" for all remote servers.
So this commit changes a little existing condition, to prevent above
problem.
The first fixes the last use of menusel, that wasn't checked for range yet.
The second one brings menusel back into range, if there is no
refresh function.
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.
First fix - now togglespect lets to return automatically to previously
spectated player, after spectating him, switching to "fly spectate" mode
and again to spectating players.
Second fix - now player doesn't land and stuck outside of new map,
when during spectating somebody map changed.
FCPNs are removed, because currently they aren't used.
* 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
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.
* 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 player holds nade and akimbo disappears.
To test the bug: take akimbo, take grenade, press "g" and wait for akimbo disappearing.
Then stats on HUD shows, that player has pistol with 0 ammo, instead of full magazine.
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.
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.
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.
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