Commit Graph

6842 Commits

Author SHA1 Message Date
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
Christoph Oelckers 02a586e6b2 - removed a redundant Vec3Offset call in A_SpawnParticle. 2016-04-03 21:03:49 +02:00
Christoph Oelckers 3ee42f6aa6 - removed all savegame compatibility handling, since the data is just too different from what it was before to try to convert it. 2016-04-03 20:55:23 +02:00
Christoph Oelckers 4e5ba49aca - got rid of secplane_t::fA and fB. All uses could be replaced by other functions. 2016-04-03 19:46:00 +02:00
Christoph Oelckers fc5f98a0be - floatified the sector planes.
This should conclude the floating point conversions for now.
2016-04-03 19:28:53 +02:00
Christoph Oelckers fede16ce68 - fixed PointOnSide checks.
- optimized some ZatPoint calls for floating point planes.
2016-04-03 13:15:02 +02:00
Christoph Oelckers 7a6039b44c - floatified vertex coordinates.
Making these double or float doesn't seem to matter at all performance-wise so they use the more precise double format.
2016-04-03 11:53:31 +02:00
Braden Obrzut 42edd7db22 - Added IfInvulnerable SBARINFO command (modified from Blue-Shadow's pull request) 2016-04-02 23:47:44 -04:00
Braden Obrzut 81f29556bf - Refactored SBarInfo flow control so negatable commands are handled statically.
- Made TArray movable and TDeletingArray a move only type.
2016-04-02 23:43:56 -04:00
Edoardo Prezioso f36489098f - Fixed one GCC/Clang warning. 2016-04-02 23:01:51 +02:00
Edoardo Prezioso 28ac65b25b - Fixed GCC and Clang compilation errors. 2016-04-02 23:01:32 +02:00
Christoph Oelckers 6ffb5fa164 - fixed: Angular interpolation needs to call deltaangle instead of using the difference between two angles to avoid overflow conditions. 2016-04-02 22:12:52 +02:00
Christoph Oelckers 9b5a4b6d43 - removed several unused setter functions for level data structures and fixed some incorrect uses. 2016-04-02 22:05:23 +02:00
Christoph Oelckers 9a07f81269 - renamed all ZatPoint variants that return a fixed point value to ZatPointFixed, to avoid accidental mixup with the floating point variants. 2016-04-02 20:45:32 +02:00
Christoph Oelckers 6a150f7248 - fixed seg vertex adjustment (from a commit that wasn't copied to this branch.) and added viewx etc. to a global header . 2016-04-02 20:24:51 +02:00
Christoph Oelckers 3db90ff4c1 - removed all remaining fixed point methods from AActor.
- removed all calls to fixed point vertex access methods in p_setup.cpp.

# Conflicts:
#	src/p_setup.cpp
2016-04-02 20:14:58 +02:00
Christoph Oelckers 60e25b32a8 - floatified the particles.
This is the last bit of play code that needed to be altered, what's left is the underlying data representations of vertices, linedefs and sectors.

# Conflicts:
#	src/p_setup.cpp
#	src/r_things.cpp
2016-04-02 20:12:08 +02:00
Christoph Oelckers 931774ab38 - fixed some issues with the PathTraverse and sight checking code:
* typo in calculating end position from a trace vector
 * must use floor to convert from floating point block coordinate to block index to account for running off the negative side of the blockmap. (Int cast always rounds toward zero which is wrong here.)
 * bad calculation of sight checking slopes - they has the actor's z coordinate duplicated.

- fixed scaling of automap markers.
2016-04-02 20:10:48 +02:00
Christoph Oelckers b3659305ce - fixed typo in line portal interpolation path calculation. 2016-04-02 20:10:32 +02:00
Christoph Oelckers 96a02f922d - removed R_PointToAngle2 call in P_Setup.cpp.
- removed long inactive node saving code in p_writemap.cpp. If this file is ever made operational again it will be with UDMF output.
2016-04-02 20:10:25 +02:00
Christoph Oelckers 046ee3e803 - removed a few leftover FRACUNITs. 2016-04-02 20:07:18 +02:00
Christoph Oelckers bb13590e07 - make viewx etc. global.
- a few minor optimizations.
2016-04-02 20:07:02 +02:00
Christoph Oelckers ccfb2ac233 - fixed quake checks. 2016-04-01 12:58:46 +02:00
Christoph Oelckers 8680391e0b - floatified the global view variables.
The software renderer still uses internal copies of the fixed point version.
2016-04-01 12:22:16 +02:00
Christoph Oelckers a5e14425aa - fixed angular interpolation of skybox viewpoints. 2016-04-01 11:55:37 +02:00
Christoph Oelckers a93296be80 - removed most of the deleted function declarations. 2016-03-31 21:20:45 +02:00
Christoph Oelckers 6445615b5d - fixed the sound location calculations which got somewhat broken by the constant changes during the conversion. 2016-03-31 21:13:32 +02:00
Christoph Oelckers 8f5ac9b73f - fixed a float/fixed mixup in R_PointOnSideSlow. 2016-03-31 17:44:05 +02:00
Christoph Oelckers 9412ce45d6 - floatified portals.cpp and most of p_maputl.cpp. 2016-03-31 16:52:25 +02:00
Christoph Oelckers 6b065b8074 - floatified FBoundingBox. 2016-03-31 10:38:54 +02:00
Christoph Oelckers 8fd76f0c8a - floatified bmaporgx and bmaporgy, allowing to remove the gross overflow prevention hacks present in the blockmap code. 2016-03-31 09:23:14 +02:00
Christoph Oelckers f41afde545 - floatified line_t::bbox. 2016-03-31 01:22:49 +02:00
Christoph Oelckers 7a2c8fdc1c - floatified po_man.cpp and the remaining bits in p_lnspec.cpp 2016-03-31 00:41:21 +02:00
Christoph Oelckers 1666418510 - fixed incomplete interpolation floatification. 2016-03-30 20:05:29 +02:00
Christoph Oelckers d54a2364b9 - floatified r_interpolate.cpp. 2016-03-30 17:11:31 +02:00
Christoph Oelckers 27bad66f61 - floatified the remaining parts of p_sector.cpp. 2016-03-30 16:51:19 +02:00
Christoph Oelckers 66929cbaff - floatified p_trace, p_slopes and p_udmf.cpp.
- major cleanup of unused code.
2016-03-30 16:30:22 +02:00
Christoph Oelckers ced30e7bbb - fixed a few oversights.
- switched p_buildmap to use the floating point variants of the linedef/sector init methods.
2016-03-30 11:25:02 +02:00
Christoph Oelckers c2e2910399 - fixed copy/paste error in P_GetFriction resulting in incorrect calculation of movefactor. 2016-03-30 10:08:06 +02:00
Christoph Oelckers 0eb35d6c6e Merge branch 'master' into floatcvt
# Conflicts:
#	src/dobjtype.cpp
#	src/dobjtype.h
2016-03-30 09:47:25 +02:00
Christoph Oelckers 77f2530236 - floatified the sector plane movers and removed some of the ZatPoint conversion cruft. 2016-03-30 09:41:46 +02:00
Randy Heit 1648a71e45 Add support for Name and String types to ACS's GetUserVariable
- Reading one of these types will copy its value into the global ACS string
  table and return the index.
2016-03-29 22:49:12 -05:00
Randy Heit b37ef48e99 Allow ACS's GetUserVariable to access non-user variables
- Since DECORATE already allows reading all declared variables in a class,
  where's the utility in keeping this restriction in ACS?
- Variables must still be numeric types.
- SetUserVariable is still restricted to user variables only.
2016-03-29 22:42:04 -05:00
Randy Heit 35121544b4 Add float support to ACS's Get/SetUserVariable functions
- "Support" means that setting one will convert from fixed point to
  floating point, and reading one will do the reverse.
2016-03-29 22:41:38 -05:00
Randy Heit b6e3358b1c Add A_SetUserVarFloat and A_SetUserArrayFloat 2016-03-29 22:41:37 -05:00
Randy Heit 299019ea15 Add GetValueFloat() for numeric PTypes 2016-03-29 22:41:37 -05:00
Randy Heit feb5ab31cc Add double variants of SetValue() for numeric PTypes 2016-03-29 22:05:25 -05:00
Randy Heit e2711a74e7 Add float user vars for DECORATE
- PClass::Extend now takes alignment into consideration.
2016-03-29 21:48:57 -05:00
Christoph Oelckers ff0b371582 - made the linedef deltas private and only accessible through access functions.
Now everything should be in place to remove the fixed point math from the rest of the play code.
2016-03-29 16:13:16 +02:00
Christoph Oelckers 84d547adfb - fixed: The check if a line is in range of a bounding box must be exclusive.
Unfortunately I picked the one incorrect version of this check (from A_PainShootSkull) when moving it to an inline function.
2016-03-29 13:10:15 +02:00
Christoph Oelckers 25f5e8449a - replaced all direct access to sector plane coefficients with wrapper functions. 2016-03-29 12:40:41 +02:00
Christoph Oelckers c7ae4688a3 - replaced all direct access to vertex coordinates with wrapper functions.
So that code replacement can be done piece by piece and not all at once.
2016-03-29 10:07:06 +02:00
Christoph Oelckers 8d071f85b3 - use float vectors for prediction. 2016-03-29 02:06:05 +02:00
Christoph Oelckers c776a0fb54 - floatification of p_teleport and p_switch.cpp. 2016-03-29 00:31:59 +02:00
Christoph Oelckers 0a238e7e18 Merge branch 'master' into floatcvt 2016-03-28 22:53:26 +02:00
Christoph Oelckers a92de84cf7 - this stuff should not have been saved... 2016-03-28 22:53:10 +02:00
Christoph Oelckers 0283df4c42 - restored floating point pusher code. 2016-03-28 22:47:45 +02:00
Christoph Oelckers 9145181b79 Merge branch 'master' into floatcvt 2016-03-28 22:25:36 +02:00
Christoph Oelckers 8c3c18b008 - forgot to add this... 2016-03-28 22:25:12 +02:00
Christoph Oelckers d87f861e87 Merge branch 'master' into floatcvt
# Conflicts:
#	src/p_spec.cpp
#	src/p_spec.h
2016-03-28 22:23:41 +02:00
Christoph Oelckers 263051a77b - removed a few unnecessary #includes. 2016-03-28 22:20:25 +02:00
Christoph Oelckers 59920095af - separated pushers into their own file. 2016-03-28 21:57:22 +02:00
Christoph Oelckers 05504b65d2 - floatified p_scroll.cpp
While testing this it became clear that with the higher precision of doubles it has to be avoided at all costs to compare an actor's z position with a value retrieved from ZatPoint to check if it is standing on a floor. There can be some minor variations, depending on what was done with this value. Added isAbove, isBelow and isAtZ checking methods to AActor which properly deal with the problem.
2016-03-28 21:04:46 +02:00
Christoph Oelckers a46a4c81b1 Merge branch 'master' into floatcvt
# Conflicts:
#	src/p_lnspec.cpp
#	src/p_spec.cpp
#	src/p_spec.h
2016-03-28 17:46:19 +02:00
Christoph Oelckers fd46909b1a - made partial floarting point aliases for EV_DoCeiling so that all the calls in p_lnspec.cpp match the master branch for merging. 2016-03-28 17:41:13 +02:00
Christoph Oelckers b5f333798e - moved all scroller related code into its own file, including the DScroller class definition. 2016-03-28 17:27:55 +02:00
Christoph Oelckers a99ebc2356 - floatified p_sight.cpp. 2016-03-28 16:22:21 +02:00
Christoph Oelckers 5e1c79c050 - floatified the rest of p_mobj_cpp and removed a large part of the conversion cruft from the headers that was needed to keep the code compileable. 2016-03-28 12:03:07 +02:00
Christoph Oelckers 2fff7005ad - floatified more of p_mobj.cpp 2016-03-28 10:01:24 +02:00
Christoph Oelckers 217414cb1c -floatified P_ExplodeMissile and P_XYMovement 2016-03-28 00:55:57 +02:00
Christoph Oelckers 7b256dda3d - did the last remaining bits in p_map.cpp. 2016-03-27 22:49:59 +02:00
Christoph Oelckers 8b4a33794a - floatified P_ChangeSector. 2016-03-27 22:35:58 +02:00
Christoph Oelckers fe744a589c - floatified P_RadiusAttack. 2016-03-27 21:11:17 +02:00
Christoph Oelckers 0baaa3cf63 - floatified P_LineAttack, P_TraceBleed and P_UseLines. 2016-03-27 20:58:01 +02:00
Christoph Oelckers eae6f7e9ea - floatified P_AimLineAttack. 2016-03-27 17:58:18 +02:00
MajorCooke 4eee1c7af1 Fixed: A_FaceMovementDirection was backwards. 2016-03-27 14:21:07 +02:00
Christoph Oelckers 228c447a02 - fixed: A_FireCustomMissile used the player position as offset. 2016-03-27 14:20:14 +02:00
Christoph Oelckers 6ab95da2fc - fixed copy/paste coordinate screwup in moving camera code. 2016-03-27 14:11:46 +02:00
Christoph Oelckers 23d311dd04 - floatified P_CheckSlopeWalk. It should be noted that this function is one place where full double precision is too high and needed to be truncated. 2016-03-27 14:07:35 +02:00
Christoph Oelckers 26ff2f73d7 - floatified P_TryMove and the sliding and bouncing code. 2016-03-27 13:29:58 +02:00
Christoph Oelckers 1877eca2ab - more floatification of p_map, plus some stuff used in those functions. 2016-03-27 01:06:54 +01:00
Christoph Oelckers 6e93264016 - started floatification on p_map.cpp. 2016-03-26 23:19:38 +01:00
Christoph Oelckers 00ea8662b8 - floatification of p_enemy and p_interaction.cpp. 2016-03-26 20:59:35 +01:00
Christoph Oelckers 0c39bdd04c - floatified texture scale values. 2016-03-26 13:37:44 +01:00
Christoph Oelckers dabed04d2a - floatification of p_3dfloors, p_3dmidtex and p_acs.cpp plus some leftovers.
- removed all references to Doom specific headers from xs_Float.h and cmath.h.
2016-03-26 12:36:15 +01:00
Christoph Oelckers 35bb686281 - floatification of sector_t::centerspot. 2016-03-26 09:38:58 +01:00
Christoph Oelckers 30b57fd7b0 - floatification of G_CheckSpot and a few other things. 2016-03-26 09:28:00 +01:00
Christoph Oelckers 696fde69b8 - moved the bot support code from AActor::Tick to a subfunction in the bot sources. No need to pollute a main game file with this stuff. 2016-03-26 01:30:28 +01:00
Christoph Oelckers c2e7858e05 - looks like the oldz parameter in UpdateWaterLevel is not needed at all... 2016-03-26 01:13:36 +01:00
Christoph Oelckers 558e04cb99 - safety commit. 2016-03-26 01:03:02 +01:00
Christoph Oelckers e42b0171b3 - floatification of bot code. 2016-03-26 00:34:56 +01:00
Christoph Oelckers 8e13d13916 - floatified the automap. 2016-03-25 21:54:59 +01:00
Christoph Oelckers fb8e03d5eb - floatified FLineOpening.
- some smaller fixes.
2016-03-25 18:43:37 +01:00
Christoph Oelckers 2cf3b20ea8 - floatified the last remaining AActor member variable 'damagemultiply'. 2016-03-25 16:30:31 +01:00
Christoph Oelckers 1125101b37 - floatified AActor::Prev plus the stuff using it.
- rewrote some coordinate functions in AActor to use real float math instead of converting back and forth between float and fixed.
2016-03-25 16:25:25 +01:00
Christoph Oelckers 2b33601d00 - The fixed_t type for the VM also is not needed any longer and was removed. 2016-03-25 15:50:39 +01:00
Christoph Oelckers 8cdfbeea01 - made AActor::__pos a genuine float vatiable. 2016-03-25 15:43:20 +01:00
Christoph Oelckers 3a598d672e - removed the angle_t type from the VM, now that nothing in the interface requires it anymore. 2016-03-25 14:55:01 +01:00
Christoph Oelckers 8b6b5e7b1c - preparation for upcoming work: rename the fixed point versions of PosRelative. 2016-03-25 14:18:50 +01:00
Christoph Oelckers a3b687bc4e - renamed PARAM_DANGLE macros to PARAM_ANGLE, now that the old angle_t type is no longer used in the VM interface. 2016-03-25 13:23:07 +01:00
Christoph Oelckers 21340c6eba - floatified the rest of thingdef_codeptr.cpp and got rid of the remaining fixed_t and angle_t parameters in VM-accessed function. The VM should now be free of those types completely. 2016-03-25 12:57:22 +01:00
Christoph Oelckers b70fee8ed8 - changed the means how to control the slowdown of crushing ceilings encountering an obstacle and corrected a few mistakes in the implementation
* there is a new crushing mode 3, which means that the crusher will always slow down if it hits an obstacle.
* crushing mode 1 (Doom mode) will never slow down.
* crushing mode 0 (compatibility) will only slow down for the specials that did so before, and only if both up and downspeed are 8 and the game is not Hexen. The following specials are affected:
  * Ceiling_LowerAndCrush
  * Ceiling_LowerAndCrushDist
  * Ceiling_CrushAndRaise
  * Ceiling_CrushAndRaiseA
  * Ceiling_CrushAndRaiseDist
  * Ceiling_CrushAndRaiseSilentA
  * Ceiling_CrushAndRaiseSilentDist
* Generic_Crusher was fixed to act like in Boom: Not only a speed value of 8 will cause slowdown, but all speed values up to 24.
* Hexen crushing mode will never cause slowdowns because Hexen never did this. (which also makes no real sense, considering that the crusher waits for the obstacle to die.)
2016-03-25 02:08:22 +01:00
Christoph Oelckers f76524f459 - some cleanup on P_RailAttack plus a bit of parameter floatification in thingdef_codeptr.cpp 2016-03-25 00:59:14 +01:00
Christoph Oelckers 4d22b346f4 - floatified the remaining fixed point variables accessible through DECORATE. PROP_FIXED_PARAM is no longer used anywhere. 2016-03-24 23:50:29 +01:00
Christoph Oelckers 7a26318bf0 - floatified friction. 2016-03-24 22:50:03 +01:00
Christoph Oelckers 6c9e5b03c8 - floatified meleerange, pushfactor and radiusdamagefactor, 2016-03-24 21:31:04 +01:00
Christoph Oelckers e077510773 - floatified MaxTargetRange and MeleeThreshold. 2016-03-24 20:56:59 +01:00
Christoph Oelckers c66ff5939d - floatified AActor::bouncefactor and wallbouncefactor. 2016-03-24 20:43:35 +01:00
Christoph Oelckers 8add60ed38 - fixed: Getting the nearest ceiling height failed for height-less actors. 2016-03-24 19:24:33 +01:00
MajorCooke a9ef8cc637 Fixed A_QuakeEx falloff not working properly. 2016-03-24 19:04:51 +01:00
Christoph Oelckers 4874fe2361 Merge branch 'master' into floatcvt 2016-03-24 18:32:47 +01:00
MajorCooke c8ba6f0611 Fixed quake falloff not working in floatcvt branch. 2016-03-24 18:30:23 +01:00
Christoph Oelckers 75bcec411e - fixed: The portal blockmap's AddLineIntercepts methods needs to check the block's range. 2016-03-24 18:26:27 +01:00
Christoph Oelckers deafa0bce0 - fixed: The 'open door in 5 minutes sector type had the order of parameters wrong, due to a bad function prototype. 2016-03-24 18:01:01 +01:00
Christoph Oelckers 41387622f2 - changed angle parameter of FillSimplePoly. 2016-03-24 16:36:43 +01:00
Christoph Oelckers 5bf806e478 - renamed some fixed point stuff in the texture composition code. 2016-03-24 16:16:45 +01:00
Christoph Oelckers 86d1b2955a - floatified most of r_data (The interpolations cannot be done yet.) 2016-03-24 14:11:41 +01:00
Christoph Oelckers 09d8b4af80 - changed I_GetTimeFrac to return a double instead of a fixed_t. 2016-03-24 12:00:21 +01:00
Christoph Oelckers c83ad9df6c - removed special treatment for not using stdint.h with MSVC. Current compiler versions have this file.
- removed use of finesine for creating the player backdrop for the menu display. This mostly uses the code from the old 2.0 floating point version but fixes some of the constants in there which were not correct.
2016-03-24 11:30:11 +01:00
Christoph Oelckers eac0bfeaeb - removed fixed_t and associated utility macros from FraggleScript code. 2016-03-24 09:16:35 +01:00
Christoph Oelckers 4a79602325 - floatification of g_shared.
- rewrote FraggleScript's movecamera function because it was utterly incomprehensible.
2016-03-24 01:46:11 +01:00
Christoph Oelckers 6557f3b8c8 - floatified quake and weapon code 2016-03-23 20:45:48 +01:00
Christoph Oelckers 2dbd79cc8d - floatified the return data from Trace(). 2016-03-23 18:07:04 +01:00
Christoph Oelckers 70d87f94f2 Merge branch 'master' into floatcvt
# Conflicts:
#	src/p_acs.cpp
#	src/r_utility.cpp
#	src/thingdef/thingdef_codeptr.cpp
#	src/version.h
2016-03-23 14:15:24 +01:00
MajorCooke b16e696157 - Added offset and angle parameters to A_CheckBlock.
- Includes 2 flags, affixed by CBF_: AbsolutePos, and AbsoluteAngle.
- AbsolutePos: Absolute position of where to check.
- AbsoluteAngle: Angle parameter is used as is, not added onto the actor's current angle.
2016-03-23 14:05:31 +01:00
Christoph Oelckers 0d1fbcf65f - flattened the following commits by Major Cooke:
* Added falloff parameter to A_QuakeEx.
- Treated just like A_Explode's 'fullradiusdamage' parameter, where the quake will fall off from this distance on out to the edge. Default is 0, which means no falloff.
- Credits to MaxED and Michaelis for helping.

* - Added HighPoint parameter to QuakeEx.
- Allows fine tuning of where the quake's maximum or minimum occurs, in tics. This must be a range between [1, duration).
- For up or down scaling quakes, this sets the quake to reach maximum sooner or start minimizing later.
- For both, this indicates when the strongest will occur. Default is 0, or in the middle.

The original commits were nearly impossible to find in the convoluted commit tree, so I think it's preferable to have one clean commit instead.
2016-03-23 14:03:10 +01:00
Christoph Oelckers 7c87479eea - parameter rework of several spawning functions. 2016-03-23 13:31:12 +01:00
Christoph Oelckers f60eac8dc0 - floatified FMapThing, dropoffz and GetBobOffset 2016-03-23 12:21:52 +01:00
Christoph Oelckers f8cf4bcf3d - trimmed down the AActor Spawn interface and removed all non-float variants.
This still needs some cleanup in a few calling functions.
2016-03-23 10:42:41 +01:00
Christoph Oelckers 2a0d5a621a - floatified some stuff in g_shared.
Note: This commit does not handle z-spawn positions correctly.
2016-03-23 00:53:09 +01:00
Christoph Oelckers 301f5abadc - floatified the decal code. 2016-03-22 22:07:38 +01:00
Christoph Oelckers 6b3c0ecbd3 - floatified viewheight variables and some related code. 2016-03-22 18:06:08 +01:00
Christoph Oelckers af427b80bd - did some cleanup and consolidation on damage factor code while converting it all to floating point.
- made armor properties floating point.
2016-03-22 16:35:41 +01:00
Christoph Oelckers 1eb106e2c5 - floatification of some alpha parameters. 2016-03-22 13:35:16 +01:00
Christoph Oelckers a652c061f6 - converted g_strife to full floating point use, except the floor height changing stuff in A_LightGoesOut. 2016-03-22 12:42:27 +01:00
Christoph Oelckers 5a4b974187 - float stuff in g_raven.
- fixed some problems in previous commits.
2016-03-22 02:29:43 +01:00
Christoph Oelckers f3d6ca04fc - some floating point changes in t_func.cpp 2016-03-22 01:19:24 +01:00
Christoph Oelckers cf79e1cb6d - fixed some leftover fixed point remnants in g_hexen.
- made the full-coordinate version of P_SpawnPlayerMissile use float coordinates.
2016-03-22 00:30:56 +01:00
Christoph Oelckers 4155e84a1c - made player_t::crouchoffset and FPlayerStart's coordinates doubles and added a float version of divline_t so that I could complete the conversion of Hexen's game code.
- consolidated the actor based damage factor code which was repeated multiple times in various damage inflicting functions.
2016-03-22 00:06:58 +01:00
Christoph Oelckers c830801da3 - g_hexen almost done except for 3 things that require more extensive changes. 2016-03-21 22:20:10 +01:00
Christoph Oelckers f1602882c8 - added a no-parameter Spawn function for inventory items that never show on the map, because the coordinate and replacement parameters will always be 0 for them.
- started converting g_hexen.

Most importantly this removes CHolyWeave as it is just a specialized version of A_Weave with far more convoluted use of parameters.
2016-03-21 14:00:05 +01:00
Christoph Oelckers 4e60ea0252 - made AActor::alpha a floating point value
- replaced some uses of FRACUNIT with OPAQUE when it was about translucency.
- simplified some overly complicated translucency multiplications in the SBARINFO code.
2016-03-21 12:18:46 +01:00
Christoph Oelckers b29058c1ab - converted the last fixed point remnants in g_heretic. 2016-03-21 10:24:52 +01:00
Christoph Oelckers 11e613f578 Merge branch 'master' into floatcvt
# Conflicts:
#	src/g_doom/a_revenant.cpp
2016-03-21 01:28:50 +01:00
Christoph Oelckers a66f9cbf5a - fixed: angular spread for Strife's assault gun was wrong, 2016-03-21 01:26:06 +01:00
Christoph Oelckers 2d2eeb49f0 - make weapon sprite offsets floats. 2016-03-21 01:16:34 +01:00
Christoph Oelckers 1ff4bb419c - made AActor::gravity and FMapThing::gravity floats. 2016-03-21 00:51:19 +01:00
Christoph Oelckers 7ebb96f15c - use one of the new floating point special variables to store the portal plane height of the skybox things. 2016-03-21 00:05:44 +01:00
Christoph Oelckers 289cdfbefd - made AActor::floorclip a double. 2016-03-20 23:42:27 +01:00
Randy Heit f38dbc5055 Use LHS/RHS matching for some simple SAFE_APPENDs 2016-03-20 15:57:02 -05:00
Randy Heit 071a5718cc Use /*X-overwrites-A*/ wherever X = A; appears in the grammar 2016-03-20 15:57:01 -05:00
Randy Heit c0dd39ffd4 Use %token_class to define intconst 2016-03-20 15:57:01 -05:00
Randy Heit 260cf6848f Use LHS and RHS label matching in the grammars where possible 2016-03-20 15:57:01 -05:00
Randy Heit baa6dc0568 Add zcc-parse.c and .h to the ZScript project folder 2016-03-20 15:57:00 -05:00
Christoph Oelckers afa5f22b31 - added two floating point special variables, because the two existing ones are integers and unusable for storing doubles. 2016-03-20 21:51:09 +01:00
Christoph Oelckers cff8e51811 - converted AActor::height to double. 2016-03-20 20:55:06 +01:00
Randy Heit 2a394d0cb8 Do not copy lemon grammars to the output directory
- Having my edits to the grammar disappear because Visual Studio had
  opened the copy instead of the original was super annoying. Using the -C
  option with Lemon, this problem is avoided because there are no copies
  to worry about.
2016-03-20 14:34:44 -05:00
Christoph Oelckers 8362c6a856 - conversion of floorz to double. 2016-03-20 19:52:35 +01:00
Randy Heit 1c592c9601 Lemon update 2009-11-03 19:18:32 on branch trunk
- Enhancements to lemon to generate more compact action tables and to avoid making array bounds tests that can never fail on action table calculations. (user: drh)
- Update zcc-parse.lemon: YY_SZ_ACTTAB is now YY_ACTTAB_COUNT
2016-03-20 13:06:43 -05:00
Randy Heit 288f01a0c2 GCC fixes for zcc_compile.(cpp|h) 2016-03-20 11:34:41 -05:00
Christoph Oelckers b81080ce08 - converted most of g_heretic to float. 2016-03-20 16:51:42 +01:00
Christoph Oelckers 0bdb65c477 - made AActor::radius a double.
This means that all files in g_doom are now fully converted.
2016-03-20 15:04:13 +01:00
Christoph Oelckers ec58e70078 - replaced ceilingz with a floating point variable, also in FCheckPosition. 2016-03-20 13:32:53 +01:00
Christoph Oelckers 6e2421bd37 - use a set of specific conversion functions to convert from and to ACS script variables so that these cases do not get caught when searching for fixed point math in the source. 2016-03-20 12:37:21 +01:00
Christoph Oelckers ada5097e34 - converted scale variables in AActor, FMapThing and skin to float. 2016-03-20 12:13:00 +01:00
Christoph Oelckers 5875e91f39 - finished conversion of most of g_doom.
Only things left here are accesses to AActor::ceilingz and radius in A_PainShootSkull, plus scaleX and scaleY in the ScriptedMarine sprite setting code.
Most is still using wrapper functions around the fixed point versions.
2016-03-20 10:52:10 +01:00
Christoph Oelckers f1d2c7755a - fixed z-offset handling of A_SkelMissile.
I can't believe I missed this for more than 10 years, considering that A_CustomMissile explicitly implements this case:
It makes a crucial difference whether P_SpawnMissileZ is used or the actual z-position is temporarily changed.
Reverted this function to the position changing method of the original.
2016-03-20 02:08:05 +01:00
Christoph Oelckers a4f5846c7c - replaced all uses of P_ThrustMobj with the already implemented AActor::Thrust method and deleted this function.
- for quakes, making a distinction between circular and elliptic thrust is pointless, so the checks were removed and both paths consolidated. The elliptic code will do exactly the same for circles and there isn't even a performance difference.
2016-03-20 01:25:47 +01:00
Christoph Oelckers a43dccaa86 Merge branch 'master' into floatcvt
# Conflicts:
#	src/g_hexen/a_heresiarch.cpp
#	src/g_shared/a_quake.cpp
2016-03-20 00:56:09 +01:00
Christoph Oelckers 51b05d331d - replaced AActor::vel and player_t::Vel with a floating point version.
- Converted P_MovePlayer and all associated variables to floating point because this wasn't working well with a mixture between float and fixed.

Like the angle commit this has just been patched up to compile, the bulk of work is yet to be done.
2016-03-20 00:54:18 +01:00
Christoph Oelckers 0ef9ee23b1 - fixed: When the intensity values of DEarthquake were converted to fixed point, its uses in DEarthquake::Tick were not changed along. 2016-03-19 12:01:10 +01:00
Christoph Oelckers 2adf8d524c - fixed: A_SpawnFizzle used the 'speed' property incorrectly.
This is now a fixed point value, even for monsters, so using it as a modulus on a random value cannot possibly work.
2016-03-19 09:36:20 +01:00
Randy Heit aaae9f2e05 Store known but uncompiled nodes in the symbol table
- Don't bother keeping track of uncompiled nodes in a special table. Use
  the regular symbol table instead. This should in the future make
  compiling nodes referenced deeper than (and before) their definitions
  fairly straightforward.
- Also, break up the compiler's Message() function into Warn() and Error()
  and get rid of zcc_errors.h. I can't really see having a set of error
  numbers being useful.
2016-03-18 19:34:32 -05:00
Christoph Oelckers 51a98d0e5d - cleaned up the mugshot code's angle checks (I hope these are correct because the old code was so confusing...) 2016-03-18 10:08:18 +01:00
Christoph Oelckers f332a098cd - reworked calls to P_SpawnPlayerMissile, P_AimLineAttack and P_LineAttack to use floating point angles. 2016-03-18 00:43:05 +01:00
Christoph Oelckers 39de225fa7 - restored old FaceMovementDirection. 2016-03-17 00:46:12 +01:00
Christoph Oelckers aa09cbdada - renamed some functions and fixed a few more conversion errors. 2016-03-17 00:07:37 +01:00
Christoph Oelckers ec3be2531a Merge branch 'master' into float
# Conflicts:
#	src/g_hexen/a_fighterplayer.cpp
2016-03-16 22:45:55 +01:00
Christoph Oelckers 9b134a78e3 - fixed: The TEXTURES parser wanted a redundant comma after parsing a color. 2016-03-16 22:42:41 +01:00
Christoph Oelckers 9b1442915f - fixed: AdjustPlayerAngle should not use the angle that gets passed in the attack target struct. This is the actual angle of the attack but this function needs to adjust to the actual direction between player and victim. 2016-03-16 22:38:08 +01:00
Christoph Oelckers b140d71c49 - several fixes. 2016-03-16 22:29:35 +01:00
alexey.lysiuk b20956e207 Made FMOD Ex stream buffer size customizable
Use snd_streambuffersize to set size of stream buffer in KB, default is 64
See http://forum.zdoom.org/viewtopic.php?t=51230
2016-03-16 22:15:13 +02:00
Christoph Oelckers 29a7fe33f3 - fixed some minor issues found during reviewing the code. 2016-03-16 14:10:13 +01:00
Christoph Oelckers 671291227e - first stage of converting actor angles to float complete
Patched up everything so that it compiles without errors again. This only addresses code related to some compile error. A large portion of the angle code still uses angle_t and converts back and forth.
2016-03-16 12:41:26 +01:00
alexey.lysiuk 91ad7f5f2e Fixed broken Strife conversations
Check for in-combat flag was inverted
See http://forum.zdoom.org/viewtopic.php?t=51224
2016-03-16 12:37:41 +02:00
Christoph Oelckers c64eee5b15 Merge branch 'master' into float
# Conflicts:
#	src/g_heretic/a_hereticweaps.cpp
#	src/p_map.cpp
#	src/p_mobj.cpp
#	src/p_things.cpp
#	src/portal.cpp
2016-03-15 00:16:13 +01:00
Blue-Shadow a07f264782 Added a NULL check for activator in Warp(). 2016-03-14 20:52:44 +03:00
Christoph Oelckers d07bf08e56 - fixed: 3D floor ceiling calculation didn't take into account that an actor's top may just be slightly inside a 3D floor and returned the next highest one instead.
For floors this change is deliberately not done because it might cause problems with the movement code.
2016-03-14 16:38:17 +01:00
alexey.lysiuk 801ac9128a Replaced comparisons with assignments in 3D floor tracing
No more 'equality comparison result unused' warnings
2016-03-14 01:25:57 +01:00
alexey.lysiuk 6c94c49d6f Removed extra Printf() conversion specification
No more 'more % conversions than data arguments' warning
2016-03-14 01:25:56 +01:00
Christoph Oelckers df63dd288a - fixed: Visual-only portals could initiate a teleport. 2016-03-13 21:55:47 +01:00
Christoph Oelckers 448e66f19b - fixed: P_PointInSectorBuggy must handle the single-subsector special case. 2016-03-13 16:57:02 +01:00
Christoph Oelckers 51ab60178a - added portal overlays to automap. 2016-03-13 12:33:58 +01:00
Braden Obrzut 93be5aca05 - Fixed: Modern versions of GCC on PowerPC inserted padding to the end of pragma packed structures.
- Worked aorund modern GCC bug where C++ exceptions in Objective-C++ code would result in an ICE (bug is already on their tracker, but I doubt it will be fixed unless I decide to dig into the issue myself).
- Turn off fused floating point instructions since these can cause slight deviations in floating point code.
- Use -static-libgcc when compiling on the Mac with GCC since we need to use a custom version of GCC to do so now.
- Note: ZDoom will currently still crash on exit on PowerPC since it seems to be deciding that NameManager needs to be destructed before the console commands.
2016-03-13 01:14:08 -05:00
Christoph Oelckers 0040b272ed - fixed portal counting.
This was creating a large number of unused portal groups.
2016-03-13 02:54:55 +01:00
Christoph Oelckers b73d6e42af - fixed: FMultiBlockLinesIterator must reset the current sector when doing the final up and downwards check from the start position. 2016-03-13 02:31:47 +01:00
Randy Heit 8a03b99b9c Use ScriptMessage to warn about missing patches in a TEXTURES texture 2016-03-12 19:23:49 -06:00
Randy Heit 4a295dfa3d Accept constant definitions in structs.
- We already need to handle them for enums, so there's really nothing to
  be gained by not accepting constant definitions directly.
2016-03-12 19:11:34 -06:00
Christoph Oelckers 8c027aef8b - added NULL pointer check to portal rotation calculation function. 2016-03-12 22:38:46 +01:00
Christoph Oelckers 0a92138edf - fixed: The portal link table was not created when there were no sector portals.
- fixed: P_TryMove could loop endlessly over a list of static portals when there was an error during portal creation.

# Conflicts:
#	src/gl/models/gl_models.cpp
#	src/gl/scene/gl_sprite.cpp
2016-03-12 20:36:38 +01:00
Christoph Oelckers 651817fad7 - made AActor::velx/y/z and player_t::velx/y fixedvec's.
(This commit is 95% search & replace with only a few places where velz was used as a local variable changed.)
2016-03-12 14:11:43 +01:00
Christoph Oelckers 4116719a5a - fixed: P_CheckSplash shifted the fixed_t distance another 16 bits to the left. 2016-03-12 12:34:43 +01:00
alexey.lysiuk c7c2beee2c Fixed A_Blast parameter type and default values
Default values for strength and speed parameter are fixed type, not integers
Also strength parameter needs to have floating point type
2016-03-12 13:11:46 +02:00
Christoph Oelckers 161d03231a - added custom math routines for reliability. 2016-03-11 15:45:47 +01:00
Christoph Oelckers 7edd5e2dac renamed 'exp' in xlat_parser.y to 'expr' because this gets in the way of searching for calls of the exp(x) function. 2016-03-11 13:43:17 +01:00
Christoph Oelckers 9843f16cc0 - some rework of vectors.h, mostly to remove all those silenced double->float conversions. 2016-03-10 22:36:28 +01:00
Christoph Oelckers f8ebfb541e - use typedefs for TVector<double> etc.
(Better have this out of the way before messing around with this stuff...)
2016-03-10 20:45:45 +01:00
Randy Heit 2e588c2099 Add missing SEMICOLON to declarator_no_fun 2016-03-10 10:33:19 -06:00
Christoph Oelckers 3d367d585d - did some profiling which revealed that P_PointInSector was called needlessly often. Did some optimization to the MultiBlock iterators to avoid this problem. 2016-03-10 14:22:18 +01:00
alexey.lysiuk 3063312f7f Fixed resurrection distance check
See http://forum.zdoom.org/viewtopic.php?t=51177
2016-03-10 10:25:44 +02:00
Christoph Oelckers a605913f42 - fixed: When passing through a teleporter or portal that alters the angle, it is not sufficient that P_XYMovement adjusts the position in case a second P_TryMove call is needed, it must also change the precalculated movement vector. 2016-03-09 12:49:49 +01:00
Christoph Oelckers 40ceb0fef6 - fixed: NextHighestCeilingAt and NextLowestFloorAt need to check if a 3D floor is outside the sector's boundaries before reporting it as the best match. 2016-03-09 12:00:07 +01:00
Christoph Oelckers b3f7a57518 - yet another case of adding a workaround to preserve a side effect in Doom's original movement code that's bound to be inadvertently exploited:
When a spechit results in teleportation, P_TryMove never accounted for that, so that subsequent spechits either failed or succeeded, depending on where the teleport ends up.
With portal-aware positions stored within the spechit this no longer worked, so some handling is needed to revert to the original behavior in case there's no portals to consider.

The ideal solution would have been to stop checking spechits (or to block further teleports) once this happens but the likelihood of some old maps depending on this is high.
2016-03-09 11:44:01 +01:00
Randy Heit 03118d441f Don't use _FPU_GETCW if it won't do what we want
- _FPU_GETCW is defined for more than just x87. Don't use it if the
  control word for the target architecture doesn't support _FPU_EXTENDED
  or _FPU_DOUBLE defined, e.g. pretty much anything but x87. If I had been
  using glibc on PowerPC instead of Apple's libc, I probably would have
  noticed this sooner, since _FPU_GETCW is part of glibc.
2016-03-08 22:00:16 -06:00
Randy Heit 76489e7638 More gracefully handle travelling to a map without matching player starts
- First, don't crash when travelling to a map in a hub that doesn't have
  any player starts that match the position given to Teleport_NewMap (or
  equivalent).
- Seconed, move the player to the location they were at when the left the
  level. At least that way, they shouldn't be in random geometry or off
  the map entirely.
2016-03-08 21:51:12 -06:00
Randy Heit 174e00afe7 Add NULL mthing check to P_SpawnPlayer 2016-03-08 21:42:24 -06:00
Randy Heit 48b6b6e057 Clip portals to viewheight, not screen height
- Aside, but is this even neccessary? The arrays being copied from should
  already be clipped properly.
2016-03-08 19:53:37 -06:00
Christoph Oelckers 015cbb1061 - revert accidentally committed debug code. 2016-03-08 21:29:13 +01:00
Christoph Oelckers 0a1e22aa7a - fixed: FPathTraverse::init kills the intercepts array so PortalRelocate needs to store the line before calling that function. 2016-03-08 18:45:52 +01:00
Christoph Oelckers 42521ffd6f - fixed some mixed up variables in a few blockmap iterators. 2016-03-08 18:34:58 +01:00
alexey.lysiuk 209b495e10 Fixed potential crash in DeHackEd loading
The patch content was destructed and then accessed when loading DeHackEd file of old/unsupported version
Do not print the whole patch content to console but only a filename
2016-03-08 16:28:11 +02:00
Christoph Oelckers 899389e6a4 - link actors into blockmap through linked line portals.
Links through sector portals are not done because nearly all the checks can be performed without doing this so if it works without there's no need to add more processing time.
Will have to see if there's cases left where such a link is needed and if so, whether there's better options to do it.

For line portals such links are necessary to have proper collision detection with actors that are currently transitioning the portal.
2016-03-08 14:41:37 +01:00
Christoph Oelckers 9d877f75e3 - second part of last commit. This file was accidentally unselected. 2016-03-08 14:35:36 +01:00
Christoph Oelckers 1815b076ee - don't show the IWAD picker upon restart. This doesn't work with fullscreen mode. Instead just pick the first IWAD from the list until a better solution can be implemented.
- handle a 'restart' CCMD a bit more controlled. Instead of throwing an exception in the CCMD handler it now just flags D_DoomLoop to return.

If the exception is thrown within the CCMD this can easily happen deep inside the renderer when it calls NetUpdate. But since the software renderer with its use of global variables is not equipped to be yanked out of lile this it could leave broken data behind that caused glitches or even crashes on subsequently played maps.
2016-03-08 13:07:21 +01:00
Christoph Oelckers e11a0986ce - encountered a strange crash that after changing a map, InSubsector was not NULL and pointing to invalid data. So let's better NULL this variable explicitly each time a render loop is started. 2016-03-08 12:27:01 +01:00
Christoph Oelckers 4ebdcb7b6d - fixed: The result condition of a hitscan subtrace was never checked. 2016-03-08 11:55:40 +01:00
Christoph Oelckers f852ead99a - fixed: The initial check for ceiling and floor portals must be done when the trace's start position and its sector has been calculated. SightCheck::init is too early for that. 2016-03-08 10:44:03 +01:00
Christoph Oelckers f35d966799 - don't allow any ceiling portal that has a lower position than a floor portal in the same sector. The will inevitably lead to problematic situations. 2016-03-08 10:09:02 +01:00
Christoph Oelckers 50d2145ba0 - fixed typo in portal init code. 2016-03-08 09:41:54 +01:00
Christoph Oelckers 2cd74118f6 - fixed sight checking through portals.
Notes:
 * It is actually not enough to disable the early-out condition for the current block if there's a portal. It must be disabled for the entire rest of the trace because otherwise the collected lines never get processed.
 * The block bounds check cannot be done globally with portals in the game. The actual trace can easily end up outside the blockmap bounds if portal offsets are factored into the distance between the two actors.
2016-03-08 01:26:13 +01:00
Christoph Oelckers bd29f0994f - restored accidentally deleted line. 2016-03-07 23:41:16 +01:00
Christoph Oelckers cc2885c2de - fixed int/fixed_t mixup with P_RadiusAttack's 'bombdistance' parameter. (Why is this thing even an int...?) 2016-03-07 22:05:19 +01:00
Christoph Oelckers 3c25b2c066 - some redesign of P_CheckSight to handle portals.
Portal stuff not tested yet.
2016-03-07 21:59:32 +01:00
Randy Heit f82c217047 Fixed: In multiplayer, players could spawn at voodoo doll starts
- This could happen in co-op games that did not have enough player starts
  for all the players spawning. Voodoo doll starts were not excluded from
  the set of possible starts as they should have been.
2016-03-07 10:58:16 -06:00
Randy Heit e277fbe81d Fixed some incorrectness with some Hexen crushing specials
- The following Hexen specials all stop 8 units above the floor:
  * Ceiling_CrushRaiseAndStay
  * Ceiling_CrushAndRaise
  * Ceiling_LowerAndCrush
  We only and Ceiling_LowerAndCrush correct. Clearly, I should have paid
  more attention when the Hexen source was released for the parts that I
  had already reverse engineered.
2016-03-07 10:24:30 -06:00
Randy Heit 8b9a0da5ef That was hard to read 2016-03-07 09:58:52 -06:00
MajorCooke af50a79e55 - Fixed: ScaleY was not defaulting to ScaleX when specified as 0, which is how the behavior originally was in 2.8. This behavior can now be toggled with a new boolean, 'usezero'. 2016-03-07 09:02:34 -06:00
Christoph Oelckers fe4bc31d59 - fixed some bad offset calculations. 2016-03-07 11:36:51 +01:00
Randy Heit 72edd7d455 Fixed: GetVarAddrType() bounds check was inverted 2016-03-06 22:17:30 -06:00
Christoph Oelckers 13a7507c4d - should have saved that... 2016-03-07 01:48:13 +01:00
Christoph Oelckers 8f71906fc3 - added portal support to P_RadiusAttack.
This currently only works for linked portals. For other types some major refactoring may be necessary because it not only requires multiple passes of P_RadiusAttack but also an alteration of how sight checks work.
2016-03-07 01:02:48 +01:00
Christoph Oelckers 7d7112f427 - added portal support to A_ThrustImpale, P_PushUp and P_PushDown. 2016-03-07 00:17:52 +01:00
Christoph Oelckers 5175d56129 - made adjustments to P_LineAttack and P_RailAttack to deal with altered angles by passing through a non-parallel portal.
- fixed: P_FindFloorCeiling set the floorsector for a new ceilingheight.

Note: P_DrawRailTrail still needs to be changed, at the moment rail trails through portals will not work correctly.
2016-03-06 21:58:36 +01:00
Christoph Oelckers 90553bb61c - deal with portals in P_AimCamera.
This will most likely need some more testing and refining but at least it should work through line portals now.
2016-03-06 13:10:42 +01:00
Christoph Oelckers a0b2915b8f - added a heightsec change when aborting the main trace due to having found a target in a subtrace.
- be a bit smarter about what to copy from a subtrace. There's 3 distinct pieces of information here: The hit itself, the CrossedWater setting for Boom-transfers and the CrossedWater setting for 3D floors.

Note: Ideally this should return all water hits it can detect, not just the first one.
2016-03-06 02:07:04 +01:00
Christoph Oelckers 74592334e4 - fixed return conditions of Trace() so that it always returns something valid. Due to the portal related changes the default initialization for TRACE_HitNone must be inside TraceTraverse. 2016-03-06 01:41:52 +01:00
Christoph Oelckers ae4cc9669b - added line portal support to Trace(). 2016-03-06 01:04:19 +01:00
Christoph Oelckers 983e8bc6a5 - explicitly check NAME_Null in P_FindTerrain so that it cannot get rendered inoperable by mods which hijack this name. This name must be reserved so that there is some means to disable a sector's terrain. 2016-03-05 22:39:53 +01:00
Christoph Oelckers 97577dc2d7 - added sector portal support to Trace()
Note that at the moment only the function itself has been changed, the calling parts still need to be redone.
2016-03-05 21:44:31 +01:00
Christoph Oelckers c455c60480 - fixed: calculating open.range requires signed math.
- fixed: FMultiBlockLinesIterator initialized continueup twice but forgot continuedown.
- fixed: One of the debug messages in P_AimLineAttack was missing an if (aimdebug).
2016-03-05 01:23:27 +01:00
Christoph Oelckers b9c72e372b - fixed bad loop handling in FWeaponSlots::SetFromGameInfo(). 2016-03-04 16:25:23 +01:00
Christoph Oelckers d1f17e0b46 - fixed: The checks in P_IsThingSpecial was broken. 2016-03-04 16:23:40 +01:00
Christoph Oelckers e290bc6fd0 - fixed: In Hexen, ThrustThing can not be triggered from the backside of a line.
This gets only activated when the HEXENHACK flag is set. For ZDoom maps there is a specific line flag to handle this condition explicitly.
2016-03-04 15:24:13 +01:00
Christoph Oelckers caf2ca0df7 - fixed: CallStateChain must never allow a jumping function to set the chain's overall result to successful. 2016-03-04 15:11:20 +01:00
Christoph Oelckers b427f27e3b - fixed: line portal rotations were not set for all types. 2016-03-04 14:09:26 +01:00
alexey.lysiuk 9b23b41021 Added detection for broken WAD files
Do not try to allocate nonsensical amount of memory and bail out when broken WAD is detected
See http://forum.drdteam.org/viewtopic.php?t=6844
2016-03-04 11:32:15 +01:00
Randy Heit e4a74f4bbe Fix memory leak from ZCC_OpInfo operator prototypes 2016-03-03 20:26:41 -06:00
Randy Heit 964ff46063 Add new state options to parser and actually enable them
- Added new state options that DECORATE got to the lemon parser.
- Enable token generation for state options. They were previously not
  generated, so the grammar treated them as function calls instead.
2016-03-03 18:33:07 -06:00
Randy Heit 078d37e073 Pretty sure this was a typo 2016-03-03 18:33:07 -06:00
Christoph Oelckers 0c37a90e32 - moved the initial 3D floor check from Trace to TraceTraverse, because that's where it will be needed for handling portals. 2016-03-04 01:13:17 +01:00
Christoph Oelckers 9f805daa73 - added missing handling of ALF_PORTALRESTRICT flag. 2016-03-04 01:13:16 +01:00
Christoph Oelckers 81b634a798 - preparation for making Trace portal aware: Added a new flag Trace_PortalRestrict, so that I could disable portals without static offset for P_LinePickActor and A_CheckLOF, because both depend on the target info being retainable which requires a static offset. 2016-03-04 01:13:16 +01:00
Randy Heit 3c2ed52442 Fix 21:9 base width and height values 2016-03-03 18:00:06 -06:00
Randy Heit 16d8af6b77 Add some 21:9 resolutions 2016-03-03 17:59:55 -06:00
Randy Heit 79f0714341 Update ratios[] tables for SDL and Cocoa 2016-03-03 17:32:30 -06:00
Michael Labbe a28c8091fc UI support for 21:9
- Can specify aspect ratio 21:9 in video menu
 - menu_screenratios cvar can now force 21:9
2016-03-03 17:31:12 -06:00
Michael Labbe a4705c8404 vid_listmodes crash fix 2016-03-03 17:31:12 -06:00
Michael Labbe 3ac4968218 Slightly improve 21:9 ar 2016-03-03 17:31:12 -06:00
Michael Labbe afb1d438c2 21:9 fix for black bars overlapping fullscreen images 2016-03-03 17:31:12 -06:00
Michael Labbe 73c7e51391 fix: 21:9 AR stretching in intermission, end level screens 2016-03-03 17:31:12 -06:00
Michael Labbe 97821a3036 21:9 aspect ratio support
- vid_aspect 6 forces 21:9
2016-03-03 17:31:12 -06:00
Randy Heit e3d35f4fe8 PClassPointer should use its own type as the metatype in the type table
- I don't remember why I thought using PPointer as the metatype for
  PClassPointer would be preferable, but it means that PPointer's MatchID
  can potentially be called for PClassPointer entries.
2016-03-03 17:31:01 -06:00
Randy Heit 6d68f69674 Use lambdas for more concise code 2016-03-03 13:27:52 -06:00
Christoph Oelckers 2587e82a67 . removed some redundant computation of a trace's hit position. 2016-03-03 16:15:42 +01:00
Christoph Oelckers b8abafb486 - disabled all the debug messages in P_AimLineAttack but left them in with a CVAR check so that the debug output can be reenabled, should some problem require it in the future. 2016-03-03 13:31:21 +01:00
Christoph Oelckers ec258c9588 - redid P_ClipLineToPortal with revised visibility rules:
* any line completely parallel to the portal is rejected
 * any line with one end on the same straight line than the portal is solely decided by the other vertex.
 * any line with both ends behind the portal cannot be visible inside, so there's no need to check for an intersection with the view range.
 * due to the above P_IntersectLines could be removed as it was redundant.
 * for any line that does intersect with the portal straight, do a reverse check: If both ends of the portal lie on the other side of the line than the viewpoint, the line is between viewpoint and portal and needs to be rejected.

This fixes nearly all the phantom wall glitches in the demo map.
2016-03-03 13:07:11 +01:00
Christoph Oelckers 14a0567343 - optimized the portal translation functions by precalculating the rotation angle, sine and cosine. 2016-03-03 11:58:04 +01:00
Christoph Oelckers ede07f93b2 - fixed: Failure to open bots.cfg would throw an exception that prevented the level from starting. Catch it in FCajunMaster::LoadBots instead and handle it non-disruptively. 2016-03-03 11:11:25 +01:00
Christoph Oelckers 74c326e9b2 - fixed: An option value with an invalid value type would eat all key events when being selected. 2016-03-03 10:52:56 +01:00
Christoph Oelckers 4d2b9fbe1b - don't freeze if the menu item search can't find anything selectable. 2016-03-03 10:47:11 +01:00
Christoph Oelckers d8c009bb41 - fixed: A_Blast read the blast radius as an int, but used it as fixed_t. Also changed the definition of this parameter to float. 2016-03-03 10:23:04 +01:00
MaxED 81a5273b58 Added "Miscellaneous Options" -> "Save/Load confirmation" option (defaults to true). When disabled, confirmation dialog won't be shown when performing quicksave/quickload. 2016-03-03 09:59:26 +01:00
MajorCooke 59ad6206de Added CBF_NOACTORS to A_CheckBlock.
- Self explanatory, doesn't count actors as blocking them.
2016-03-02 20:35:54 -06:00
MajorCooke 7f672039bf Cleanup. 2016-03-03 02:58:44 +01:00
MajorCooke fb3769a730 Added offsetforward to A_CheckLOF.
- offsetforward is to A_SpawnItemEx's x offset property, just like offsetwidth is to y offset.
2016-03-03 02:58:43 +01:00
Christoph Oelckers 90cad80422 - fixed some issues with FPathTraverse:
* when starting directly on a blockline the trace was offset by one map unit. Do this only for the internal block trace calculations but not for the variable that's being exposed to the outside because in rare situations that can create incorrect values.
 * using startfrac could lead to an actor whose inside was right at that positon to be missed.
 * when using startfrac the adjusted trace start was not used for all calculations, which could cause the trace to fail.

With these issues fixed, P_AimLineAttack can now successfully navigate line portals.
2016-03-03 02:50:48 +01:00
Christoph Oelckers 6b1485a89f - refactored those unwieldy intercept position calculations into a subfunction. 2016-03-03 02:50:47 +01:00
Christoph Oelckers 4b23a1c0c7 - added handling for line portals to P_AimLineAttack. 2016-03-03 02:50:45 +01:00
Christoph Oelckers 63d838c0a7 - fixed: P_CollectConnectedGroups could crash when being called before P_FinalizePortals.
- fixed: Entering a sector portal did not properly set up the starting sector of the cloned trace.
2016-03-03 02:50:44 +01:00
Christoph Oelckers f5fd0df077 - made P_AimLineAttack work through sector portals.
Note: Test output not removed yet!
2016-03-02 20:44:02 +01:00
Randy Heit c160121f45 Add float casts to DECORATE for the sake of completeness 2016-03-01 11:36:15 -06:00
Randy Heit 55142078d8 Normalize line endings 2016-03-01 09:47:10 -06:00
Christoph Oelckers b4a002a07f - preparations for allowing hitscans through portals.
To allow processing the hit through an arbitrary portal without reference to the portal group table, P_AimLineAttack and P_LineAttack need to pass some more info than just the linetarget.
We need the relative positions of shooter and target within the visual reference of the other to calculate proper angles and we need to know if such a portal was crossed at all, because a few things, e.g. seeker missiles won't work with them.

- fixed setup of target acquisition for the Mage Staff.

The pre-acquired seeker target was never passed to the spawned projectiles.
2016-03-01 16:39:31 +01:00
Randy Heit a16f92c508 Convert "lump" names from directories to lowercase
- Zip and 7z already do this. Directories should too.
2016-03-01 08:49:43 -06:00
Christoph Oelckers 44a6cafd4b - we are using C++11 now, so all those old VC 2005 project files are of no use anymore. 2016-03-01 09:38:49 +01:00
Randy Heit 7c9fd12fc0 Don't generate code to call DECORATE cast functions
- All the cast functions do is return their parameter, so skip the
  function call and use the parameter directly.
2016-02-29 22:26:05 -06:00
Randy Heit 92f74634d6 Remove FxParameter and use a single function instead 2016-02-29 22:08:06 -06:00
Randy Heit fb8d8dc775 Remove "state" from "Invalid state parameter" error message
- It's confusing to see this from inside an anonymous function. Actually,
  maybe it should be reworded altogether?
2016-02-29 21:44:12 -06:00
Randy Heit cb1d9597f2 Allow `if {} else if {}` with DECORATE
This is as opposed to `if {} else { if {} }`, which is what was required
previously to express the same construct.
2016-02-29 21:40:10 -06:00
Randy Heit f23c0121c5 Use new type system with DECORATE 2016-02-29 21:11:59 -06:00
Christoph Oelckers 15b6c11748 - did some cleanup on FPathTraverse::PortalRelocate. 2016-03-01 02:06:31 +01:00
Christoph Oelckers 5e7ecb3c44 - hm. I thouggr thia has been saved before committing. 2016-03-01 01:53:09 +01:00
Christoph Oelckers 2584108200 - removed the one-sided line portals on polyobjects only limitation. Using Eternity's polyportal testmap shows that it expects one-sided crossable portals on non-polyobject walls.
- converted the P_TranslatePortal* functions to use floating point trigonometry. The combination of R_PointToAngle and finesine even created discrepancies with perfectly parallel portals which is just not acceptable.
- added a function to FPathTraverse to relocate the trace and restart from the new position.
- made P_UseLines portal aware. Traversal through line portals is complete (all types, even teleporters), whether sector portals need better treatment remains to be seen - at the moment it only checks the range at the player's vertical center.
2016-03-01 01:36:36 +01:00
Christoph Oelckers 0c7aea88db - made particles portal-aware. 2016-02-29 16:40:28 +01:00
Christoph Oelckers 07771bd56e - changed parameter of P_GetOffsetPosition to a simple coordinate so that it can be used for other things than actors. 2016-02-29 16:29:51 +01:00
Christoph Oelckers 38c1b8588c - made spawning of teleport fog portal aware. 2016-02-29 16:21:05 +01:00
alexey.lysiuk 2b74ee1eef Fixed assertion failure caused by a missing class to spawn
This fixes debugging troubles with states that have action functions like A_SpawnItem("MissingClass")
2016-02-29 12:54:30 +01:00
Christoph Oelckers 2321c9973f - fixed some serious efficiency problems with clipping masked geometry against portals.
The function to do the work scanned the full list of drawsegs to find portals, which with a large amount of masked geometry and/or drawsegs could become extremely slow.
Changed it so that R_DrawMasked collects all portal related drawsegs up front so that the actual clipping code can
 a) scan a far shorter list and
 b) can skip half of the validation.

