Commit graph

7044 commits

Author SHA1 Message Date
Christoph Oelckers
1d286d5bd5 - added APROP_MaxStepHeight + APROP_MaxDropOffHeight. 2016-04-07 13:41:54 +02:00
Christoph Oelckers
ddb2f6b6cb - fixed: P_SpawnPlayerMissile still used the angle_t values for offsetting the autoaim traces. 2016-04-07 13:11:23 +02:00
Christoph Oelckers
1eeaee1ac7 - completely reviewed and fixed all codes using angles in the automap. 2016-04-07 13:05:29 +02:00
Christoph Oelckers
a1c03c9a62 - fixed: P_AimCamera inverted the pitch. 2016-04-07 12:44:46 +02:00
Christoph Oelckers
790e13e5cb fixed: For sight checks the 'eye' of the seeing thing should be placed at 3/4 height, not half its height. 2016-04-07 12:14:34 +02:00
Christoph Oelckers
7ebb961917 - added weapon bobbing interpolation.
This was so ridiculously simple that I really fail to understand why the previous attempt was so overcomplicated that it just failed for that.
2016-04-07 11:48:23 +02:00
Christoph Oelckers
7f23a91488 - fixed: smooth bobbing uses the full angular range to calculate its position. 2016-04-07 11:14:39 +02:00
Christoph Oelckers
14b370df66 - fixed automap rotation to point upward, not downward when am_rotate is on. 2016-04-07 10:39:15 +02:00
Christoph Oelckers
5409ada0e3 let WM_DISPLAYCHANGE and WM_STYLECHANGED call DefWindowProc.
At least on GZDoom it seems to be important on some systems.
2016-04-07 10:26:57 +02:00
Randy Heit
4b10177e46 Make the firelines fudging more "streamlined" 2016-04-06 20:09:42 -05:00
Christoph Oelckers
3923039a1b - fixed: a sight check that starts right on a linedef should ignore that linedef.
Trying to calculate a slope to the target from this linedef's opening will always result in failure because it'd involve a division by zero.
2016-04-07 01:16:07 +02:00
Christoph Oelckers
b774fed93e - fixed: P_DrawSplash2's z-velocity was too high.
This code was ported from the 2005 floating point version, at one point it replaced 128 with 0.5, but 128 as a fixed point value needs to be 1/512. as a floating point value.
2016-04-06 18:46:52 +02:00
Christoph Oelckers
b93d4a796a - fixed angles for am_rotate. 2016-04-06 17:28:31 +02:00
Randy Heit
b796a5fed6 Fixed: segangle is only 16-bits, so AngleToFloat won't work on it directly 2016-04-06 08:45:07 -05:00
Christoph Oelckers
8ad49f5d33 - removed a leftover line from before the floating point conversion in p_user.cpp. 2016-04-06 13:21:17 +02:00
Christoph Oelckers
8cbdbdaf70 - fixed: The PathTraverse and sight checking code may not assume that ceiling(x) == floor(x)+1.
This will fail when a trace starts directly on a block boundary in which case x is a whole number. It should always use 'floor(x)+1' to ensure that the calculated point is at the right or upper edge of a block.
2016-04-06 13:19:09 +02:00
Christoph Oelckers
d4a2e9696e - removed 'inline' from P_Teleport declaration. 2016-04-05 22:27:11 +02:00
Christoph Oelckers
1a5a00a76e Merge branch 'floatcvt' 2016-04-05 21:42:09 +02:00
Christoph Oelckers
04b0a13bd3 - some optimization of FPathTraverse:
* we do not really need compatibility PointOnLineSide here. Unlike the movement code it'd only affect some extreme edge cases.
 * removed the special case for very short traces. This was a result of the original and very imprecise PointOnLine functions. Since those no longer get used here and floating point precision is a lot higher there is no need for this kind of treatment.
 * PointOnLine checks for the sides of an actor's bounding box don't need a full PointOnLineSide call, a simple coordinate comparison is fully sufficient, and this can easily be done in the existing switch/case block.
