Commit Graph
283 Commits
Author SHA1 Message Date
drian 4371502025 #271 HUD gun-sway fails to pause at intermission 2021-05-05 09:27:39 +02:00
drian 26a4e54938 #250 (7) disallow mouse movement of dead players during pause 2021-04-16 05:30:01 +02:00
drian 6cfa851913 #250 (12) do not allow spectators to respawn during pause 2021-04-15 09:45:01 +02:00
drian 7d0e84fe95 #108 merged 'Pause' PR - work in progress 2021-04-14 09:19:22 +02:00
drian 1e61cbf669 Merge branch 'master' into release_v1.3 2021-02-14 20:05:18 +01:00
drian b615fe449e Merge remote-tracking branch 'remotes/origin/next' into release_v1.3 2021-02-10 21:00:09 +01:00
drian ceac59f0b2 #223 Nade thrown above other players head should not bounce back 2021-02-09 11:27:44 +01:00
aurhat 323d8e8dd4 Fix rising of fly spectator 2017-09-19 22:41:53 +02:00
aurhat eec68e3253 Fix eyeheight during 3rd-person spectating
During 3rd-person spectating eyeheight of player1 was decreased sometimes
from "above head" of spectated player to his eyeheight.
2017-09-19 22:15:57 +02:00
ac-stef 1fe478aae4 cleanup protocol
...and get master to compile again

DOCREF hudextras mapstats_hud nextGameMode
2017-06-27 15:15:25 +02:00
ac-stef 94d0203bc6 cleanup pos packets
* remove roll
* optimise for size
* new protocol data type: unsigned integer with known size
* highres yaw encoding
* double resolution for pitch angles -30°..30°
* half resolution for pitch angles -90°..-30° and 30°..90°
* proper rounding for pitch and yaw values
* same resolution for yaw and pitch for both pos packet types
* restore transmission of the velocity vector
2017-06-27 15:15:24 +02:00
ac-stef fcb3481e23 fix crouch release on death 2017-06-09 20:42:26 +02:00
ac-stef 4e77b91c0e re-check line-of-sight depth readout from the graphics driver
- manually intersect line-of-sight with all map geometry
- shorten sight vector if necessary
2017-05-28 00:37:13 +02:00
ac-stef cf55e54faa fix damage indicator overflow after fastforward
break up shiftgametime() time jumps into 5-second jumps and five 1-second
jumps for the last five seconds