Also using P_PointOnLinePrecise to shave off a small bit of additional time.
2016-02-29 12:39:03 +01:00
Christoph Oelckers 0cf9cae7f3 - added some #pragma warnings to i_crash.cpp to silence a warning message in Microsoft's headers. 2016-02-29 10:48:51 +01:00
Christoph Oelckers 6c37ab2310 - changed: If the IWAD contains a MENUDEF lump the one in zdoom.pk3 should not print texture warnings.
The reason is that in such a case it is very likely that the IWAD defines its own menu and will most likely not provide all assets for the base definitions. See 'Adventures of Square' for an example.
2016-02-29 10:45:14 +01:00
Christoph Oelckers 7242a0ef94 - fixed: Rendering 2-sided walls with 3D floor light effects had the 'is3dfloor' flag of GetLightLevel inverted. 2016-02-29 10:26:07 +01:00
Christoph Oelckers fadc7de636 - added a sight check to A_Blast for cross-portal effects. 2016-02-29 01:36:39 +01:00
alexey.lysiuk 0822485593 Used ISO Latin 1 encoding for text in startup window on OS X
Attempts to output errors with bad characters encountered during text lumps parsing were failed miserably because of UTF-8 conversion
Example: loading of GZ-Models-r16.pk3 with GZDoom caused 'NSConcreteAttributedString initWithString:: nil value' exception
2016-02-28 23:15:23 +01:00
alexey.lysiuk 243f59d96d Made sure that the last text line is always visible in OS X startup window
These case are handled specifically:
* When waiting for clients or host to join
* When showing a fatal error
2016-02-28 23:15:22 +01:00
alexey.lysiuk 067b421f39 Fixed default width of progress bar in OS X startup window
If window was resized before progress bar appears it will have hardcoded and so incorrect width
2016-02-28 23:15:21 +01:00
alexey.lysiuk 64f80456ad Initialized scroll view with the same rectangle as other controls in OS X startup window 2016-02-28 23:15:20 +01:00
alexey.lysiuk 145b7be0a1 Fixed particular slowdown in OS X startup window
During loading of .pk3 that stores hundred of .wad's significant amount of time were spent on scrolling text to the last line
The same applies to other cases like output of thousands warnings/errors
2016-02-28 23:15:19 +01:00
alexey.lysiuk c687394f72 Added generic way to do periodic updates of OS X startup window
It's used to avoid updating of window (progress bar in particular) too often
Most of time were spent on UI events processing but not on data loading
2016-02-28 23:15:18 +01:00
alexey.lysiuk 0fba6563c7 Disabled fullscreen mode for OS X startup window
There is no use for auxiliary fullscreen window because it behaves really weird
2016-02-28 23:15:17 +01:00
Christoph Oelckers d4f87203bd - added portal awareness to several functions.
* Arch-Vile resurrection
 * Boom point pushers (due to complete lack of z-handling only for line portals.)
 * A_RadiusGive

