Commit Graph
298 Commits
Author SHA1 Message Date
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
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 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 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 d258b7c186 less annoying visualisation for tagclips
- 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
2014-01-30 19:38:41 +01:00
ac-stef 3add3a4876 fix: clip all types of players
i hardly believe, anyone can throw a flag in a tagged area, but who knows...
2014-01-28 17:21:07 +01:00
ac-stef 3865affb0b additional way of clipping areas: tagclips
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".
2014-01-28 01:12:52 +01:00
Lucas GAUTHERON aae2db354f maxrollremote fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7596 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-10-12 08:04:19 +00:00
Lucas GAUTHERON 42a132686f crouch bug fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7591 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-10-11 17:22:32 +00:00
Lucas GAUTHERON 47afb07752 "switch to active play" previous behavior restored
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7587 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-10-11 16:36:45 +00:00
Bukz 810d14d258 temporary double jump fix/typo fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7393 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-23 12:54:58 +00:00
Lucas GAUTHERON 1c21d746c0 "Body of a dead bot continues to climb ladder" bug fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7340 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-10 16:18:34 +00:00
Lucas GAUTHERON ad2aa69d2d allow bots to crouch
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7339 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-10 15:52:30 +00:00
sireus b33116712c sane(r) command signatures (warning: huge commit)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6908 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-10-06 22:49:49 +00:00
sireus 473f58c7de flag collision fixes
* extend pickup collision radius over full height
* make flags collide with plclips

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6883 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-09-21 23:14:34 +00:00
sireus 70b1823ed7 spelling fixes (thanks, Wolf)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6783 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-04-09 18:33:20 +00:00
Lucas GAUTHERON 7f2923812f physics: we should rather not use fast maths functions here
(Brahma: please remove what can be removed)

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6680 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-10-31 15:47:13 +00:00
aerkefiende 06f73f4627 Replaced Tabs with 4 spaces in every source file
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6561 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-07-31 15:44:57 +00:00
Bukz 83cc603a3a testing onHit alias/cancel jump/crouch physics in editmode if both keys are pressed
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6553 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-07-06 02:12:58 +00:00
Bukz 2fc7069551 a better implementation for "slowmove" -> "flyspeed"
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6447 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-05-17 13:46:44 +00:00
Bukz bf440a7e72 removing useless bit on "isfly"
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6445 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-05-16 20:05:39 +00:00
Bukz 88e09210e7 don't cap speed if client entered editmode while crouching
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6442 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-05-15 13:34:07 +00:00
Bukz b0a5672ad5 little inWater fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6394 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-04-29 17:19:55 +00:00
Bukz 1e20bace2e inWater command, akimboautoswitch slider, akimboendaction defaults to 1 (switch back to primary)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6390 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-04-29 14:04:41 +00:00
Bukz a1ea14c627 slowmove bugfix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6355 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-04-26 09:02:43 +00:00
Bukz 0c48eb7998 even more fly updates
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6352 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-04-26 00:36:04 +00:00
Bukz 8b2f33b614 sigh, looks like I should call it a night..
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6346 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-04-25 22:52:54 +00:00
Bukz 786c3e67d0 slowmove for spec/editfly
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6344 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-04-25 22:41:51 +00:00
Bukz 78c527271f crouch/jump editing physics fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6342 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-04-25 21:12:25 +00:00
Bukz b930b59438 reversed jump physics while crouching in editmode
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6340 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-04-25 20:09:33 +00:00