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.
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)
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.
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.
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.
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
* 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
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.
- 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
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".
* 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