These also require a more thorough collection of portal groups than simple position checks.
2016-02-28 23:08:32 +01:00
Christoph Oelckers 8be690fbf2 - fixed type truncation warning. 2016-02-28 21:16:16 +01:00
Christoph Oelckers 27ac207f4c - added oortal handlong to P_RecursiveSound. 2016-02-28 18:03:42 +01:00
Christoph Oelckers 4bb0ca5889 - consolidated some nearly identical code repetitions in Hexen's attack functions. 2016-02-28 16:06:48 +01:00
Christoph Oelckers c390b98966 - fixed: Not all paths in A_CStaffCheck did proper checks on the player's health. 2016-02-28 15:14:05 +01:00
Christoph Oelckers 94f37bde30 - Forgot changing two comparisons when cleaning up the if statement in FindRefPoint. 2016-02-28 14:03:57 +01:00
Christoph Oelckers e9fa53c54d - fixed dropoff calculation over portals.
It can easily happen that the lower sector has no lines below the checked area, in which case it would not set the dropoffz correctly. To prevent this, P_LineOpening must, when it checks the opening over a sector portal, actually calculate the dropoff to the lower portal itself by calling sector_t::NextLowestPointAt. It also means that FindRefPoint must calculate a proper reference point when one side of the line to be checked is part of a floor portal.
2016-02-28 13:59:15 +01:00
Christoph Oelckers b0f1e9b8f3 - fixed typo in portal blockmap code. 2016-02-28 12:16:58 +01:00
Christoph Oelckers 9e3bde0913 - fixed: invisible line within a portal could affect floor height checks in P_CheckPosition. 2016-02-28 12:14:37 +01:00
Christoph Oelckers 3272f180cb - added missing damagemod sector property to extradata parser. 2016-02-28 09:32:10 +01:00
Edoardo Prezioso cd85f6768c - Improve Mac GCC errors fix to work only for GCC.
This fixes Clang complaining about unknown command option '-Wno-unused-but-set-variable' when compiling dumb.
Also I got no new warnings on Clang by excluding '-Wno-unused-result'.
2016-02-27 23:49:02 +01:00
Christoph Oelckers a9ca53bc00 - added a check for the destination of a portal to P_CheckPosition. This needs to run a separate BlockLinesIterator that only sets selected fields. 2016-02-27 23:35:13 +01:00
Christoph Oelckers 047070d180 - made arbitrary portals passable.
This includes:

* allow one sided portal linedefs to be crossable when part of a polyobject. Due to the limitations, two-sided linedefs won't work here. For general use this is still not allowed because making them passable would require some crippling fudging.
* delay portal finalization until after polyobjects have been spawned.
* the camera interpolation also needs to handle angle differences.

The code is still not 100% complete - the most important thing that is still missing is proper handling of P_CheckPosition through arbitrary portals.
2016-02-27 18:07:39 +01:00
alexey.lysiuk fcb38a9419 Made index of VM intrinsic functions unsigned
No more 'comparison of integers of different signs: int and unsigned long' warning
2016-02-27 15:14:13 +02:00
alexey.lysiuk d49f4a5d84 Removed redundant comparison
No more 'comparison of unsigned expression >= 0 is always true' warning
2016-02-27 15:05:01 +02:00
alexey.lysiuk 3c044ebd5e Removed usage of register keyword
No more 'register storage class specifier is deprecated' warnings
2016-02-27 15:03:44 +02:00
alexey.lysiuk 9e016bbfc3 Removed useless operations from OS X system code
No more 'expression result unused' warnings
2016-02-27 12:48:26 +02:00
alexey.lysiuk 202aea61e5 Fixed incorrect comparison in OS X console window
No more 'comparison between pointer and integer' error
2016-02-27 12:48:12 +02:00
Braden Obrzut 6baa1b0674 - Compile with -std=c++14 or -std=c++11 on GCC/Clang.
- Fixed initialization crossing goto.
2016-02-27 02:20:34 -05:00
Christoph Oelckers 8d58d63b60 - implemented line portal transition. Not yet tested for arbitrary portals but for static ones it is working - including camera interpolation. 2016-02-27 01:23:43 +01:00
Christoph Oelckers 451cac457b - added NULL pointer check in AActor::ClearInterpolation. 2016-02-26 18:05:58 +01:00
Christoph Oelckers 7da8112f12 - now that C++11 is allowed, these annoying 'narrowing conversion' warnings can finally be fixed... 2016-02-26 18:03:45 +01:00
Christoph Oelckers f7a3314a0a - added an iterator to TArray so that it can be used with range-bases 'for' statements. 2016-02-26 16:20:27 +01:00
Christoph Oelckers 60c2a55ec4 - added P_GetOffsetPosition calls to all needed functions. 2016-02-26 11:52:53 +01:00
Christoph Oelckers d46e109a5b - prevent Visual C++ from making stupid code. 2016-02-26 11:52:52 +01:00
Christoph Oelckers eafd2519b4 - fixed a few incorrect uses of AngleTo function.
- added portal offsetting to all AproxDistance, AngleTo and Vec*To members of AActor.
- optimized displacement retrieval so that the most common case with no offset retrieves a constant null-vector which can be optimized away fully by the compiler.
- early out in P_GetOffsetPosition if there's no portal lines nearby, so that the common case can skip the traverser completely even on maps with line portals.
2016-02-26 11:52:50 +01:00
Randy Heit fd78686679 Add clamp() to DECORATE 2016-02-25 14:31:37 -06:00
Randy Heit 7f57f68ce1 Added GetSpawnHealth() and GetGibHealth() for DECORATE 2016-02-25 10:08:08 -06:00
Randy Heit a862f728b6 Add remaining VM-supported floating point operations to DECORATE
- These are:
  * exp
  * log
  * log10
  * ceil
  * floor
  * acos
  * asin
  * atan
  * tan
  * cosh
  * sinh
  * tanh
