Commit Graph

6478 Commits

Author SHA1 Message Date
Randy Heit a95c6b9644 Draw upper/lower textures on two-sided portal lines 2016-04-29 21:54:29 -05:00
Randy Heit 09730bff73 Fix incorrect texture mapping vectors for slopes 2016-04-29 20:35:55 -05:00
Christoph Oelckers 8309d8f634 - fixed coordinate typo. 2016-04-29 23:14:04 +02:00
MajorCooke b9687b4a57 Compiler fix 2016-04-29 06:33:38 -05:00
Christoph Oelckers 4a72c7d2f1 - fixed: Decals may not be serialized before thinkers.
Since decals may have thinkers attached this will crash when such a savegame gets loaded, because the thinker lists get reset in P_SerializeThinkers, deleting any thinker that already was processed.
I also added an error message that immediately aborts the save process if such an out-of-sequence thinker is attempted to be written out.
This obviously breaks savegame compatibility again...
2016-04-29 11:44:17 +02:00
Randy Heit f3d273c94f Fixed: Tiled midtextures could go up past the ceiling when a 3D floor is in view 2016-04-28 22:06:57 -05:00
Randy Heit 8f3921190f Keep values in floats longer for visplane drawing 2016-04-28 21:21:49 -05:00
Randy Heit 96228ca15f Trying to fix some rounding, not sure it's actually correct yet 2016-04-28 21:14:48 -05:00
Christoph Oelckers 3bbb5c7237 - moved the texture warping into templated subfunctions, so that the same code can be used for true color buffers as well. 2016-04-28 18:17:18 +02:00
Christoph Oelckers af2a1769d8 - use the FP2005 method to calculate xtoviewangle, because it is far more straightforward than the old version. 2016-04-28 16:27:28 +02:00
Christoph Oelckers ef98757c7c - replaced finesine for texture warping with a smaller custom table, based on the old 2005 FP code, but fixes the generation of the sine table.
- removed all remnants of finesine and deleted tables.c and tables.h.
2016-04-28 15:59:37 +02:00
Christoph Oelckers 9f0c5d5909 -let's better be cautious about precision and use the CRT sin and cos functions for rotated plane textures. 2016-04-28 14:49:59 +02:00
Christoph Oelckers 027b8d29b8 - make FieldOfView a real angle and remove all uses of finetangent. 2016-04-28 13:59:06 +02:00
Christoph Oelckers f301cf7c57 - don't use finetangent for generating xviewtoangle. 2016-04-28 13:03:48 +02:00
Christoph Oelckers 26f54b0ba4 - eliminated tantoangle and cleaned up r_tables.h 2016-04-28 12:18:33 +02:00
Christoph Oelckers 8171637a57 - removed the last remaining uses of the finesine table from the rendering code. 2016-04-28 11:37:02 +02:00
Randy Heit ae7d048057 Store FTransform in visplane_t, not just a pointer
- The transform values passed to R_CheckPlane might live on the stack, so
  it's not safe to only store a pointer to them.
2016-04-27 23:07:25 -05:00
Randy Heit 44adff459a Remove halfviewwidth
- Why I thought I needed this variable in addition to centerx has
  long ago left my memory.
2016-04-27 22:49:36 -05:00
Randy Heit 31d842a894 Store FTransform in visplanes instead of converting to fixed_t 2016-04-27 22:17:33 -05:00
Randy Heit ac69ed3361 Minimal wallmost changes
- Add comments
- Fixed: When WallMost() finds a line entirely above the screen, it should
  set the most array to 0, not -1.