rename respawnoffset to lastdeath (because that's what it is)
rename clientside nextmillis to skipmillis (because that's what it does)
2017-05-13 03:46:00 +02:00
ac-stef 8d21f39ad9 more mouse code cleanup
- remove sensitivity training (should be rewritten in cubescript, if
  actually required)
- more documentation on mouse sensitivity parameters
- some renaming

DOCREF findsens
2017-04-30 21:15:05 +02:00
ac-stef f9223149ec mousemove code cleanup
- remove esoteric option to choose between a*b/c and a/c*b
- some comments added

DOCREF scopesensfeel
2017-04-30 20:36:35 +02:00
ac-stef 1b596e059a roll update
- split into strafe roll (maxroll) and damage roll (maxrolleffect)
- locally recompute remote players roll (can be removed from pos pkt)
- fix maxrollremote

DOCREF maxroll maxrolleffect maxrollremote
2017-04-29 18:23:23 +02:00
ac-stef 41ff4cf583 use shoe level instead of eyeheight
for edge jump detection
2016-10-13 15:29:47 +02:00
aurhat 3c5012e768 Don't check collision during spectating in 1st person view
It fixes the problem, that during spectating in 1st person view,
when spectated player collided (for example with wall) and crouched,
then his crouches weren't visible for player1.
2016-10-08 20:19:57 +02:00
ac-stef 397c441fed more verbose error messages for disabled commands 2016-09-16 17:35:47 +02:00
ac-stef 1a482e5394 final corner physics fix
if corner sliding doesn't work, try x- and y-slides as well
2016-09-13 21:17:07 +02:00
ac-stef 29a3970b72 fix flyspeed
and a compiler optimisation error

(for clang >= 4, O3 may be reactivated in the makefile)
2016-09-09 22:22:55 +02:00
ac-stef 123e2b2b12 cleanup 2016-09-08 01:20:45 +02:00
ac-stef 15c4bbe84f fix player stuck condition
The condition appeared on 32-bit g++ builds with -O3. Apparently, due to
optimisations, the player1 location vector was kept in FPU registers
during collision checks - and the written-to-memory float values gave
different results in the next round.

The fix forces a write to memory and a readback before the collision
checks. An alternative fix would be, to compile physics.cpp with the
switch -ffloat-store, but that would cause a bigger performance hit.
2016-08-28 16:58:56 +02:00
ac-stef a33577c039 sort mapmodel entities during map save
* sort colored lights behind white ones to avoid a light bug
* sort all clipped entities to the end of the list to speed up physics
* sort all pickups and playerstarts to use smaller index numbers to
  use less bandwidth
2016-08-26 14:08:55 +02:00
ac-stef a4e84cbf20 cleanup 2016-08-24 12:38:33 +02:00
ac-stef 5813fd4e02 fix corner bounces
try really hard to avoid the seams between corner cubes

possibly overkill, but it's working...
2016-08-23 18:47:40 +02:00
ac-stef 5561d78f05 reduce bumps during cornerslide
backpedal 1/42 of a microstep to get out of the way of rounding errors

(clip ents are not supposed to have seams, but at least GCC builds
with -O3 seem to also require a little here - so, 1/333 for clips)
2016-08-23 18:46:27 +02:00
ac-stef 42cbd10e1d fix cornerslide speed
instead of using a constant (and always wrong) speed, use the same part
of the movement vector that x- and y- slides use

(sadly, this fix seems to raise problems with the previous "fix sliding
along corners" commit, which seems to have liked the constant speed...)
2016-08-23 11:44:09 +02:00
ac-stef bffb588ba9 cleanup physics
should not break anything
2016-08-22 18:12:33 +02:00
ac-stef 7f0eb74f1c fix sliding along corners
fixes getting "stuck" while sliding along a 45° wall made out of
single corner cubes (most of the time)
2016-08-22 17:02:59 +02:00
ac-stef 50764a86cf fix rotated clip entity collision checks
* properly rotate the player hitbox
* add "corner bounce" (doesn't work flawlessly - but it's probably as
  good as possible with this kind of physics engine)
2016-08-22 16:24:34 +02:00
ac-stef 112e3ad399 add tagclipped corner extension
new physics for tagclipped corner cubes:

* corners between non-solids: tagclips extend the corner
	 (visualisation does not reflect that, yet)
* corners between solids: fully clipped (like before)
2016-07-23 18:42:15 +02:00
ac-stef 0e6476806a fix crouching, jumping and doublejumping
* fix the old check for different jump start heights as requirement
  for doublejumps
* better handle multiple binds for the "jump" command
* delay relaxed floorclamping for crouching
* remove some redundant code
2015-09-27 00:28:34 +02:00
ac-stef 196d47d34e limit max speed by consecutive doublejumps
Instead of applying 25% bonus speed with every executed doublejump (with
potentially unlimited top speed), limit the reachable max speed to 125%
of regular full speed.

This limits regular gameplay only marginally but removes a lot of cheat
potential.
2015-09-26 15:32:27 +02:00
ac-stef d75409a29c fix ladder physics
When both "forward" and "backward" keys are pressed, now the action
matches the last pressed one. Now the keys work on the ladder exactly
as with regular movement.
2015-09-26 11:34:47 +02:00
ac-stef 826499c12d enable gcc to check arguments of printf-like functions
Check printf-like functions like conoutf, if format strings and argument
lists match.

This commit also fixes a lot of code parts that actually had mismatching
argument lists - or did things, that this check does not like.

numtime() was rewritten in an ugly but very portable fashion (it's
recommended to stay away from "long long" format entries, because errors
usually only come up at runtime).

(some code was copied from sauer)
2015-08-02 19:40:41 +02:00
Frank LENORMANDandac-stef 3ec0b1218d abide by the rules for reference objects 2015-07-18 00:51:00 +02:00
aurhat ea5e947052 Allow to switch in intermission from DEATHCAM to other SPECT modes 2015-07-04 11:31:49 +02:00
ac-stef f3e72b8fb7 remove gettext
DOCREF gettext
2015-06-10 14:28:50 +02:00
ac-stef 11dc8202fa cleanup 2015-06-05 16:01:03 +02:00
aurhat e64c2350d0 Increase speed of rewind
The commit increases very much speed of demo rewind and also prevents
AC freeze for gamespeed = 1000.
It may degrade physics for gamespeed = 1000 on very low end machines.
2015-06-05 13:37:25 +02:00
ac-stef edd94fb931 tilted and rotated clip entities
Attribute 7 of clip- and plclip-entities now allows four different shapes
for the clips:

  0: basic rectangular (like in older AC versions)
  1: tilted in direction of x-axis
  2: tilted in direction of y-axis
  3: rotated by 45 degrees

The shapes 1 and 2 use the value of attr6 as slope angle.

The player only can walk upwards a tilted clip, if the height (attr4) is
at least 0.6 cubes. Slopes steeper than 5.0 can not be walked up (same
maximum step size as for sloped map geometry).

Mappers, please keep in mind: especially tilted clips are more expensive
than regular clips, but they are much cheaper than stairs built from a
bunch of regular clips. Large and small clips cost exactly the same, so
try to combine clips to keep the total number down.
2015-05-27 15:47:05 +02:00
ac-stef f774e4d841 higher resolution for entity attributes
Interpret the values for entity yaw angles and clip entity sizes as
fifths or tenths of cubes or degree.

This makes some entity attributes appear as float values to the user.
The map file still only keeps integer values - but now they are
interpreted differently - for example, a health pack elevation value of 6
now means 0.6 cubes instead of 6.

Note: the scaling factors are hardcoded - use ENTSCALE5 or ENTSCALE10
whereever possible. For generic entity editing, the scaling values are
also stored in entscale[] - but that table can not be changed without
breaking the map format! This scaling is similar to the treatment of the
vdelta values of map cubes.
2015-05-27 15:47:04 +02:00
ac-stef ea480a7b0c higher resolution for waterlevel
Interpret the waterlevel value as tenths of a cube.

This makes the waterlevel variable a float value to the user, while the
map file still stores an integer value - but now it is interpreted
differently - for example, a waterlevel value of 123 now means 12.3 cubes
instead of 123. Old map files are converted during loading.

Note: the values of waterlevel and hdr.waterlevel need to be in sync.

DOCREF waterlevel
2015-05-18 14:59:41 +02:00
ac-stef b7a551361f fix falling through mapmodels and clips when pushed 2015-03-25 21:42:29 +01:00
ac-stef 39cbee947d Merge branch 'master' into next 2015-02-08 16:17:04 +01:00
aurhat 87bb20e799 Fix sound bug on shallow water 2015-02-07 15:01:57 +01:00
aurhat f6cd6ffb7e Revert "inWater" command
This reverts commit 1e20bace2e ,
because inWater command doesn't work and it looks, that it's useless.

DOCREF inWater
2014-12-25 22:56:09 +01:00
aurhat ca9305dd02 Fix - don't allow dead body of player to climb on the ladder
It was visible probably only locally.
2014-09-20 00:45:21 +02:00