2016-02-25 09:41:49 -06:00
Randy Heit 8ee820042f Tablified the DECORATE floating point operations (sqrt,cos,sin) 2016-02-25 09:23:46 -06:00
Christoph Oelckers d8d3889452 - removed PortalGroup == 0 check. This would only be valid if there's only linked portals in the map. 2016-02-25 13:36:27 +01:00
Christoph Oelckers c7bce8b346 - added a special portal blockmap. This only contains all lines which have a crossable line portal assigned. This is to speed up offset calculations because those are quite frequent and would be too inefficient with the full blockmap.
- made some minor changes to FPathTraverse so that the Add*Intercepts methods can be virtually overridden.
- removed the PortalTracer class because in its existing form it was too costly. Replaced with a P_GetOffsetPosition function that does the minimum required work to get to the translated destination and that's better suited for being called from the Vec*Offset methods. Other use cases will require some changes to FPathTraverse anyway, or some wrapping class like the FMultiBlock iterators.
2016-02-25 13:00:23 +01:00
Christoph Oelckers a9db998700 - did some refactoring on FPathTraverse to allow inheriting from that class with different collection functions.
This will be needed to implement an efficient portal checker that doesn't run through the entire blockmap to find the portals.
2016-02-25 09:54:09 +01:00
Christoph Oelckers 208ad14bad - this wasn't saved when I committed the interpolation stuff. 2016-02-25 01:24:09 +01:00
Christoph Oelckers e11da06e69 - some preparations for actor interpolation through wall portals. 2016-02-25 00:41:31 +01:00
Christoph Oelckers 58d3b04590 - fixed some places in p_pillar.cpp where sector plane z's were calculated at (0, 0) which could cause overflows if the actual plane is too far away from the origin.
- renamed sector_t::soundorg in centerspot, changed the type to a fixedvec2 and removed the CenterSpot #define.

Since this thing was used in lots of places that have nothing to do with sound the name made no sense. Having it as a fixed_t array also made it clumsy to use and the CenterSpot #define used a potentially dangerous type cast.
2016-02-24 14:49:59 +01:00
Christoph Oelckers 21c55a090a - fixed: "take armor" cheat should only deplete the armor, not destroy it.
- fixed: Hexen armor cannot be depleted by the common function, it needs an override to achieve that.
2016-02-24 10:50:42 +01:00
alexey.lysiuk 8ba6f6ced5 Fixed crash when spawning decal without texture
See http://forum.zdoom.org/viewtopic.php?t=50977
2016-02-24 10:37:14 +01:00
Christoph Oelckers 51da78ba29 - added a compatibility option to allow multiple exits to be triggered.
This is required by Daedalus's travel tubes which contain a faulty script with some leftover debug code.
2016-02-24 10:35:29 +01:00
Christoph Oelckers b01e0fa06e - removed debug output from portal transition code.
- handle the case where a portal transition crosses more than a single boundary in one move.
2016-02-24 10:08:23 +01:00
Randy Heit 326907f6ab Cleanup parsing of DECORATE intrinsics
- Split specific parsing for each intrinsic out of ParseExpression0 and
  into their own functions.
- Instead of reserving keywords for intrinsics, identify them by name
  within TK_Identifier's handling.
2016-02-23 19:39:29 -06:00
Christoph Oelckers 01bdd8a7da - actor transition through a sector portal is working. 2016-02-24 01:16:07 +01:00
Christoph Oelckers 58839200e5 - fixed some line clipping issues with portals
* Blocking lines above or below the current sector should only block if they actually intersect with the currently checking actor.
 * Sectors above a ceiling portal should not change current floor information and vice versa.
2016-02-24 01:16:06 +01:00
Randy Heit 1f09341d2b Let min/max pre-solve for 2+ constants, even if there are non-constants 2016-02-23 16:37:52 -06:00
Randy Heit 1ffb7ad109 Add min and max to DECORATE 2016-02-23 16:26:00 -06:00
DaMan 78552cc676 Disable UAC virtualization 2016-02-22 17:56:18 -06:00
MajorCooke c3ffeb1e9d A_RadiusGive Missile check fix
- Don't use isMissile(). Check directly for the flag at the moment of calling and not the default. Otherwise, things changing themselves will still be ineligible for non-missile checks.
2016-02-22 11:30:44 -06:00
Christoph Oelckers 49bfe717ce Merge remote-tracking branch 'remotes/origin/portal' 2016-02-22 15:54:07 +01:00
Christoph Oelckers 62f6a5e4bf - fixed: GetFloorCeilingZ used the actor's actual position, not the tmf.x, tmf.y for which information is supposed to be retrieved. 2016-02-22 15:51:19 +01:00
Christoph Oelckers 4b0af5967e - use proper constructor for FMultiBlockLinesIterator in P_CheckPosition. 2016-02-22 15:51:18 +01:00
Christoph Oelckers ed2b107bc9 - fixed: P_LineOpening_XFloors set some floor-related info in the ceiling case so that it never reached the point where it is needed.
- fixed: FMultiBlockLinesIterator/FMultiBlockThingsIterator need to treat radius=-1 as 'use default from actor.'
2016-02-22 15:51:18 +01:00
alexey.lysiuk 89ca14a587 Fixed memory leak caused by return statement parsing 2016-02-22 14:24:34 +02:00
Christoph Oelckers 31cf712db3 - replaced R_PointToAngle2 in blood splatter functions. 2016-02-22 12:33:13 +01:00
Christoph Oelckers 730145d1fc - more transition to FMultiBlock* iterators:
* removed all code for dealing with z-displacing portals in the iterator loops. This would cause too many problems so I decided to scrap any provisions for allowing interactive portals with z-displacement. They will remain restricted to pure teleporter portals.
 * changed spechit to carry a position along with the special line. If something is activated through an interactive portal this is needed to calculate movement.
 * pass the abovementioned position to CheckForPushSpecial.
 * collect touched portal lines in a second array analogous to spechit.
 * use FMultiBlockThingsIterator in P_TestMobjZ.
2016-02-22 12:05:38 +01:00
Christoph Oelckers ca2fc47fa3 - refactoring of PIT_CheckThing. 2016-02-22 12:05:37 +01:00
Christoph Oelckers 98c7fabb89 - untested partial refactoring of P_CheckPosition.
(This is just a safety commit before doing some more extensive behind-the-scenes refactoring.)

Notable changes here:

 * use the same logic for determining whether a 3D floor is 'below' or 'above' the actor as all the other functions.
 * removed the broken code which tried to detect whether an actor was touching a steep slope. Better use P_LineOpening to find the correct planes and store the results.
 * improved detection whether the slopes on both sides of a plane are identical, using the same data as for steep slope detection.
2016-02-22 12:05:37 +01:00
Christoph Oelckers abcc6049b9 - made the z coordinate part of the CheckResults for the MultiBlock iterators and use these for all height checks in the iterator loops. This will later make it easier to support arbitrary portals with height displacements. 2016-02-22 12:05:36 +01:00
Randy Heit 70c663b253 Revert "Add PARAM_STATE_NOT_NULL for the A_Jump* functions"
- This reverts commit cab39973df.
  I was wrong. DoJump never allowed jumping to NULL states.
2016-02-21 19:21:39 -06:00
Randy Heit 19af8a3a82 Change error message for missing return 2016-02-20 23:14:14 -06:00
Randy Heit e7b9e7e955 Rename A_Int/A_Bool/A_State to int/bool/state
- This is an effort to emphasize that these are just type casts. Now they
  look like function-style casts with no action function styling.
  They do no magic joojoo at all. The only reason they exist is because
  the DECORATE parser can only parse return statements that call a
  function, so these satisfy that requirement. i.e. *return int(666);* is
  identical to *return 666;* (if the parser could handle the latter).
2016-02-20 22:05:17 -06:00
Randy Heit cab39973df Add PARAM_STATE_NOT_NULL for the A_Jump* functions
- Now that state jumps are handled by returning a state, we still need a
  way for them to jump to a NULL state. If the parameter processed by this
  macro turns out to be NULL, Actor's 'Null' state will be substituted
  instead, since that's something that can be jumped to.
2016-02-20 21:52:29 -06:00
Randy Heit 5e298173f7 Redo ACTION_RETURN macros so they can be treated like return statements 2016-02-20 21:34:58 -06:00
Randy Heit 81314a6cd6 Revert "- fixed a few occurences where ACTION_RETURN_* eliminated the side effect of its argument when no return value was requested."
This reverts commit 7ede77c1d2.
2016-02-20 21:27:42 -06:00
Christoph Oelckers 26967bd0ee - migrated P_PlayerStartStomp to FMultiThingIterator.
Note: This replaces AActor::intersects with a direct calculation. Although that function could be adjusted it'd mean some redundant distance calculations which are easily avoided.
2016-02-21 00:21:42 +01:00
Christoph Oelckers f8a8d8eed2 - fixed use of wrong position variable in P_TeleportMove's thing iterator. 2016-02-21 00:21:42 +01:00
Christoph Oelckers 58fcd8d742 - implemented the FMultiBlockThingsIterator and converted P_TeleportMove to use it. 2016-02-21 00:21:41 +01:00
m-x-d d2630dee8c Fixed: warp and warp2 texture effects now work for NPo2 textures. 2016-02-20 21:45:09 +01:00
MaxED 1ba526d4de Added #region / #endregion handling (should affect all text lumps, let me know if there are text lumps unaffected by this). 2016-02-20 21:45:08 +01:00
nukeykt 4b0aac9816 Backport OPL2 KSL table fix from MAME v0.150. 2016-02-20 20:08:02 +01:00
John Palomo Jr 92697659be Expose SafeCommand confirmation string to language. 2016-02-20 20:04:30 +01:00
alexey.lysiuk 7b49d9d92c Fixed crash when accessing undefined user variable
Presence of DECORATE user variable was not checked before attempting to read or write its value from ACS
2016-02-20 20:02:32 +01:00
Christoph Oelckers b8f8daf1c1 - fixed:In P_ChangeSector, floorOrCeil==2 means that only 3D midtextures moved. This means that
* no 3D floor movement can take place
 * no portal changes can occur.
2016-02-20 15:52:19 +01:00
Edoardo Prezioso 166687d971 - Added optional 'z' parameter to the 'warp' CCMD.
Now it's possible to warp above 3dfloors.
2016-02-20 13:32:27 +01:00
Christoph Oelckers 7ede77c1d2 - fixed a few occurences where ACTION_RETURN_* eliminated the side effect of its argument when no return value was requested.
This macro should not be used on function calls that actually perform an action aside from calculating the return value!
2016-02-20 13:13:53 +01:00
Edoardo Prezioso d1502b1086 - Simplify expressions inside some else/endif.
We aren't bound to old cmake anymore.
2016-02-20 11:38:30 +01:00
Edoardo Prezioso 3dcc6d0330 [fmod] Improve the checks for fmod 4.44.
- The FMOD 4.44 linux package contains both 32 and 64-bit versions, with the folder name without the '64' suffix for 64-bit.
- Add minor version '61' so that the latest FMOD package (at the time of this commit) can be detected and compiled successfully.
2016-02-20 11:38:29 +01:00
Randy Heit c3432a1ddb Fix CustomInventory never succeeding
- A != should have been ==.
2016-02-19 22:09:35 -06:00
Christoph Oelckers cfbb3bcbb2 - completed work on P_FindFloorCeiling and all functions it calls.
Note: The debug output is left in so that in cases of an error it can still be used.
2016-02-20 02:22:10 +01:00
Christoph Oelckers d876a95152 - set floor and ceiling sector when it comes from a 3D floor.
There's code in p_mobj.cpp which needs this to pick the correct plane.
2016-02-20 02:22:09 +01:00
Christoph Oelckers 6132f6971a - added support for FFCF_NOPORTALS and FFCF_3DRESTRICT to FindNextLowestFloorAt and FindNextHighestCeilingAt
- use these functions in P_GetFloorCeiling instead of duplicating all this code.
- removed some debug CCMDs.
2016-02-20 02:22:09 +01:00
Christoph Oelckers dc37f78566 - fixed: Old portal data must be deleted before loading a new level. 2016-02-20 02:22:09 +01:00
Christoph Oelckers cb0e7c6ca5 - fixed some issues with P_FindFloorCeiling rework. 2016-02-20 02:22:08 +01:00
Randy Heit 4770dc2dfb Fix improper detection of if statements returning 2016-02-19 16:38:30 -06:00
Randy Heit 80d49d6bb9 Fix crash when parsing an empty action list for DECORATE 2016-02-19 16:31:53 -06:00
Christoph Oelckers 28799c4b51 - some logic fixes in FMultiBlockLinesIterator. 2016-02-19 16:13:36 +01:00
Christoph Oelckers 02d7572343 - some header dependency cleanup so that it is no longer needed to include portal.h to get the inline functions. Portal.h has been reduced of most dependencies now so that including it is cheap and can be done in other headers.
- some consolidation in p_map.cpp. PIT_CheckLine and PIT_FindFloorCeiling had quite a bit of redundancy which has been merged.
- čontinued work on FMultiBlockLinesIterator. It's still not completely finished.
2016-02-19 14:08:41 +01:00
Christoph Oelckers 15040c955e Merge branch 'master' into portal 2016-02-19 10:40:07 +01:00
Christoph Oelckers 3841a5f626 - implemented FMultiBlockLinesIterator for checking a position across portals. This is not fully tested yet. 2016-02-19 10:39:40 +01:00
Randy Heit a31bd78abe Fix definitions of A_State/A_Int/A_Bool
- These aren't action functions, so PARAM_ACTION_PROLOGUE is
  inappropriate.
2016-02-19 00:29:19 -06:00
Randy Heit cb0fd5967f Oops. Had FxCastStateToBool backwards. 2016-02-18 22:53:18 -06:00
Randy Heit a399f40e5f Support casting states to booleans
- This is so that you can call an A_Jump-type function from inside an if
  statement and do something other than jump if the jump condition was
  met. e.g.

    {
        if (A_Jump(128, "Foo"))
	{
            A_Log("The function would have jumped");
	}
	else
	{
	    A_Log("The function would not have jumped");
	}
    }
2016-02-18 22:40:04 -06:00
Randy Heit aa58c5f519 Declare VMFunction::Proto to the garbage collector 2016-02-18 22:26:37 -06:00
Randy Heit eace79ccad Add some functions for use with DECORATE return
- Since DECORATE's return statement can only return the results of
  function calls (I do not want to spend the time necessary to make it
  return arbitrary expressions), here are three functions to get around
  this limitation:
  * A_State - Returns the state passed to it. You can simulate A_Jump
    functions with this.
  * A_Int - Returns the int passed to it.
  * A_Bool - Returns the bool passed to it.