2016-04-27 22:17:33 -05:00
MajorCooke 6f11a65893 - Converted rollIntensity from int to double.
- It was already a double in the save version serialization so nothing had to be changed there.
2016-04-27 12:58:18 -05:00
MajorCooke 64d01a3bb1 Forgot to undo this. 2016-04-27 10:26:06 -05:00
MajorCooke 0fc7055f51 - Fixed: Quakes with rolling were not unique; they borrowed from any other quakes that didn't have rolling, thus preventing the rolling from falling off properly. 2016-04-27 10:13:30 -05:00
Christoph Oelckers 38d92b23b9 - fixed: ACS's GetSectorCeilingZ and GetSectorFloorZ expected integer coordinates. 2016-04-27 15:41:22 +02:00
Christoph Oelckers 3fd0d27efa - removed some leftover fixed point handling from PType. 2016-04-27 15:35:01 +02:00
Randy Heit a14c0c8063 Fix a couple missing structs in vissprite_t 2016-04-27 08:13:22 -05:00
Christoph Oelckers 3a17d6aa78 - fixed savegame compatibility. 2016-04-27 13:47:30 +02:00
MajorCooke 762d186657 Finished interpolation. 2016-04-27 13:42:16 +02:00
MajorCooke be9b25e760 Use ViewRoll instead of CamRoll, and removed CamRoll entirely. Begin work on interpolation. 2016-04-27 13:42:15 +02:00
MajorCooke c972caa9f3 - Added rollIntensity and rollWave to A_QuakeEx.
- Instead of moving the camera around, it rolls the camera.
- This only has an effect in GZDoom.
2016-04-27 13:42:15 +02:00
MajorCooke 660aff562d - Added support for THRU flags on bullets and rails.
- ALLOWTHRUFLAGS must be used on the puffs, added for the sake of compatibility with older mods. This applies to the following:
-- Bullets: THRUACTORS, THRUSPECIES
-- Rails: Same as bullets, but includes THRUGHOST.
2016-04-27 13:38:27 +02:00
Christoph Oelckers 262f3575ae - added a "custom" flag to drawmugshot so that the user-specified image can be forced to be used. 2016-04-27 13:16:35 +02:00
Christoph Oelckers ebca8cc5b0 - added a portable config file option, for now only on Windows: If the engine finds a file named [GAMENAME]_portable.ini, it will use that instead of creating a user specific version, so that portable installs can carry their INI along. 2016-04-27 13:04:37 +02:00
Christoph Oelckers 934b1923d0 - fixed: CheckForPushSpecial did not check blocking 3D midtextures. 2016-04-27 12:37:38 +02:00
Christoph Oelckers 044bf4ada6 - fixed: P_CheckPosition must initialized tm.floorterrain. 2016-04-27 12:08:22 +02:00
Christoph Oelckers f5afa30ee6 - added GetAngle(bool relative, int target) DECORATE function. 2016-04-27 11:52:52 +02:00
Randy Heit d970be48f9 Use floating point xscale in R_RenderFakeWall() 2016-04-26 23:30:16 -05:00
Randy Heit a029c7b664 Fix unneeded fixed_t height in R_3D_AddHeight() 2016-04-26 23:11:27 -05:00
Randy Heit ee43c4ff95 Fixed: Accidentally left in /65536.0 in WallMost() 2016-04-26 23:00:41 -05:00
Christoph Oelckers 8bda356412 - fixed crash in slope drawing: Several overlooked occurences of fixed point math in R_CalcTiltedLighting. Slopes are still completely broken, though. 2016-04-27 04:08:06 +02:00
Christoph Oelckers a26d81e060 - fixed incomplete float conversion in R_RenderFakeWallRange. 2016-04-27 02:28:45 +02:00
Christoph Oelckers fab38d092b - fixed: P_LineOpening could miss a 3D floor if an actor was centered right against its side.
- restored the original 3D floor code to retrieve the current floor in P_CheckPosition. The portal aware version was a bit too strict and could place the actor on the wrong side when moving at high speeds.
2016-04-27 02:13:35 +02:00
Chris Robinson 6e25d3f618 Use a background thread for processing OpenAL streams 2016-04-26 06:12:56 -07:00
Chris Robinson 204d0c8572 Don't try to define __try/__except on non-MSVC systems
They didn't do anything anyway, and can clash with other compilers since they
may be used internally (macros and keywords starting with __ are for compiler
use).
2016-04-26 05:55:18 -07:00
Christoph Oelckers 172290224b - make modes 2 and 3 of Teleport_NoFog compatible with Eternity by defaulting to mode 1 when no line is available. 2016-04-25 01:01:28 +02:00
Christoph Oelckers 0f99d7d73f - floatified the few remaining linedef and sector properties that still were fixed_t. The only fixed point things left in r_defs.h are the nodes and a fixed point setter function for vertex_t, which is still needed by the node builder. 2016-04-24 12:15:09 +02:00
Christoph Oelckers 31845cd16b - fixed two fixed/float mixups. 2016-04-24 10:24:43 +02:00
Randy Heit e96ed6bf8d Add FBaseCVar::GetHumanString()
- For most cvars, this is equivalent to calling GetGenericRep() to get a
  string.
- For float cvars, it uses %g instead of %H, because %H is generally more
  information than is needed.
