Commit Graph

6672 Commits

Author SHA1 Message Date
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 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
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
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
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
j-palomo 0269aeea80 Fixed: MNU_COLORPICKER defined twice in language.eng 2016-03-13 02:56:20 +01: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 346fae82c7 - fixed beta Lost Soul's states. 2016-03-12 10:54:14 +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
Christoph Oelckers 7c47e6ddb2 - how about updating the reference first before adding this stuff... Overlooked those two because my Eternity repo was not fully up to date. 2016-03-08 16:05:53 +01:00
Christoph Oelckers 6787dfeafb - updated xlat/eternity.txt 2016-03-08 16:01:26 +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