- e.g. If you want to return the number 3, you use this:

    return A_Int(3);

  If you want to jump to a different state, you use this:

    return A_State("SomeState");
2016-02-18 22:15:03 -06:00
Randy Heit fbbaae781b Merge remote-tracking branch 'origin/master' 2016-02-18 22:05:40 -06:00
Randy Heit b1098ede93 Restore "direct" call optimization for DECORATE 2016-02-18 22:05:16 -06:00
Randy Heit ade780d810 Redo ACustomInventory::CallStateChain to check return types 2016-02-18 22:05:10 -06:00
Randy Heit b8a16600ac Braces around ACTION_RETURN used in an if are no longer optional 2016-02-18 21:39:13 -06:00
Randy Heit b2ccd0bd28 Use action function return value to make state jumps happen
- The A_Jump family of action functions now return the state to jump
  to (NULL if no jump is to be taken) instead of jumping directly.
  It is the caller's responsibility to handle the jump. This will
  make it possible to use their results in if statements and
  do something other than jump.
- DECORATE return statements can now return the result of a function
  (but not any random expression--it must be a function call). To
  make a jump happen from inside a multi-action block, you must
  return the value of an A_Jump function. e.g.:
    { return A_Jump(128, "SomeState"); }
- The VMFunction class now contains its prototype instead of storing
  it at a higher level in PFunction. This is so that
  FState::CallAction can easily tell if a function returns a state.
- Removed the FxTailable class because with explicit return
  statements, it's not useful anymore.
2016-02-18 20:39:40 -06:00
Edoardo Prezioso f338e5f1c4 - Apply the fast math flags for non-MSVC, too.
Move the fast flags string creation in the main cmake file and use it where needed.
2016-02-18 23:13:02 +01:00
Christoph Oelckers 884a265d4a - refactored P_FindFloorCeiling to be portal aware and cleaned up its interface.
A big problem with this function was that some flags required setting up some variables before calling it and others did not. It will now set everything up itself so all initializations to AActor::floorz and ceilingz that were made before these calls (which were all identical to begin with) could be removed and the internal initialization logic streamlined.
2016-02-17 21:57:52 +01:00
Christoph Oelckers bd09664d85 Merge branch 'master' into portal 2016-02-17 12:37:11 +01:00
Christoph Oelckers f2125ea420 - this needs a return value... 2016-02-17 12:36:56 +01:00
Christoph Oelckers 022ab95817 Merge branch 'master' into portal 2016-02-17 11:46:24 +01:00
Christoph Oelckers 5a779cc1f4 Merge branch 'master' of https://github.com/rheit/zdoom 2016-02-17 11:43:03 +01:00
Christoph Oelckers 42c6245a50 - restored A_CountdownArg to what it looked like before the scripting branch.
The new version did not work as expected anymore.
2016-02-17 11:42:45 +01:00
Christoph Oelckers 10a3d75556 - reviewed and adjusted ZatPoint calls in p_map.cpp. 2016-02-17 11:39:14 +01:00
Christoph Oelckers 6e4cf9699a Merge branch 'portal' of https://github.com/rheit/zdoom into portal 2016-02-17 02:21:46 +01:00
Christoph Oelckers 0948448988 - some more checking and refactoring of ZatPoint calls.
- removed Plane/Floor/CeilingAtPoint functions because they are overkill for the problem they were meant to solve. Calling ZatPoint with adjusted coordinates created with AActor::PosRelative is just as easy in the few places where this is needed.
- made P_HitWater and P_CheckSplash portal aware.
2016-02-17 02:21:26 +01:00
Christoph Oelckers 5611df1f3e - fixed the portal aware ceiling and floor functions. 2016-02-17 00:31:29 +01:00
Christoph Oelckers fd7e6ae604 - fixed copy&paste error in LowestFloorAt. 2016-02-16 23:11:20 +01:00
Christoph Oelckers 8d53f6176e - fixed conditions for PortalBlocksView. Created a new function PortalBlocksSight that's relevant for playsim-related sight checks. 2016-02-16 22:57:03 +01:00
Christoph Oelckers 93b3982c62 Merge branch 'zmaster' into portal 2016-02-16 22:05:50 +01:00
Christoph Oelckers 6d8879f302 - missing #includes. 2016-02-16 22:04:32 +01:00
Christoph Oelckers ae02b2fcaf - added NextHighestCeiling/NextLowestFloorAt functions. Not tested yet! 2016-02-16 21:00:34 +01:00
Christoph Oelckers 5fd6ccb970 - fixed incorrect #include. 2016-02-16 20:53:52 +01:00
Randy Heit 0f70d10521 Add 'float' and 'state' as possible return types for action functions 2016-02-16 12:09:00 -06:00
Christoph Oelckers 1b88052bba - started refactoring ZatPoint calls which need to be portal aware.
To summarize, anything that just works with map geometry doesn't need to bother, as does the renderer. (i.e. nearly all r_* files, p_floor.cpp, p_ceiling.cpp et.al)
But all calls that are somehow related to actor positions need to be made aware of potential portal transitions:

 * added FloorAtPoint, CeilingAtPoint and PlaneAtPoint methods to sector_t, which can be used to calculate a plane's height with relation to a given actor, even if that actor is on the other side of a portal.
 * added HighestCeilingAt and LowestFloorAt methods which traverse all ceiling/floor portals until they find an impassable plane.
2016-02-16 16:40:53 +01:00
Christoph Oelckers 45108e9bb8 - added two missing files to CMakeLists.txt. 2016-02-16 12:52:45 +01:00
Christoph Oelckers 22e8678903 - refactored P_CollectConnectedGroups to avoid frequent heap allocations for the common cases
* the temporary checking arrays are now static
 * the array that gets the returned values only starts allocating memory when the third touched sector group is found. The most common cases (no touched portal and one touched portal) can be handled without accessing the heap.

- did some streamlining of AActor::LinkToSector:

 * there's only now version of this function that can handle everything
 * moved the FIXMAPTHINGPOS stuff into a separate function.
 * removed LinkToWorldForMapThing and put all special handling this function did into P_PointInSectorBuggy.
2016-02-16 12:51:10 +01:00
Christoph Oelckers b9037ef3ee - added a check to detect self-referencing sectors in the portal setup code because those are problem cases. 2016-02-15 21:49:46 +01:00
Christoph Oelckers f24bf7e622 - separated FCheckPosition and its FPortalGroupTable substructure into its own header because this was creating too many dependencies on other headers with FCheckPosition in p_local.h and FPortalGroupTable in portals.h. 2016-02-15 13:40:31 +01:00
Christoph Oelckers 5664cee2e5 - fixed: The check for leftover portal sectors was not correct. It only checked the sectors the portal thing was in and those were already processed in the first phase.
- improved: If there's an offset mismatch, do not print group numbers as they are utterly meaningless. Instead look for a sector in each group and report those.
- added a copyright notice and some comments to portals.cpp.
2016-02-15 12:35:40 +01:00
Christoph Oelckers afc631b537 - this wasn't saved for last night's commit. 2016-02-15 09:25:48 +01:00
Christoph Oelckers 6adb069506 - rewrote p_local.h so that it doesn't pull in the entire bunch of headers.
This was to resolve some circular dependencies with the portal code.
The most notable changees:

 * FTextureID was moved from textures.h to doomtype.h because it is frequently needed in files that don't want to do anything with actual textures.
 * split off the parts from p_maputl into a separate header.
 * consolidated all blockmap related data into p_blockmap.h
 * split off the polyobject parts into po_man.h
2016-02-15 02:14:34 +01:00
Christoph Oelckers 405db83393 - added a function which collects all portal group an actor would touch if standing in a given position. 2016-02-15 00:53:59 +01:00
Christoph Oelckers 0dce22ce85 - some portal considerations. 2016-02-14 21:02:18 +01:00
Christoph Oelckers 5af53c0e62 - fixed a few more sector movers which calculated their movement at (0,0) instead of inside the sector. 2016-02-14 18:53:00 +01:00
Christoph Oelckers 126c80d597 - create the portal group table. 2016-02-14 18:16:59 +01:00
Christoph Oelckers c338b9cde3 - some more portal preparation . 2016-02-14 16:26:27 +01:00
Christoph Oelckers d5a1004c41 - some preparations for portal stuff:
* set up linked sector portals so that everything that will eventually have to be considered is present, even though the software renderer currently can't handle those adequately.
* tag all skybox things with a type so that they can easily be distinguished at run time.
* fill in the linked portal types in xlat/eternity.txt.
2016-02-14 13:12:03 +01:00
Christoph Oelckers 993a840630 - bring formatting in line with GZDoom's version of this function. 2016-02-14 12:33:47 +01:00
Christoph Oelckers e42dbb5087 Merge branch 'master' of https://github.com/rheit/zdoom
# Conflicts:
#	src/sound/oalsound.cpp
2016-02-13 14:56:03 +01:00
Christoph Oelckers 340faef1ec - fixed a few 64-bit warnings. 2016-02-13 13:37:28 +01:00
alexey.lysiuk ce8b2974a3 Handle inability of OpenAL implementation to return number of available sources
OpenAL specification doesn't require alcGetIntegerv() to return meaningful values for ALC_MONO_SOURCES and ALC_MONO_SOURCES.
At least Apple's OpenAL implementation returns zeroes, although it can generate reasonable number of sources.
2016-02-13 11:11:02 +02:00
Randy Heit 01bed05275 Do not use fast math for the node builder
- The node builder generates data used by the playsim, so should be as
  consistant as we can manage across compilers and architectures.
2016-02-12 16:27:47 -06:00
Christoph Oelckers f7e27032dc - fixed: The default vertical spread for the BFG tracers was set to 32*FRACUNIT instead of 32*ANGLE_1. 2016-02-12 18:55:18 +01:00
Christoph Oelckers b818624f58 - enabled fast math for all known non-playsim files in the CMake project. 2016-02-12 12:51:09 +01:00
Christoph Oelckers e6328c8432 - enable fast floating point math in the subprojects that can benefit from it: dumb, gme and gdtoa. 2016-02-12 02:02:48 +01:00
Christoph Oelckers d25455736a - store floating point parameters for DECORATE properties as doubles. 2016-02-12 01:21:29 +01:00
Christoph Oelckers 73cbc59dd9 - replaced double2fixed function with FLOAT2FIXED macro. 2016-02-11 22:57:26 +01:00
Christoph Oelckers bf03ea496e - fixed: instant sector movement actions must actually delete the created interpolation right away and not wait until it deletes itself. 2016-02-11 22:03:09 +01:00
Christoph Oelckers c5c4ec83c2 - ensure thar PRINTNAME_LEVEL always uses uppercase. 2016-02-11 21:45:34 +01:00
Christoph Oelckers 158caf78a0 - more float to double conversion.
In particular this removes all assignments of FIXED2FLOAT to double variables because they not only lose precision but also generate unnecessary code.
2016-02-11 21:33:30 +01:00
Christoph Oelckers 34255908b0 - fixed: Initialization of spawn IDs from MAPINFO and DECORATE was in the wrong order. (looks like a badly resolved merging conflict) 2016-02-11 20:41:04 +01:00
Christoph Oelckers 584147b8bb - removed all occurences of FVector2 and FVector3 from the playsim code. 2016-02-11 20:01:12 +01:00
Christoph Oelckers 64dabc3c0b Merge branch 'master' of https://github.com/rheit/zdoom 2016-02-11 19:13:48 +01:00
Christoph Oelckers 33cdb4d816 - replaced all single precision floats in p_slopes.cpp with doubles.
I don't think we want to have precision and reliability issues in such a vital part of the engine...
2016-02-11 19:13:29 +01:00
MajorCooke dcfdb50307 - Fixed: checkz wasn't used.
- Use 0 instead of false.
2016-02-10 18:04:59 -06:00
MajorCooke fefdb266cd - Fixed: The coordinates need to be converted to doubles first. Also use length instead of length squared. 2016-02-10 17:48:17 -06:00
MajorCooke e04fe06226 GetDistance Non-Action (Double version)
- Added GetDistance(bool checkz, ptr = aaptr_target).
- Returns the distance of an actor. Must be target, master or tracer.
2016-02-10 17:13:50 -06:00
Christoph Oelckers 646f7a1f90 Merge branch 'ChaseDontTurnScript' of https://github.com/MajorCooke/zdoom 2016-02-10 22:47:41 +01:00
Christoph Oelckers d712686122 - fixed: A_CountdownArg could no longer access the first arg.
The latest bit of refactoring turned a '<0' check into '>0', while it should have been '>=0'.
2016-02-10 21:56:45 +01:00
Christoph Oelckers 7e45c49c2f - fixed: The expression evaluator must ignore the action function symbol for ACS_NamedExecuteWithResult.
This is necessary because otherwise the incompatible action function will take precedence over the special handling for this inside FxFunctionCall.
2016-02-10 21:48:28 +01:00
Christoph Oelckers 4428d073d5 - fixed: code generation for floating point negation was wrong. 2016-02-10 20:08:19 +01:00
Christoph Oelckers 1c0cd16d3f - fixed: AActor::SetState must restore the 'state' member to the actual calling state after it detected OF_StateChanged.
This is needed to decide how the '####' and '----' placeholders should behave.
2016-02-10 18:13:20 +01:00
Christoph Oelckers d18a839836 - to prevent further occurences of ValueType == 0 being misinterpreted, change it to signify unknown value type and ensure that any real type is non-zero. 2016-02-10 17:11:50 +01:00
Christoph Oelckers 85a3cd984d - fixed: ParseParameter should not make any assumptions about the necessity of a type cast between int and float.
With late resolving it cannot be guaranteed at this point and caused some incorrectly compiled code. Since the cast gets optimized away anyway when not needed there's no point being this selective with applying it.
2016-02-10 17:06:33 +01:00
Christoph Oelckers a7254a4af5 - removed the conversion operators from the fixedvec structs (again)
They must have been accidentally left in by not properly resolving a merge conflict, I guess.
2016-02-10 14:43:04 +01:00
Christoph Oelckers d1b2ef5368 - some refactoring of olddecorations.cpp to move some repeated code into a subfunction. 2016-02-10 14:38:08 +01:00
Christoph Oelckers b5029e0976 - call the native A_BossDeath directly instead of going through the VM-enabled action function.
- undo some formatting screwup in a_clericstaff.cpp.
2016-02-10 13:57:21 +01:00
Christoph Oelckers dd55e0a4c4 - cleaned up a_painelemental.cpp.
No need to expose VM stuff this openly here.
2016-02-10 13:34:16 +01:00
Christoph Oelckers e2de258498 - remove debug output. 2016-02-10 12:09:14 +01:00
Christoph Oelckers 3e5d1feecd - fixed: A_CheckProximity could return unmorphed player pawns of currently morphed players. 2016-02-10 11:58:54 +01:00
Christoph Oelckers dde9336235 - silence floating point conversion warnings in oalsound.cpp 2016-02-10 11:29:32 +01:00
Christoph Oelckers 15177c34f9 Merge branch 'master' of https://github.com/rheit/zdoom 2016-02-10 10:05:14 +01:00
Christoph Oelckers bc616dbf06 - fixed: APowerupGiver::PowerupType also needs replacement handling for placeholder classes. 2016-02-10 10:04:52 +01:00
MajorCooke e043a89f15 Forgot to save this with the last commit. 2016-02-09 23:19:28 -06:00
MajorCooke e73a737350 When about to hit a new floor, don't change the direction of the actor if STOPIFBLOCKED is up. 2016-02-09 23:16:15 -06:00
MajorCooke ebe6cef7cc This was a little too far in. 2016-02-09 22:57:54 -06:00
MajorCooke 4fcc9efea0 - Fixed A_Wander calling --movecount too soon.
- Also added NORANDOMTURN flag accountability for A_Wander.
2016-02-09 22:45:59 -06:00
Braden Obrzut 65b70dedaa - Fixed: Heretic powered firemace balls didn't seek their target. 2016-02-09 23:34:14 -05:00
Braden Obrzut f33993dcb5 - Load OpenAL at runtime for all platforms because I can't think of a good reason not to handle them all the same right now. 2016-02-09 22:40:19 -05:00
Christoph Oelckers 3358181f18 - cleaned up the class data organization:
* moved RestrictedToPlayerClass and ForbiddenToPlayerClass arrays to AInventory.
 * moved all copy-from-parent code into DeriveData functions.