2016-04-23 22:30:08 -05:00
Randy Heit fc54dd1ff0 Use %H when converting float cvars to strings to avoid information loss 2016-04-23 22:08:49 -05:00
Randy Heit 3a0d046f7e Fix rendering with SW 2D: modf usage was backwards 2016-04-23 21:29:40 -05:00
Randy Heit 96a0bee651 Quiet two more warnings from GCC 2016-04-23 21:00:35 -05:00
Randy Heit 3cabd5f0ed Fix compilation with GCC
- GCC is pickier than Visual C++. GCC requires that structs with constructors, etc that are
  used in a union must be defined outside the union. VC++ lets you do it inline.
2016-04-23 20:58:15 -05:00
Randy Heit 991f49e321 Avoid copying vissprite_t in R_DrawPSprites() 2016-04-23 20:42:14 -05:00
Randy Heit b8e3e1f095 Remove BAM_FACTOR from FAngle, because it takes up physical space in the struct 2016-04-23 17:27:36 -05:00
Christoph Oelckers 565bab8bd3 - removed some unnecessary temporary variables. 2016-04-23 22:55:44 +02:00
Christoph Oelckers f420ccd287 - made Teleport_NoFog compatible with Hexen and Eternity.
ZDoom defaulted to Boom's (buggy) angle adjustment.
Changed it so that
 * Mode 0 is like Hexen, performing no adjustment at all. This still should match all known maps using this special.
 * Mode 1 remains unchanged.
 * Mode 2 replicates Boom's broken angle adjustment and is used in the xlat file.
 * Mode 3 implements the correct angle adjustment that Boom originally intended.

 (Note: Should some map require something different it should be handled with compatibility.txt instead of reverting this back to the broken way it was before.)
2016-04-23 21:32:40 +02:00
Christoph Oelckers eaabb5e986 - fixed vissprite_t &operator= declaration. 2016-04-23 15:51:46 +02:00
MajorCooke 6bba84458c - Rail spawned actor trails now set their targets to the shooter and transfer pitch. 2016-04-23 08:19:59 -05:00
Christoph Oelckers 5fcdb7b80d - bump savegame version for today's changes. 2016-04-23 14:20:40 +02:00
Christoph Oelckers 3c13d8085b - removed unused R_PointToDist2 and R_PointToAngle2 functions. 2016-04-23 13:55:50 +02:00
Christoph Oelckers 2447f7bc38 - renamed FTransform access functions. 2016-04-23 13:40:02 +02:00
Christoph Oelckers 04e614daec - removed some fixed point functions that are no longer needed.
- fixed: Visplane checks should only compare the plane flags that are relevant for rendering and mask out the rest.
- floatified FTransform and made the visplane checks a bit less verbose by moving the comparison as an operator into FTransform.