2016-04-05 16:29:07 +02:00
Christoph Oelckers
ad13a55f0d - floatified line_t::dx and dy. 2016-04-05 14:03:08 +02:00
Christoph Oelckers
f606ba315f - fixed: The return value of sector_t::FindHighestFloorPoint lost its '-' sign during the floating point conversion. 2016-04-05 10:55:13 +02:00
Christoph Oelckers
1d83ea6177 - fixed: ACS's SpawnProjectile and Thing_Projectile2 functions were treated as fixed point even though they are not. 2016-04-05 10:16:48 +02:00
Christoph Oelckers
55cbeb0253 - fixed pitch calculation in P_SeekerMissile with SMF_PRECISE. 2016-04-04 23:07:21 +02:00
Randy Heit
d39694a33d Fixed: DoTakeInventory() indicated success when passed an invalid item type 2016-04-04 15:51:03 -05:00
Randy Heit
3c8423d810 Print only one error message when PlayerPawn.Face is not 3 chars long 2016-04-04 15:17:58 -05:00
Randy Heit
57e0c97867 Fixed: DECORATE property error messages fail to show the file information 2016-04-04 15:16:29 -05:00
Randy Heit
6f60253590 Don't waste time looking for variables to (de)init in native classes 2016-04-04 14:57:43 -05:00
Christoph Oelckers
2dff6a08d1 - fixed: P_RadiusAttack passed the wrong radius value to the BlockThingsIterator. 2016-04-04 16:51:25 +02:00
Christoph Oelckers
21692359cc - fixed A_Face angle calculation. 2016-04-04 15:59:59 +02:00
Christoph Oelckers
7586320038 Merge branch 'master' into floatcvt
# Conflicts:
#	src/p_map.cpp
2016-04-04 14:19:34 +02:00
Christoph Oelckers
c346ac6143 - fixed: P_TeleportMove must clear the spechits array.
This was accidentally deleted during one round of portal refactoring but is essential to prevent multiple teleport activations in one move.
Fixing this also allowed removing the fudging that was added to work around the issue in P_TryMove.
2016-04-04 14:17:34 +02:00
Christoph Oelckers
32c32ea739 - fixed some initialization problems with sound.
* a position-less sound did not get the listener's position attached.
 * an unattached sound mixed up y and z coordinates.
2016-04-04 12:46:32 +02:00
Christoph Oelckers
fadc7d650d - fixed: segplane_t::SetAtHeight initialized the plane normal's Z incorrectly. 2016-04-04 12:02:53 +02:00
Randy Heit
7de8c2b5eb Fixed: || should be && 2016-04-03 21:35:44 -05:00
Randy Heit
77f9643c8f How did this end up wrong? 2016-04-03 20:25:07 -05:00
Randy Heit
17972b5d06 Revert "Add "support" for user string variables in DECORATE"
- This reverts commit c90a1c0c96.
- DECORATE looks to be very dependant on functions that take strings as
  parameters receiving those strings as constants and not as expressions,
  so being able to declare string variables with DECORATE is pretty much
  useless.
2016-04-03 19:15:00 -05:00
Christoph Oelckers
fd27c8db9e Merge branch 'master' into floatcvt
# Conflicts:
#	src/dobjtype.cpp
#	src/dobjtype.h
#	src/version.h
2016-04-04 01:21:24 +02:00
Randy Heit
c90a1c0c96 Add "support" for user string variables in DECORATE
- This is "support" in the very most basic sense. You can declare them,
  but you can't actually do anything with them, since the decorate parser
  can't handle expressions when it's parsing string arguments. However,
  they seem to be getting properly initialized and destroyed, which is
  what this was added to test. If it doesn't look like too much trouble, I
  might try to turn them into something actually worth something.
2016-04-03 18:10:09 -05:00
Randy Heit
7c8cff64e6 Added code to initialize and destroy string variables in classes
- Will require being able to add strings to non-native classes to actually
  test this.
2016-04-03 17:45:04 -05:00
Randy Heit
15208188de Remove PClass::Extend() 2016-04-03 16:25:08 -05:00
Randy Heit
85c8218441 Added methods for PTypes to serialize their values
- Values are tagged to allow for some measure of changing variable types
  without automatically breaking savegames.
- Use these new methods to serialize the non-native variables in an
  object. This allows for achiving non-ints.
2016-04-03 16:21:48 -05:00
Randy Heit
da496bbe62 Use AddField() to add user variables in DECORATE 2016-04-03 16:21:48 -05:00
Randy Heit
806d9d7a95 Add an AddField() override to PClass that extends the default instance 2016-04-03 16:21:47 -05:00
Randy Heit
3357af32e5 Generalize FxArrayElement to work with all numeric elements (not just 32-bit ints) 2016-04-03 16:21:41 -05:00
Randy Heit
0cc2705b99 Added A_LogFloat 2016-04-03 16:12:35 -05:00
Christoph Oelckers
1011e26eb9 - fixed: P_RadiusAttack should not call P_DamageMobj for a damage value of 0.
This could happen if the damage calculations resulted in a value between 0 and 1, which for the actual check was multiplied with the damage parameter of P_RadiusAttack which inflated the fractional value to something that looked like actual damage but was later truncated.
2016-04-03 22:45:54 +02:00
Christoph Oelckers
6d441e25db - partially undid the 'repeated flash state' fix, because it didn't work with the stock weapons. I'm still not sure if a compatibility setting is needed. 2016-04-03 22:31:45 +02:00
Christoph Oelckers
330ca07f69 Merge branch 'master' into floatcvt 2016-04-03 22:11:50 +02:00
Christoph Oelckers
3f5e0c682e - fixed: Due to the iteration limit of 100 in the path traverse code, running a trace was effectively limited to somewhere around 12800 map units. Also added the safer exit condition checks from the sight checking code to FPathTraverse. 2016-04-03 21:41:58 +02:00
Christoph Oelckers
70b8afc5ec - fixed: A_CheckLOF did the trace pitch calculation wrong. 2016-04-03 21:26:57 +02:00