2016-02-10 00:46:51 +01:00
Christoph Oelckers 6ce0c9f78e - split up PClass::Derive and its child functions because part of them is also needed when initializing an inherited native class with the properties of its parent - but calling the base version in PClass is not possible.
- moved a few AActor properties out of the EXE so that I could easily test if it works.
2016-02-10 00:17:00 +01:00
Christoph Oelckers b484cbf18a - fixed: It is not guaranteed that the class object that is created by FindClassTentative actually matches the real object that is required later, so it needs to be replaced wherever it could be referenced once the real object is created.
- removed some unneeded code from earlier attempts to fix the class type resolving issue.
2016-02-09 23:08:51 +01:00
Christoph Oelckers ff70cf1ee7 - fixed: Resolving non-constant DECORATE expressions must be delayed until everything has been parsed.
If done as before, forward-declared classes cannot be found, and the immediate resolving is only needed for constant expressions, so explicitly enabling it in the 4 places where it is needed ensures that those unresolvable expressions remain intact until the final processing pass righr before the code generator is started.
2016-02-09 19:02:44 +01:00
Christoph Oelckers 5261acce1d - undid incorrect part of CheckClass fix. 2016-02-09 17:55:43 +01:00
Christoph Oelckers bcfb437302 - fixed message output. 2016-02-09 15:06:55 +01:00
Christoph Oelckers 78ac944242 - allow optional terrain definitions
... because any Doom terrain WAD would otherwise spam the logfile with messages when running an error log batch.
2016-02-09 14:38:42 +01:00
Christoph Oelckers 4d2a52418f - added an errorlog option.
This cuts down on as much message noise as possible, outputs everything to a file specified as a parameter and then quits immediately, allowing this to run from a batch that's supposed to check a larger list of files for errors.
Multiple outputs get appended if the file already exists.
2016-02-09 14:20:49 +01:00
Christoph Oelckers 6c92525fcd - added an option to FindClassTentative to make eventual failure to declare the missing class non-fatal.
Damn those old mods with broken actor references. Thanks to those FxClassTypeCast may not throw fatal errors.
2016-02-09 12:26:00 +01:00
Christoph Oelckers 26b657b637 Merge branch 'master' of https://github.com/rheit/zdoom 2016-02-09 11:51:39 +01:00
Christoph Oelckers 8823b60c0d - fixed: FxClassTypeCast must use FindClassTentative to get the class type.
This function may well be invoked before a class is actually defined, so it needs to create a placeholder to be filled in later.
2016-02-09 11:51:19 +01:00
John Palomo Jr 88f6157984 Fixed: Player color slider size/position was wrong when using language strings. 2016-02-09 02:49:28 -05:00
Randy Heit f0b4962052 Fix: CountInv must return a value if the caller's expecting one 2016-02-08 22:21:42 -06:00
Randy Heit 8d159b8506 Add OF_StateChanged handling to NoDelay 2016-02-08 22:11:42 -06:00
coelckers 1ca2293983 Merge pull request #538 from MajorCooke/CountInv
CountInv(itemtype, ptr_select)
2016-02-08 21:06:30 +01:00
Christoph Oelckers 0a7b17c469 Merge branch 'master' of https://github.com/rheit/zdoom 2016-02-08 21:01:46 +01:00
Christoph Oelckers ceba4b0dae - fixed: old style DECORATE must use exactly the same method to store the damage function as the modern version.
The difference in handling crashed with Daedalus.
2016-02-08 21:01:25 +01:00
MajorCooke 124e0458cf - Fixed: A_CheckProximity could trigger an assert because the flags and ptr were not flagged as optional.
- Fixed: CPXF_ANCESTOR no longer worked for some reason because apparently the IsAncestorOf() functionality has changed. Use IsKindOf instead.
2016-02-08 10:26:18 -06:00
Christoph Oelckers c940c2ba81 - fixed: The counters for the whirlwind were initialized too late, the first time they are needed is in P_CheckMissileSpawn, which gets called from inside P_SpawnMissile. Also took the opportunity and moved them to properties that are accessible from DECORATE. 2016-02-08 13:34:54 +01:00
Christoph Oelckers 43b4d452db Merge branch 'ChaseThresholdScript' of https://github.com/MajorCooke/zdoom
# Conflicts:
#	src/version.h
2016-02-08 13:06:08 +01:00
Christoph Oelckers 6d0ef7a9da - added conversion macros to convert floating point angles to angle_t, using xs_Float.h, and replaced all occurences in the code with them (let's hope I found everything.)
Converting a floating point value that is out of range for a signed integer will result in 0x80000000 with SSE math, which is used exclusively for this purpose on modern Visual C++ compilers, so this cannot be used anywhere.
On ARM there's problems with float to unsigned int conversions.

xs_Float does not depend on these
2016-02-08 12:10:53 +01:00
Randy Heit 7b42093dc9 Revert "- fixed incorrect code generation for '||' operator (at least I hope it's fixed now.)"
This reverts commit 2a89a9f1d8.
2016-02-07 21:59:45 -06:00
Randy Heit ecef5647d4 Merge branch 'scripting' 2016-02-07 21:58:38 -06:00
Randy Heit 138cdccaf9 Fix code generation for && and ||
- The test condition should be the same for both sides of the operators.
2016-02-07 21:56:56 -06:00
Christoph Oelckers 2a89a9f1d8 - fixed incorrect code generation for '||' operator (at least I hope it's fixed now.) 2016-02-07 21:36:02 +01:00
Christoph Oelckers 5b74d417fa Merge branch 'master' of https://github.com/rheit/zdoom 2016-02-07 16:32:11 +01:00
Christoph Oelckers e3bf1dd92b - for ARM compatibility, direct float -> unsigned int conversions should be avoided. 2016-02-07 16:31:55 +01:00
alexey.lysiuk 7fa5cb788b Fixed regression with getting/setting user variables
See http://forum.zdoom.org/viewtopic.php?t=50727
2016-02-07 15:32:55 +02:00
Christoph Oelckers f625be61a2 - fixed: CMake should not disable OpenAL on Windows if it can't find the library (which is neither needed nor requested anymore.) 2016-02-07 13:30:28 +01:00
Christoph Oelckers 111e97e47c Merge branch 'master' of https://github.com/rheit/zdoom 2016-02-07 12:27:29 +01:00
Christoph Oelckers fcb7553166 - fixed offset calculation in A_VileAttack. 2016-02-07 12:27:11 +01:00
coelckers f2f65d7f31 Merge pull request #545 from MajorCooke/facefix
A_Face Fix
2016-02-07 11:49:19 +01:00
Christoph Oelckers 7226a23d08 Merge branch 'master' of https://github.com/rheit/zdoom 2016-02-07 11:36:28 +01:00
Christoph Oelckers 3675492ab4 - fixed DEHACKED code pointer validation for real.
The first fix missed a second place where this happened and was incomplete.
Anything usable by Dehacked must be VARF_ACTION and VARF_MEMBER in order to work as intended.
2016-02-07 11:36:09 +01:00
John Palomo Jr 0619245280 Fixed: ValueText didn't read language strings from OptionValues when using the third parameter. 2016-02-07 03:21:18 -05:00
MajorCooke 10fec95cd5 - Fixed: the last FAF_NODISTFACTOR flag was never removed. 2016-02-07 01:36:59 -06:00
Randy Heit 5ee988f607 Fixed: Applying reverb with FMOD 4.36.yy killed sound
- It turns out that the FMOD_REVERB_PROPERTIES structure actually changed
  with 4.36.00 and not with 4.38.00.
2016-02-06 19:29:13 -06:00
Randy Heit cbfb24ef33 Disable -file ""
- This isn't a real file or even a name, but the game would try and load
  it, including running through various permutations, potentially resulting
  in loading the current directory as an archive.
2016-02-06 17:51:09 -06:00
Christoph Oelckers 20aa7c75de - added the case '0: switch the portal of to P_ChangePortal. 2016-02-07 00:30:27 +01:00
Christoph Oelckers e726143c15 Merge branch 'master' of https://github.com/rheit/zdoom 2016-02-06 21:17:19 +01:00
Christoph Oelckers 77b9f41dff - added Line_SetPortalTarget action special so that portals can be assigned new targets. Setting the target to 0 disables the portal.cpp. Static linked portals can not be reassigned.
Please note that these still require the portal to be set up in the map with Line_SetPortal. It will not create a new portal if none exists on any line with the given ID.
2016-02-06 21:16:57 +01:00
MajorCooke 63735e4118 Turns out this token wasn't needed. 2016-02-06 13:52:08 -06:00
MajorCooke ccf887c978 Fixed wrong type. 2016-02-06 13:49:16 -06:00
coelckers 1480fa7579 Merge pull request #542 from alexey-lysiuk/fix_openal_nonwin
Fixed build with OpenAL on non-Windows systems
2016-02-06 20:11:48 +01:00
Braden Obrzut 1101546e9c - Fixed: Possible CMake wrong number of parameters configuration error. 2016-02-06 13:06:25 -05:00
alexey.lysiuk 46267f52d6 Fixed build with OpenAL on non-Windows systems
We still need to link with OpenAL library on OSes other than Windows
2016-02-06 10:58:25 +02:00
Christoph Oelckers 0ab3051f75 - fixed: Heretic's timebombs were spawned at the wrong place. 2016-02-06 08:52:37 +01:00
Christoph Oelckers 34216ddd8e Merge branch 'master' of https://github.com/rheit/zdoom
# Conflicts:
#	src/CMakeLists.txt
2016-02-06 05:28:53 +01:00
Christoph Oelckers 275ced288b - we no longer link to the OpenAL import library so the respective handling can be removed from CMakeLists.txt. 2016-02-06 05:26:37 +01:00
Randy Heit 47d33c1ef5 Fixed: A_Set(Float)Speed take FIXED speed, not INT 2016-02-05 22:24:12 -06:00
Randy Heit c978aa32b1 Fix FxRandomPick code generation for floats 2016-02-05 22:18:54 -06:00
Randy Heit 48dcbabd60 Emit a message when trying to use something non-integral as a boolean
- It's not exactly optimal, since it silently removes the offending
  expression, but it's better than crashing.
2016-02-05 22:18:54 -06:00
Randy Heit 09a17c2198 Quiet some narrowing conversion warnings from VS2015 2016-02-05 22:18:53 -06:00
Randy Heit 0892650465 Don't add /delayload for OpenAL stuff if OpenAL is disabled
- Also, I believe openal32.dll no longer needs a /delayload flag since
  it's dynamically loaded now.
2016-02-05 22:18:53 -06:00
Christoph Oelckers d50e874d9b Merge branch 'master' of https://github.com/rheit/zdoom 2016-02-06 05:16:53 +01:00
Christoph Oelckers d76bcee393 - added some line portal restrictions:
* linked portals may never have a z-offset so the parameter for that needs to be ignored.
* for interactive portals, handling z-displacements when some distance calculation reaches through a portal is way too extensive and problematic to ever have a chance of really working. If such a portal gets defined it will be changed to a teleport-only portal and a message printed.
2016-02-06 05:16:35 +01:00
Braden Obrzut dce3f0f757 - Bump CMake version requirement to 2.8.7. This means that generator expressions must be supported as well as empty else and endif expressions (like most sane languages). ZDoom probably didn't work with 2.4 anymore anyway. 2016-02-05 21:19:29 -05:00
Randy Heit 4fb65d74fd Fix address NO_SANITIZE macro for Clang
- Oops. In fixing it for GCC (since it doesn't like
  __has_feature(address_sanitizer), I broke it for Clang.
2016-02-05 18:06:45 -06:00
Christoph Oelckers 501af18168 - added missing include. 2016-02-06 01:04:15 +01:00
Christoph Oelckers ed7b7fc0ba - fixed: The backlink portal for EE-style definition needs to be done along with the first portal because the code won't find the anchor line itself. 2016-02-06 00:21:44 +01:00
Christoph Oelckers ee3c41bf7b - fixed: The minimum parameter count for an action function is 3, so the DEHSUPP parser needs to take this into account when validating the code pointers. 2016-02-06 00:19:38 +01:00
Christoph Oelckers 95f3a9909c Merge branch 'master' of https://github.com/rheit/zdoom 2016-02-05 23:51:50 +01:00
Christoph Oelckers e88901f4b7 - added the EE-Extradata parser I wrote for GZDoom so I can use the Vaporware demo map for testing portal stuff. 2016-02-05 23:51:28 +01:00
Randy Heit cb6504669d Add return statements for DECORATE. 2016-02-05 16:34:51 -06:00
Christoph Oelckers 1201ad0366 Merge branch 'master' of https://github.com/rheit/zdoom 2016-02-05 23:16:06 +01:00
Christoph Oelckers 94b7ef72ca - more cleanup on portal implementation:
- store portal data in a separate structure.
- store portal data in savegames because some of this will be changeable later.
- run a cleanup pass after all portals have been created to weed out broken ones.
- add a definition type that's compatible with Eternity Engine's line portal types.
- swapped arg[2] and arg[3] of Line_SetPortal, because the type is more significant than the alignment.
2016-02-05 23:15:56 +01:00
Randy Heit 3ad2e4191d Remove fudging from the end of (O)WallMost
- This might have been added in an effort to fix problems caused by mixing inclusive
  and exclusive right edges. It might not be needed anymore. Let's find out...
2016-02-05 16:08:20 -06:00
Randy Heit 26eb335622 Quiet a couple GCC warnings 2016-02-05 16:07:18 -06:00
Randy Heit 4228721351 Enable running when built with Clang's -fsanitize=address 2016-02-05 16:04:50 -06:00
Christoph Oelckers 9eaefc3685 - initialize portals with all other static line specials instead of doing it separately in P_FinishLoadingLineDefs when the map isn't fully set up yet.
- replace all float use in portal.cpp with doubles.
2016-02-05 16:58:57 +01:00
Christoph Oelckers a85a8c1465 - changed mirror handling so that it works without attaching a portal to the mirror line and removed line_t::portal_mirror member.
- did some cleanup on the portal interface on linedefs: All checks should go through isLinePortal (gameplay related) and isVisualPortal (renderer related) which then can decide on the actual data what to return.
- removed portal_passive because it won't survive the upcoming refactoring.
- removed all direct access to portal members of line_t.
- always use the precise (and fast) version of P_PointOnLineSide inside the renderer.
2016-02-05 16:14:45 +01:00
Christoph Oelckers 00895c245e - mpved all software renderer specific code for the portals into the render sources. 2016-02-05 15:39:06 +01:00
Christoph Oelckers 01b075660d - removed the option to toggle portals with SetLineSpecial.
This is to keep some people from jumping the gun on this and preventing the implementation of a proper toggling mechanism.
The feature itself will come back, but differently.

- removed portal setup from Build maps

they don't define it anyway so it makes no sense to have it there. Once this code gets refactored this will be in a different place that's identical for all map types.
2016-02-05 14:34:01 +01:00
Christoph Oelckers 6639984772 - removed Line_SetVisualPortal special. This will be folded into Line_SetPortal later 2016-02-05 14:24:20 +01:00
Randy Heit 2516b8f8af Adjusted the assert conditions in DoJump()
- With multiple A_Jump calls possible in a single action now, it is now
  possible for DoJump() to be called with a callingstate that does not
  match self->state because the state had been changed by a prior A_Jump
  in the same action function.
2016-02-05 06:41:27 -06:00
Christoph Oelckers 9d77244b3f - we are past 2.8 now so the version numbers should reflect that. 2016-02-05 12:03:59 +01:00
coelckers 297ffc5889 Merge pull request #536 from edward-san/pclass_alloc_mismatch
- Fixed alloc/dealloc mismatch in PClass code.
2016-02-05 11:24:06 +01:00
Christoph Oelckers 3a57036f60 - a simple command line parameter is probably more suitsble for controlling the disassembly output. 2016-02-05 11:20:32 +01:00
Christoph Oelckers 312117b0bc - disable script disassembly output by default. It's now controlled by a CVAR. 2016-02-05 10:56:15 +01:00
Christoph Oelckers 353608f2b9 - added a few FString variants for frequently called functions. 2016-02-05 10:52:10 +01:00
Christoph Oelckers 76c5039c63 Merge branch 'master' of https://github.com/rheit/zdoom 2016-02-05 10:41:05 +01:00
Christoph Oelckers 8da6483223 - fixed some places where FStrings were incorrectly used.
- replace all implicit conversions from FString to const char * in the header files (so that it can be test compiled with the implicit type conversion turned off without throwing thousands of identical errors.)
2016-02-05 10:40:45 +01:00
Christoph Oelckers c8d25378d5 - fixed type confusion with ?: operator in FMugShot::GetFace. 2016-02-05 10:08:49 +01:00
Braden Obrzut ba54d73e07 Merge branch 'portals2_visual' 2016-02-05 00:10:46 -05:00
MajorCooke 35b7a5ccc1 Updated for scripting branch merge. 2016-02-04 22:41:02 -06:00
MajorCooke 1f8d425a1e - Added CountInv(itemtype, [ptr_select]).
- Returns an inventory item count.
2016-02-04 21:45:31 -06:00
MajorCooke 3399ed60e0 Updated to scripting branch merge. 2016-02-04 20:17:46 -06:00
Edoardo Prezioso 002177e33f - Fixed alloc/dealloc mismatch in PClass code.
The function 'PClassActor::InitializeNativeDefault' is the only one which didn't allocate the 'Defaults' member variable with M_Malloc. Reported by the Address Sanitizer.
2016-02-05 03:03:34 +01:00
Christoph Oelckers 4751bffd5f - replaced malloc.h with stdlib.h in thingdef_expression.cpp. 2016-02-05 01:26:29 +01:00
Christoph Oelckers 995169de58 Merge branch 'csgwhy' of https://github.com/Edward850/zdoom 2016-02-05 01:21:01 +01:00
Christoph Oelckers 0b7a06c714 Merge branch 'NewEESpecials'
# Conflicts:
#	src/fragglescript/t_fs.h
2016-02-05 01:01:39 +01:00
Edward Richardson f2025e6a2f Fixed possible issue with GCC/Clang 2016-02-05 12:52:29 +13:00
Randy Heit b3b0886b64 Merge branch 'scripting'
Conflicts:
	src/actor.h
	src/g_doom/a_doomweaps.cpp
	src/g_hexen/a_blastradius.cpp
	src/p_enemy.cpp
	src/p_enemy.h
	src/thingdef/thingdef.h
	src/thingdef/thingdef_codeptr.cpp
	wadsrc/static/actors/constants.txt
2016-02-04 15:17:22 -06:00
rheit 56359b6f23 Merge pull request #342 from marrub--/fastweaponsfix
sv_fastweapons extension
2016-02-04 13:31:47 -06:00
Christoph Oelckers bf066763b7 - fixed: The FPS display should use the actual font info to calculate its size, not just assume that each character is 8*8 pixels. 2016-02-04 01:20:35 +01:00
alexey.lysiuk b9b0029373 Fixed overlapping of active artifacts with time/latency
Active artifacts are now displayed below time and/or latency on alternative HUD
2016-02-03 12:06:32 +02:00
alexey.lysiuk 1bf1fc199b Adjust latency position depending on time visibility
Latency placement is no longer fixed:
* If time is visible, it is placed on top of the screen and latency is placed below
* If time is not visible, latency is placed on top of the screen
Both are displayed on alternative HUD only
2016-02-03 12:06:20 +02:00
MajorCooke a1c1de9edb Fixed merge conflicts. 2016-02-02 18:26:20 -06:00
Christoph Oelckers 66f053f131 - on second thought: this shouldn't explode the speakers with too high values. 2016-02-02 15:02:06 +01:00
Christoph Oelckers c002c2fde9 - added a mastervolume setting for DUMB because its default volume is far less than all the other music options. 2016-02-02 14:45:32 +01:00
coelckers 5d19901cb7 Merge pull request #529 from alexey-lysiuk/fix_creative_openal
Fixed build with Creative Labs OpenAL SDK
2016-02-02 12:01:25 +01:00
Christoph Oelckers 0db679c90d - fixed clang compile error. 2016-02-02 10:53:56 +01:00
alexey.lysiuk 90dd6b61b4 Fixed build with Creative Labs OpenAL SDK
Tested with
* Creative OpenAL from https://www.openal.org/downloads/OpenAL11CoreSDK.zip
* OpenAL Soft from http://kcat.strangesoft.net/openal-binaries/openal-soft-1.17.1-bin.zip
2016-02-02 10:29:23 +02:00
Randy Heit c9d81dff53 Use absolute value of Y scale for 3D midtex
- Somebody might want to set a midtexture's Y scale negative to flip it
  vertically. I'm pretty sure this would mess up 3D mid textures if we
  don't make it positive again for those.
2016-02-01 21:07:09 -06:00
Randy Heit 6b6c1af0dc Add support for Y flipped non-vertically tiling masked midtextures 2016-02-01 21:07:09 -06:00
Randy Heit 03f0e1dc5c Remove something that looks like 3D floor development garbage 2016-02-01 21:07:08 -06:00
Christoph Oelckers 6b75f14c0f - fixed some Linux/GCC warnings. 2016-02-02 01:04:59 +01:00
Christoph Oelckers fe3e56c6bc - fixed: oalload.h should only do stuff is NO_OPENAL is not defined. 2016-02-01 18:49:12 +01:00
Christoph Oelckers ee045371a3 - On Windows, use LoadLibrary/GetProcAddress to load OpenAL function addresses.
The reason for this is that on my system, the static or delay loaded method always picks the (obsolete) system-installed OpenAL version (needed for some old games) which is not wanted here if there's another one in the local ZDoom directory.
This also removes the dependency on the broken import library that comes with OpenAL Soft which causes compile errors with more modern MSVC compilers on default settings.
2016-02-01 14:02:25 +01:00
Christoph Oelckers e0608f50d1 - create a separate translation table for Heretic's rain pillar.
These objects are supposed to be bright, but the standard translations for player do not take this into account, creating dark and/or invisible projectiles depending on the color being used.
The new translation uses hue and saturation from the player color, but combines brightness from the original color with the one for the player in an 8:2 ratio, so that no matter for the player color, these always remain bright and visible.
2016-02-01 10:45:33 +01:00
Christoph Oelckers 58196f77ff Merge branch 'master' of https://github.com/rheit/zdoom 2016-02-01 10:00:39 +01:00
Christoph Oelckers fd2828b1fe - fixed typo in monster movement code. 2016-02-01 10:00:19 +01:00
Randy Heit 2f4dc17954 Add support for face sprite Y flipping 2016-01-31 22:05:32 -06:00
Randy Heit 809a9d801c Got a flag backwards 2016-01-31 21:23:45 -06:00
Randy Heit 0b9aeb33e1 Fixed potential divide by 0 when drawing voxels
- Since voxels can have their origin behind the viewer and still have a
  portion visible in front of the viewer, they aren't clipped to MINZ like
  face sprites are. The 3D floor handling in R_DrawSprite() neglected to
  clamp it when recalculating the diminished light colormap.
  - Aside, but R_DrawSprite() probably shouldn't be messing with these
    properties at all. Why isn't this done in R_ProjectSprite() before it
    ever gets to the drawing part?
2016-01-31 20:52:56 -06:00
Randy Heit 1d0a3d19c8 Fix a part in maskwallscan that was missed for right-edge exclusivity 2016-01-31 20:45:37 -06:00
Edoardo Prezioso 4cbf752b4d - Fixed uninitialized variable in level info code.
Found with Valgrind.
2016-01-31 23:19:34 +01:00
Christoph Oelckers a1cd0401e4 - fixed: noclip2 should only set some minimal velocity if the player has none. 2016-01-31 22:38:08 +01:00
Christoph Oelckers 8068fca601 - fixed: player_t::Uncrouch should only reset the view height if the player is actually crouched. 2016-01-31 22:36:37 +01:00
coelckers c3cc98b5f3 Merge pull request #523 from alexey-lysiuk/osx_fullscreen
Final touches to fullscreen mode on OS X
2016-01-31 16:56:35 +01:00
coelckers 09e2f212a0 Merge pull request #524 from alexey-lysiuk/hexen_mac_beta
Added support for Hexen Mac beta
2016-01-31 16:55:23 +01:00
MajorCooke eb2829ad5e - Added CBF_DROPOFF to A_CheckBlock. Checks for actors stuck in tall ledges or dropoffs. 2016-01-31 09:45:41 -06:00
Randy Heit 219b6f7c5d Fix R_DrawFogBoundary for right-edge exclusivity 2016-01-31 06:51:11 -06:00
alexey.lysiuk 1798fab973 Added support for Hexen Mac beta
It's very similar to Mac demo but also contains MAP41: Maze like DOS full version 1.0
2016-01-31 12:53:22 +02:00
alexey.lysiuk 7b0f557514 Enabled zoom window button on OS X
Independently from OS version the game will enter fullscreen mode when zoom button is clicked
Window zooming behavior introduced in Yosemite is available on all supported versions of OS X
2016-01-31 10:42:16 +02:00
Randy Heit 240ca2af4c Use consistant right-edge rules in the renderer.
- The original Doom renderer was inclusive for all right edges. This was
  fine for the wonky projection it did. This was not fine for a standard
  perspective divide, so I had to change walls to be right-edge exclusive
  when I changed the projection. I only touched what was needed. Until
  now. The right edge is always exclusive now, which should prevent any
  more bugs related to mixing the two clusivities incorrectly.
2016-01-30 21:27:35 -06:00
Randy Heit c1b2861362 Merge the boolean args to EV/P_Teleport into a single flags arg
- The flags use TELF_ since DECORATE has an A_Teleport with its
  own set of TF_ flags.
- TELF_KEEPVELOCITY is used instead of TELF_HALTVELOCITY, because
  there was only one call that ever set bHaltVelocity to false.
2016-01-30 21:27:34 -06:00
Christoph Oelckers 939989dc8c - fixed crash when trying to cache nodes for a map that has no two-sided walls and no minisegs.
Under these conditions there are no partner segs and the glsegextras array is NULL.
2016-01-31 01:05:31 +01:00
Christoph Oelckers 46024398fe - fixed: Change FCheckPosition::LastRipped to a TMap so that it can track multiple overlapping actors being ripped during the same tic. 2016-01-30 22:06:04 +01:00
Christoph Oelckers 06fdb6ca45 - fixed: The reverb editor failed to open in fullscreen mode at desktop resolution.
According to Blzut3:

The issue happens when the fullscreen resolution is the same as the desktop resolution. In this case WM_DISPLAYCHANGE doesn't occur so the editor never appears. This appears to be fixable by also catching WM_STYLECHANGED since at the very least the window caption will appear/disappear.
2016-01-30 21:49:03 +01:00
alexey.lysiuk 6bce5ddc4b Scale of player's skin is now preserved on corpses after reborn 2016-01-30 18:30:20 +02:00
coelckers ccce6f44a2 Merge pull request #518 from Edward850/Particle-clamp
Clamped r_maxparticles to the internal limit
2016-01-30 15:21:55 +01:00
Christoph Oelckers 36911bac4b - fixed memory allocation type mismatch in demo code. 2016-01-30 15:17:46 +01:00
Christoph Oelckers afcd755c7a - changed autoaim menu option to a slider which allows a more precise control of the property.
- having a value of 5000 as the default for autoaim makes no sense, since this is an angle value that will always be clamped to [0..35]. So now 35 is both the default and the maximum.
2016-01-30 13:43:39 +01:00
Christoph Oelckers 3b5af8484c Merge branch 'master' of https://github.com/rheit/zdoom 2016-01-30 12:59:37 +01:00
Christoph Oelckers 0a0a2c4a41 - removed a warning. 2016-01-30 12:59:15 +01:00
Christoph Oelckers fab186786e Merge branch 'PlayerTransition' of https://github.com/Edward850/zdoom 2016-01-30 12:52:50 +01:00
Christoph Oelckers 0ddf9db8dd - fixed: Uncrouching a player also needs to reset the viewheight to its default. 2016-01-30 12:51:15 +01:00
alexey.lysiuk 6166520b33 Do not respawn on damaging floors when sv_samespawnspot is enabled
See http://forum.zdoom.org/viewtopic.php?t=47191
2016-01-30 12:50:19 +02:00
Christoph Oelckers 1285dde615 Merge branch 'master' of https://github.com/rheit/zdoom 2016-01-30 11:34:13 +01:00
Christoph Oelckers b84207a089 - use scaling, render style and alpha when drawing the cast call. 2016-01-30 11:33:55 +01:00
Edward Richardson 40d90ba325 Game still needs to abort if no starts exist at all 2016-01-30 22:26:47 +13:00
Edward Richardson fe52f98459 Clamped r_maxparticles to the internal limit 2016-01-30 22:04:09 +13:00
Edward Richardson c1e362ee83 Added level transition spawning for missing starts
- Additional player bodies are spawned for any absent starts in co-op.
- Removed now-redundant bot start limitation
2016-01-30 22:02:27 +13:00
Braden Obrzut 5317a92d11 Merge branch 'RadiusGiveExp2' 2016-01-30 00:27:44 -05:00
Braden Obrzut 5d6e8a7338 - Fixed: Possible timer overflow in PowerTimeFreezer. 2016-01-30 00:18:38 -05:00
Braden Obrzut a34a7ace18 - Some resolutions between 320x200 and 640x400 had non-square clean scaling factors. Maybe there was a reason for this in the past, but I can't think of a case where it'd actually look better to have 1:2 scaling in the menus and someone reported it. 2016-01-29 23:37:38 -05:00
Braden Obrzut 1fcb9fcf06 - Fixed: Crash when automatically switching sound backends due to failure. 2016-01-29 23:10:10 -05:00
MajorCooke eeca536d9a Clean up a few things. 2016-01-29 10:41:05 -06:00
Christoph Oelckers a41dc24086 - fixed: 3D lights should override the sidedef's regular light completely, that includes relative light added by UDMF's 'light' property.
- Renamed the 'noabsolute' parameter in side_t::GetLightLevel to 'is3dlight', what it actually is, to avoid the confusion that caused the abovementioned error.
- fixed: The Down2Up render path for sides of 3D floors had the 'is3dlight' check inverted.
2016-01-29 14:55:31 +01:00
Christoph Oelckers c6c15fe83c - fixed: AActor::SpawnPoint[2] must store the actor's height above the sector's floor, not above floorz. floorz will represent the current floor the actor is standing on, which may be a 3D floor or a 3D midtexture, but both respawn functions which use this value work from the actual sector floor. 2016-01-29 13:40:37 +01:00
Christoph Oelckers 08e5e1c145 - restored the velocity threshold checks in A_MaceBallImpact2 and A_DeathBallImpact to their original Heretic form, minus the check for floorz, to account for potential positioning issues with slopes.
These checks had some major issues:

 * they calculated incorrect positive values for hitting a ceiling
 * the way they used the plane equations made some incorrect assumptions.
 * velz has the velocity reduction from bouncing already factored in from the calling code so doing it here again is not necessary.
2016-01-29 12:44:38 +01:00
Christoph Oelckers fe271b4e78 - fixed: A_MaceBallImpact2 was missing a check for hitting some liquid terrain. 2016-01-29 12:21:35 +01:00
Christoph Oelckers 7b1fbe0a02 - fixed: P_TeleportMove was missing checks for THRUACTORS and THRUSPECIES flags. 2016-01-29 11:29:47 +01:00
Christoph Oelckers f8d5430c06 - fixed: When changing 'noclip2' some minor lateral velocity should be set to ensure that all internal variables contain proper values. 2016-01-29 11:11:10 +01:00
Christoph Oelckers 94611588d5 Merge branch 'master' of https://github.com/rheit/zdoom 2016-01-29 10:55:04 +01:00
Christoph Oelckers 674b81a6b1 - fixed: The 3D floor light list should use the last light starting above the ceiling, not the first one.
- fixed: ExtraFloor_LightOnly type 2 was behaving like type 0. Instead anything interrupting it should reset to the sector's own light level.
2016-01-29 10:54:44 +01:00
Randy Heit 87dee5c611 Fixed: Co-op players could spawn at (0,0) if no start spots for them
- Check if a co-op start exists. If not, pick one at random.
- Don't telefrag other players when spawning in co-op games, since
  you're allowed to move out of other players now.
2016-01-28 20:08:09 -06:00
Christoph Oelckers c5161ee748 - fixed: A_Face* mixed angle and distance values in the same parameter. Fixed by separating these into two.
- removed the intermediate A_Face* functions, except a bare-bones A_FaceTarget as needed by the monster AI code.
2016-01-28 20:44:10 +01:00
MajorCooke 772f086a5e Fixed broken aiming with A_CheckLOF. 2016-01-28 12:24:40 -06:00
Christoph Oelckers 6715a97d6e - removed debug output from previous commit. 2016-01-28 12:04:47 +01:00
Christoph Oelckers dfcee625db - fixed: The ACS String garbage collector only looked at the active script's stack but never considered a recursive call from another script.
Fixing this required adding an external list of active stack objects that the garbage collector can access.
A nice side effect: It's no longer necessary to pass around the stack info to various functions that might end up triggering a garbage collection.
2016-01-28 11:56:47 +01:00
Christoph Oelckers 1a4b3bbe11 Merge branch 'master' of https://github.com/rheit/zdoom 2016-01-28 09:20:55 +01:00
Christoph Oelckers 724e625f16 - fixed: Loading an old savegame from before the sector damage refactoring cleared the extended Boom sector flags before processing them. 2016-01-28 09:20:27 +01:00