Note that this operator needs forceinline on Visual Studio so that it won't get called as a function.
2016-04-23 12:42:07 +02:00
Christoph Oelckers 35a6994d0a - remove the 'F' prefix from the floating point access function to the sidedef texture info, now that the fixed point versions are gone. 2016-04-23 10:55:55 +02:00
Christoph Oelckers be8d1b46a7 - remove the deleted functions, now that they are no longer needed. 2016-04-23 10:51:58 +02:00
Christoph Oelckers 4d4f31fd83 - floatified sidedef texture info and fixed two bugs involving this data. 2016-04-23 09:41:59 +02:00
Randy Heit f1b3f59bcc Renderer floatification: Use floating point for wall scale and yrepeat 2016-04-22 23:12:53 -05:00
Randy Heit 1f97488945 Renderer floatification: Use floating point for decals 2016-04-22 23:12:53 -05:00
Randy Heit cb0fe38dfe Renderer floatification: "fix for signed divide" isn't needed when using xs_RoundToInt 2016-04-22 23:12:53 -05:00
Randy Heit b2b3e50c5c Renderer floatification: Use floating point for geometry Zs 2016-04-22 23:12:53 -05:00
Randy Heit 3ef5a678d5 Renderer floatification: Use floating point for texturemids and Y scales 2016-04-22 23:12:53 -05:00
Randy Heit 4a1cc61822 Renderer floatification: Restore playersprite rendering 2016-04-22 23:12:27 -05:00
Randy Heit ec8d038c99 Renderer floatification: Use floats for lighting values 2016-04-22 23:10:34 -05:00
Randy Heit 4416d88eb2 Renderer floatification: Use floating point for visibility values 2016-04-22 23:10:02 -05:00
Randy Heit ded3f92452 Commence renderer floatification 2016-04-22 23:09:13 -05:00
Christoph Oelckers 3c7d0c971f - fixed: It seems it is not allowed to serialize any thinker before the actual thinker chain is serialized. This means that sector_t::floordata, ceilingdata and lightdata's handling had to be moved to P_SerializeWorldActors. 2016-04-22 17:48:25 +02:00
Christoph Oelckers 382a6e8b9f - link actors to touching line portals, for use by the renderer. 2016-04-21 22:59:07 +02:00
Edoardo Prezioso afa3009f93 - Fixed a GCC/Clang compiler error and a warning. 2016-04-21 16:11:03 +02:00
Edoardo Prezioso 6cfd82f500 - Simplify more, found by code inspection. 2016-04-21 16:03:33 +02:00
Edoardo Prezioso 6aca7604eb - Clean the code by using AActor::GiveInventory.
This fixes also a bug in FraggleScript GiveInventory, which tried to access the 'SaveAmount' member of 'ABasicArmorBonus' with the wrong cast.
2016-04-21 16:02:43 +02:00
Edoardo Prezioso 7b35f32f3d - Added the 'GiveInventory' method to the actor.
This will help cleaning up the item giving code. Returns a bool, in case the pickup failure might turn to be interesting in the future.
2016-04-21 15:59:23 +02:00
Edoardo Prezioso ad9b9479ec - Fixed erroneous P_UndoPlayerMorph calls.
In some places, P_UndoPlayerMorph was called with the 'force' argument placed in the 'unmorphflag' parameter, so that 'forced' unmorphs would be not completely forceful.

I hope no mod relied on this weirdness...
2016-04-21 11:25:08 +02:00
Christoph Oelckers 27cc3d6289 - fixed: ACS's GetActorLightLevel didn't check 3D floors. 2016-04-21 11:17:28 +02:00
Christoph Oelckers ba7260c176 - fixed overflow issue with large damage values in P_RadiusAttack. 2016-04-21 10:51:41 +02:00
Christoph Oelckers c3eec6db4d -fixed warnings 2016-04-21 10:38:42 +02:00
Christoph Oelckers e5dc92f998 - some reshuffling of save data so that the actors won't get restored before the sectors.
Note that this required splitting P_SerializeWorld, because sector_t and FSectorPortal contain some actor pointers, for which the same rule applies: Portal linking can only be done after all sectors have been read, meaning it cannot be done along with the rest of the data in these structures.

Obviously such a change breaks savegame compatibility so the min. savegame version had to be increased again.
2016-04-20 19:42:00 +02:00
Christoph Oelckers 082042818b - refactored sector portal data so that it does not rely on actors.
This is necessary because otherwise the level data cannot be serialized before the actors.
2016-04-20 19:20:11 +02:00
Christoph Oelckers 3532dd9ea1 - fixed coordinate correctness issues with P_CheckFor3DFloor/CeilingHit. 2016-04-20 13:28:19 +02:00
Randy Heit 60966f472f Revert "Revert "Remove "action" from Actor functions that don't actually need it""
- This reverts commit 06216d733e.
- I don't know what I was thinking. Since stateowner is always available
  to the wrapper function, and this code is only generated for the wrapper
  function, it's a nonissue. The state is already located before calling
  any function that uses it.
2016-04-19 21:09:15 -05:00
Randy Heit 06216d733e Revert "Remove "action" from Actor functions that don't actually need it"
- This reverts commit 39df62b20e.
- Anything that needs to lookup a state also needs stateowner. See
  FxMultiNameState::Emit(). I will need to be more selective when
  de-actionifying functions.
2016-04-19 20:56:43 -05:00
Randy Heit 05843d3b13 Use "%#g" when disassembly floating point constants
- With "%g", there would be no decimal point if the number had no
  fractional part, making the output indistinguishable from integers.
2016-04-19 20:48:12 -05:00
Randy Heit 5d3e413d42 Make A_Stop an action function again
- A_Stop takes no parameters, so it should be an action function to avoid
  creating the wrapper when called.
2016-04-19 20:46:30 -05:00
Randy Heit 39df62b20e Remove "action" from Actor functions that don't actually need it
- An actor function really only needs to be an action function if:
  1. It can be called with no parameters specified, either because it takes
     none or because all its parameters are optional. This lets SetState()
     call it directly without creating a wrapper function for it.
  2. It wants access to the callingstate or stateowner parameters. Most
     functions don't care about them, so passing them is superfluous.
