Commit Graph
7051 Commits
Author SHA1 Message Date
aurhatandac-stef d021909224 Restore old working quicknadethrow code and fix bug in it
This commit restores old working quicknadethrow code, which existed after
commit: https://github.com/assaultcube/AC/commit/aaeca4ef323f09d252498bcc66eb90d51aef4586
and keeps later bug fixes (which thought needed to be fixed).
It fixes https://github.com/assaultcube/AC/issues/25

It also fixes followed bug: after releasing right mouse button/G key
and quickly pressing it again, weapon, to which quicknadethrow switched,
starts to shoot.
2014-07-19 14:43:35 +02:00
ac-stef 9e2f0eaff8 Merge branch 'master' into next 2014-07-19 14:42:51 +02:00
aurhatandac-stef ced0baf67a Removed unnecessary restrictions of switching to SPECTATOR team
Note: spectate() function doesn't have such restrictions.
2014-07-19 14:38:33 +02:00
aurhatandac-stef 7c4a7e54f4 Disable listdemos and getdemo in singleplayer 2014-07-19 14:38:33 +02:00
aurhatandac-stef 60eb0ac393 Turn off sniper rifle's scope during intermission 2014-07-19 14:38:33 +02:00
aurhatandac-stef 38d88602aa Drop activated grenade, when player switches to edit mode 2014-07-19 14:38:33 +02:00
aurhat 69cbf95401 Prevent displaying remote servers on startup of LAN servers browser
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.
2014-07-08 22:51:33 +02:00
aurhatandac-stef 79943778e7 Show list of demos in "Download demo" menu 2014-07-08 19:02:17 +02:00
aurhat 4c3176611a Two fixes concerning items selection in menu
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.
2014-07-05 12:55:15 +02:00
aurhat c2dbf57816 Do "SCROLL to change player" visible in any standard aspect ratio
Above text was cut for aspect ratio 5:4 (quite much) and 4:3 (a little) for
previous value "left = (VIRTW*3/2)*6/8"
2014-06-28 12:30:25 +02:00
ac-stef 80a0fdc1be fix: does not compile after merge
collide() needs its prototype
2014-06-26 12:23:10 +02:00
ac-stef 90a3e5bcbd Merge branch 'master' into next 2014-06-24 11:56:02 +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
aurhat 5a88f9c323 Fix bugs in spectator mode and removed unused FPCNs
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.
2014-06-20 22:13:18 +02:00
aurhat 0898dfa384 Add list of standard resolutions to the settings in video menu 2014-06-19 13:52:31 +02:00
aurhatandac-stef 07780a8f92 move the clock to the right side 2014-06-11 22:24:31 +02:00
ac-stef b3ee85fd6d fix failed assertion on making selections in editmode
last() may not be used on an empty vector

also, the FIXME was obsolete, since addselection() does call correctsel()
2014-06-07 00:30:50 +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 b246e6e153 fix: don't play hard landing sounds on water transitions
fixes issue #57
2014-05-24 17:42:56 +02:00
ac-stef b29a6616e6 fix: don't apply water physics in edit mode
* 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
2014-05-24 17:32:23 +02:00
ac-stef bca1e7a3cc play drop sound when exiting edit mode
...and the player "drops" back into the map
(fixes issue #55)
2014-05-24 16:47:07 +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 e313a99beb fix buffer overflow for unknown mode numbers
to test, try /mode 1337 ; map ac_desert
2014-05-24 11:42:00 +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
ac-stef 08faac728d fix: show intermission after demo playback
thx jamz :)
2014-05-21 22:50:19 +02:00
ac-stef d81c884cea removed now redundant code
and substituted "copy file and delete original" with "move file"
2014-05-19 18:48:54 +02:00
ac-stef 2768012579 fix: allow creating directories without homedir
With this fix, ac can also create directories relative to the working
directory. This fixes xmaps for users without homedir set.
2014-05-19 17:01:08 +02:00
ac-stef 493aefd34b fix: convert xmap path names for windows
* 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
2014-05-19 12:31:26 +02:00
aurhatandac-stef b728a33bb3 Fix of wrong stats of pistol's ammo on HUD
...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.
2014-05-17 23:41:38 +02:00
ac-stef d4b3526a19 fix clang warning 2014-05-17 14:56:43 +02:00
ac-stef 644d464cac fix: keep g++ attributes to g++ only
prevent wannabe compilers from parsing GNUC-only code
(clang++ apparently defines __GNUC__)
2014-05-17 14:27:43 +02:00
ac-stef 3b2b8c9250 fix makefile 2014-05-17 13:54:01 +02:00
aurhat 77f5b15ba9 Fix of doubled end of round, when spectator changes mode to active, short of the new round start.
This is fix of  https://github.com/assaultcube/AC/issues/18 . Patch restores structure changed in commit: https://github.com/assaultcube/AC/commit/5c117d .
There is added only "c.state.state==CS_SPECTATE" condition.
2014-05-17 12:00:54 +02:00
ac-stef f4af930865 cleaned up discrete player movement loop
some comments added
2014-05-16 18:56:17 +02:00
ac-stef 46ef8b58da fix sliding along corners
solves most stuck-conditions along corners
2014-05-16 18:56:17 +02:00
ac-stef 606af1ca9b fix issue #13 2014-05-16 18:56:17 +02:00
ac-stef 0cace56fc2 prevent nades from jumping out of water
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
2014-05-16 18:56:17 +02:00
ac-stef e5a0ed37d5 fixed physics around corners
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.
2014-05-16 18:56:17 +02:00
ac-stef af92c3cf22 substitute ffs()
windows libraries seem to lack this nice function
2014-05-16 18:38:51 +02:00
Šarūnas Snapkauskasandac-stef 40f98595a8 server: fix blocking of non-existent primary guns
I think driAn meant to use OR, as using AND leads to FALSE.
2014-05-15 17:35:08 +02:00
aurhatandac-stef c0c68053e8 Fix of endless round in team arena mode
...when one team becomes empty, and in second team there are
more players than 1.

This is fix of https://github.com/assaultcube/AC/issues/24 .
2014-05-15 17:35:08 +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 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 f4a4b843de engine tweak: quadrupling occlusion resolution without much computing effort
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
2014-05-15 13:48:31 +02:00
ac-stef 5f484a45a5 engine tweak: fixing lighting postfilter
no longer directional IIR filtering, now it's (mostly) pure FIR
also, huge speedup (for example, ac_iceroad recalcs 80% faster)
2014-05-15 13:48:31 +02:00
ac-stef 9eceef38df engine tweak: cleaning up calclight 2014-05-15 13:48:31 +02:00
ac-stef 34b99ca713 engine tweak: static seed for random light calculation
repeated recalcs now produce the same lighting - also, every player
gets to see the same map
2014-05-15 13:48:31 +02:00
ac-stef b38fd1b57b engine tweak: speeding up blockcopy/blockpaste
used for dynlight, and that's realtime...
2014-05-15 13:48:31 +02:00