2016-04-19 20:28:49 -05:00
Christoph Oelckers 322b9fc0ae - wrap access to portal properties into sector_t:: member functions. 2016-04-19 11:35:28 +02:00
Randy Heit c795f29cc4 Reduce calling overhead for A_SetUser* functions by making them non-action functions 2016-04-18 23:18:34 -05:00
Randy Heit e83bc53678 Add atan2, which was conspicuously absent, to the VM
- DECORATE now has atan2(y,x) and VectorAngle(x,y) functions. They are
  identical except for the order of their parameters. The returned angle
  is in degrees (not radians).
2016-04-18 23:06:17 -05:00
Christoph Oelckers 69cbb7a382 - fixed: The pitch calculation did not check the calling actor's height when retrieving the position to calculate the pitch from. 2016-04-19 00:52:08 +02:00
Christoph Oelckers d2735d7632 - fixed: Trace considered any water surface a hit if nothing else was found. 2016-04-18 18:31:19 +02:00
Christoph Oelckers 5e822fd60b - fixed: The starting position of sight checks was inconsistent in different parts of p_sight.cpp. 2016-04-18 16:46:56 +02:00
Edoardo Prezioso 8dee0be9ab - Fixed the morphed player actor friendliness.
It wasn't inherited from the original player actor object.
2016-04-18 16:30:13 +02:00
nashmuhandes a30eb4d709 Fixed a potential NULL assignment in FOptionMenuItemSafeCommand::Activate 2016-04-18 16:30:13 +02:00
nashmuhandes 6bfdd10a5c Show the command label when choosing a SafeCommand (like Reset2Defaults) in the menu. 2016-04-18 16:30:12 +02:00
Christoph Oelckers 2327107f32 - fixed: Actors cannot be linked into the world until after all actors and sectors have been deserialized.
Two issues:

Portal linking requires all skyboxes in the sectors to be present, without them some info is not there when needed.
UpdateWaterLevel was called in AActor::Serialize, which operated on the freshly loaded level where lots of things haven't been set up yet and plane heights may be wrong.
2016-04-18 15:27:19 +02:00
Christoph Oelckers 961a4c8524 - optimized sector portal checks.
All the PortalBlocks* functions were turned into real function calls which for such a frequent check should be avoided. So now any linked portal sets a flag in the attached sectors so that it isn't necessary to check the skybox pointer each time which makes the functions subject to inlining again.
2016-04-18 13:40:09 +02:00
Christoph Oelckers 42e88ef120 - removed sector_t::FloorDisplacement and CeilingDisplacement.
Using the values these return directly is just as much code.
2016-04-18 13:40:09 +02:00
Christoph Oelckers c30d5d42a2 - fixed: UpdateSectorRenderList may not be called when spawning mapthings.
At this time the portals have not been initialized yet and doing this here would trash the cached previous coordinate.
2016-04-18 13:40:08 +02:00
Christoph Oelckers 8c1eb201eb - optimized P_PointInSubsector.
It costs more to convert the floating point coordinate for each node check than to convert it once up front and only use fixed point math afterward.
2016-04-18 13:40:08 +02:00
Randy Heit c5c032911c Let the temporary vissprite be stack local 2016-04-17 20:59:08 -05:00
Randy Heit 66c4bc1fee Fixed various problems when drawing psprites in a camera texture
- When the camera texture for a player view was rendered, its psprites
  would overwrite the ones stored for hardware acceleration.
  * Use a temporary vissprite in R_DrawPSprite() until it's known that it
    will be accelerated.
  * Do not write to any of the VisPSprites*[] arrays until it's known that
    the sprite will be accelerated.
2016-04-17 20:55:07 -05:00
Randy Heit bf629d2590 Use a range instead of strict equality when deciding head sounds
- See http://forum.zdoom.org/viewtopic.php?f=7&t=51583
2016-04-17 20:14:25 -05:00
Christoph Oelckers 2661a94fe9 - call UpdateSectorRenderList from LinkToWorld as well, because this can be called from outside the actor's Tick function. 2016-04-18 01:35:37 +02:00
Christoph Oelckers 89b2cc45a2 - reverted P_CreateSecNodes to the regular FBlockLinesIterator.
This got accidentally committed. Even if this gets extended to reach through portals it needs to be done differently. FMultiBlockLinesIterator can't guarantee to get every sector that's being touched.
2016-04-18 00:02:07 +02:00
Christoph Oelckers 54d78df267 - added a new sector list to AActor that collects all portal-linked sectors the actor's center is in. (Inspired by Eternity's solution to the same problem.)
This is for rendering the sprite properly in all areas the actor touches. The original thinglist is not sufficient for this and Boom's touching thinglist has other purposes and collects too much data.
This new list will only get filled in when the actor is actually crossing a portal plane, for the normal sector thinglist will still be used.
This piggybacks on the msecnode_t code which has been extended to be able to handle more than one list by passing the sector's membert pointers as parameters.
2016-04-17 23:48:04 +02:00
Christoph Oelckers f66202aef1 - fixed: If due to portal transitions, the chasecam cannot be interpolated, the entire view interpolation must be disabled for the current frame. 2016-04-17 18:42:54 +02:00
Christoph Oelckers 08514de768 - fixed A_WraithFX2 which had an incomplete floating point conversion. 2016-04-17 18:19:46 +02:00
Christoph Oelckers 3ed7a25d61 - added polyportal offset updates.
- removed the nodebuilder message for splitting polyobject subsectors because it is no longer relevant.
2016-04-17 17:10:11 +02:00
Christoph Oelckers f27c762319 - fixed: The Heresiarch's check for full rotation of its balls depended on BAM semantics so it should still be checked as such to ensure consistent behavior. 2016-04-17 12:28:35 +02:00
Christoph Oelckers a199fe1825 - fixed: loading polyobjects from a savegame was incomplete. 2016-04-17 12:04:32 +02:00
Christoph Oelckers a1e8d83724 - added SetMusicVolume ACS function. 2016-04-17 10:56:46 +02:00
Christoph Oelckers 5e73cdc670 - deleted leftover label in trace code. 2016-04-17 10:41:13 +02:00
Christoph Oelckers bc2a5b3f16 - fixed typo in automap background position calculation. 2016-04-17 10:19:56 +02:00
Christoph Oelckers 6a27267500 - changed handling of one-time, one-way door polyobjects to be more efficient.
The old code kept the dead thinker, resulting in constant deletion and recreation of the subsector links and PolyBSP because the interpolation kept running.
Changed it so that the thinker is destroyed and the polyobject gets blocked by setting a new flag.
2016-04-17 01:24:07 +02:00
Christoph Oelckers 7ac0cfbbb9 - added support for angle changing portals to P_AimCamera. 2016-04-16 22:54:47 +02:00
Christoph Oelckers e7c0fd26ba - restored an accidentally deleted line in the Heresiarch code. 2016-04-16 21:28:08 +02:00
Christoph Oelckers 0f6a567055 - added portal-awareness to the railgun trail.
This required some changes to the Trace function because it turned out that the original was incapable of collecting the required information:

* actors are now also linked into blockmap blocks on both sides if they occupy the boundary of a sector portal.
* Trace will no longer set up parallel traces in all parts connected with sector portal, but only use one trace and relocate that on the actual boundary.
2016-04-16 19:41:33 +02:00
Christoph Oelckers eb30bf6e14 - fixed: Offsetting a vector by portals did not properly adjust the trace after crossing a portal. 2016-04-16 00:17:12 +02:00
Christoph Oelckers cd75a46917 - fixed incorrect use of 'frac' in Trace's EnterLinePortal function.
How did this go wrong...?
2016-04-15 22:22:38 +02:00
Christoph Oelckers 6dfb4bdd41 - changed floor and ceiling movers so that portal planes do not block movement of the opposite plane, even if they are on the wrong side of it.
This fixes the cross-portal lift to the blue key in Vaporware.
2016-04-15 20:42:40 +02:00
Christoph Oelckers b73c6e847a - fixed: A_CheckRange calculated the square twice, resulting in a far too large value that got checked. 2016-04-15 18:46:31 +02:00
Christoph Oelckers 24776edd13 - fixed one of the most glaring omissions in the portal code: The wall clipper completely ignored portals when deciding how to treat a sector boundary, and ended up merging portal with non-portal planes.
This check is only active for linedef based portals, due to the large amount of maps that did it wrong with thing based portals.
Although it may well be that there are some maps that abuse this omission for linedef portals as well, these are better handled with a compatibility option if the need arises.

The main reason this was added is to streamline and optimize the portal handling between renderers in ZDoom and GZDoom. For that both need to show the same general behavior and for linedef portals it is also important to handle the same as in Eternity.
2016-04-15 16:39:58 +02:00
Christoph Oelckers 94cec02acc - fixed: FPNGTexture must readjust the file pointer after deciding to skip the tRNS chunk. 2016-04-15 15:15:34 +02:00
Christoph Oelckers ed211ecbab - fixed positioning of portal things
In some situations it can happen that the sector here is not the frontsector of the anchor linedef, because some colinear node line with opposite direction causes this to be positioned on the wrong side. The only remedy here is to explicitly set the correct sector after spawning these things.
2016-04-15 15:02:28 +02:00
Christoph Oelckers f0c2cd2d50 - fixed: 24 bit PNGs with transparent color need to set transpal to true in FPNGTexture::CopyTrueColorPixels. 2016-04-15 10:45:31 +02:00
Christoph Oelckers 77f05a0010 - fixed spawn positions for Korax's missiles. 2016-04-14 00:21:38 +02:00
Christoph Oelckers 0f7fce8bbb - removed portal offsetting from the sprite distance check.
This isn't necessary. When rendering no actors from other groups may ever come into view directly - only when the respective part of the level is rendered through a portal. But at that point the camera is in a position where it's already correctly placed with relation to that actor.
2016-04-13 19:32:54 +02:00
Christoph Oelckers d88a5ac353 - make distancecheck 3D and use the actual view position for calculation. 2016-04-13 10:48:39 +02:00
Christoph Oelckers 45cfea17f5 - removed unused variable. 2016-04-13 10:34:04 +02:00
Christoph Oelckers 21b45fc0eb - fixed: distancecheck as a class property needs to be copied manually to subclasses. 2016-04-12 22:42:02 +02:00
Christoph Oelckers 3f0ed5d252 - added a distancecheck property to AActor that allows a given CVAR to be used as maximum display distance for actors of this type.
This is for WolfenDoom: BOA, which has some scripted sprite distance checks that very negatively affected performance.
2016-04-12 19:44:12 +02:00
Christoph Oelckers e1a683b9ec - fixed minimum damage check in PowerDamage. 2016-04-12 15:49:13 +02:00
Christoph Oelckers 5d528fe317 - fixed: PCD_ENDTRANSLATION was missing a NULL pointer check. 2016-04-12 01:23:12 +02:00
Christoph Oelckers a97f67edb6 - fixed: P_GetMidTexturePosition needs to divide by scale, not multiply, to get the proper offset. 2016-04-11 23:12:35 +02:00
Christoph Oelckers aec1c85c08 - fixed: alpha for patches needs to be multiplied by 65536, not divided by. 2016-04-11 22:21:17 +02:00
Christoph Oelckers ae6df617ba - fixed: The FPathTraverse call in P_UsePuzzleItem was missing the PT_DELTA flag. 2016-04-11 22:10:46 +02:00
Christoph Oelckers e72bfa8add - fixed: For finding the listener's sector the sound code used the wrong coordinate. 2016-04-11 21:02:44 +02:00
Christoph Oelckers 99ca649930 - fixed NULL pointer access in SetAmmoCapacity. 2016-04-11 20:42:43 +02:00
Christoph Oelckers 77bfffaee0 - removed a few __cdecl's from the source. 2016-04-11 12:46:48 +02:00
Christoph Oelckers db86385cf6 - removed STACK_ARGS.
The only reason this even existed was that ZDoom's original VC projects used __fastcall. The CMake generated project do not, they stick to __cdecl.
Since no performance gain can be seen by using __fastcall the best course of action is to just remove all traces of it from the source and forget that it ever existed.
2016-04-11 10:46:30 +02:00
MajorCooke 76f00131ff - Fixed: A_CheckBlock's dropoff check ignored the specifications of NOACTORS and NOLINES due to P_CheckMove blindly failing if P_CheckPosition failed. This lead to false positives such as blocking actors being detected when they shouldn't be. 2016-04-10 20:11:04 +02:00
Christoph Oelckers 76c18820cb - moved the declarations for the lighting thinkers to p_light.cpp.
Aside from the init function they are not needed anywhere else and that could also be placed into this file.
2016-04-10 18:29:23 +02:00
Christoph Oelckers c12a85ee85 - removed some unused content from p_spec.h 2016-04-10 18:14:01 +02:00