Commit Graph

65 Commits

Author SHA1 Message Date
Christoph Oelckers 95c3464973 - properly handle 3D floors with inverted planes in the list sorter. 2016-08-03 12:17:22 +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
Christoph Oelckers 27cc3d6289 - fixed: ACS's GetActorLightLevel didn't check 3D floors. 2016-04-21 11:17:28 +02:00
Christoph Oelckers 3532dd9ea1 - fixed coordinate correctness issues with P_CheckFor3DFloor/CeilingHit. 2016-04-20 13:28:19 +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
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 25f5e8449a - replaced all direct access to sector plane coefficients with wrapper functions. 2016-03-29 12:40:41 +02: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 fb8e03d5eb - floatified FLineOpening.
- some smaller fixes.
2016-03-25 18:43:37 +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 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 cff8e51811 - converted AActor::height to double. 2016-03-20 20:55:06 +01:00
Christoph Oelckers 8362c6a856 - conversion of floorz to double. 2016-03-20 19:52:35 +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 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
Randy Heit 55142078d8 Normalize line endings 2016-03-01 09:47:10 -06: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 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
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 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 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 993a840630 - bring formatting in line with GZDoom's version of this function. 2016-02-14 12:33: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 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
Christoph Oelckers 43314f0c0d - started refactoring p_map.cpp
- added AActor::Top function to replace the frequent occurences of actor->z + actor->height.
2016-01-18 00:59:16 +01:00
Christoph Oelckers c611456397 - more refactoring of AActor coordinate access. 2016-01-17 18:36:14 +01:00
Christoph Oelckers 3e446ea04d - replaced access to AActor's coordinate members with access functions
(first 200 compile errors down...)
2016-01-17 13:48:16 +01:00
Christoph Oelckers 71c7f2b42c - added 'floorterrain' and 'ceilingterrain' sector properties for UDMF. These will take precedence over texture based terrain if used.
'ceilingterrain' is needed because the top of 3D-floors refers to the model sector's ceiling, so in order to give a 3D floor a terrain it must be assignable to the sector's ceiling.
Note that although it is basically the same property, its actual function bears no relevance to its use in Eternity.
2016-01-09 12:10:36 +01:00
Christoph Oelckers 6a63effa1f - fixed: A_CheckTerrain did not use the proper damage type for processing an instant death sector.
- moved sector secret information from sector_t::special and secretsector to two flag bits in sector_t::Flags.

This is to get rid of the bit masking madness in the floor/ceiling thinkers which need to preserve this bit when they change a sector's type.
2016-01-06 01:50:45 +01:00
Christoph Oelckers d432df55e9 - changed Sector_SetDamage so that it can explicitly set the damage interval and the leakiness probability, instead of hardcoding it to fixed damage ranges.
- fixed: FCajunMaster::IsDangerous did not check for Heretic's sludge type.
2016-01-05 15:39:21 +01:00
Christoph Oelckers 4444d3c0c5 - removed the _3DFLOOR #define because we really do not want to comment this out anymore, right? 2015-06-07 09:41:44 +02:00
Christoph Oelckers 3fea074d35 - respect FF_INVERTSECTOR when checking a 3D floor's terrain. 2015-06-07 09:33:15 +02:00
Eevee (Alex Munroe) 221c2d2d82 Transfer flat-based damage (P_PlayerOnSpecialFlat) to 3D floors. 2015-06-06 16:07:48 -07:00
Christoph Oelckers db61c1cb57 - allow multiple line IDs as well using the same method as for sector tags. 2015-04-19 17:51:34 +02:00
Christoph Oelckers d166211ce0 - reverted changes from copying over p_3dfloors.cpp with GZDoom's version. 2015-04-16 19:55:46 +02:00
Christoph Oelckers e30958f443 - fixed: The check for completely invisible 3D floor in the sorting code checked the wrong flags. 2015-04-16 18:07:45 +02:00
Christoph Oelckers 902593198b - wrapped all line ID accesss just like sector tags 2015-04-15 09:37:06 +02:00
Christoph Oelckers 425e5b9ffc - replaced P_FindSectorFromTag with an FSectorTagIterator class.
This is done to encapsulate the gory details of tag search in one place so that the implementation of multiple tags per sector remains contained to a few isolated spots in the code.
This also moves the special 'tag == 0 -> activate backsector' handling into the iterator class.
2015-04-14 22:39:57 +02:00
Christoph Oelckers 5fc6ff1303 - fixed: invisible 3D floors were treated as solid, not translucent when building the sorted lists, resulting in the top plane not being rendered in case of an overlap. 2015-02-10 23:01:58 +01:00
Randy Heit f76d137d33 Be less ugly when hiding warnings for using the %B formatter
- Take advantage of the new _Pragma operator to hide the printf warning
  suppression inside of macros instead of needing to litter the code
  around Printfs with a bunch of junk.
2014-12-26 18:58:59 -06:00
Christoph Oelckers d6a33a601d - fixed: The sorting of 3D floors was incomplete and missed cases where translucent volumes overlapped non-translucent ones only at their top. It also didn't account for one translucent volume being intersected by more than solid one. 2014-10-23 17:33:42 +02:00
Christoph Oelckers dd05e564cf - this needed more fixes... 2014-06-29 14:32:50 +02:00
Christoph Oelckers d0e551060d - fixed: When the 3D floor init code was updated 5 years ago for Vavoom's latest changes to its 3D-floor implementation it accidentally set the 3D-floor's alpha as its desaturation. 2014-06-29 12:50:42 +02:00
Christoph Oelckers 6e0f885135 - fixed: The 3D floor setup code treated alphas larger than 255 as translucent. This was causing problems with ZDCMP2 in GZDoom 2013-12-25 22:30:47 +01:00
Christoph Oelckers 55f637c906 - fixed: When creating colormaps for 3D floors the model sector's fade value must be used when defining a fog volume. 2013-08-09 23:40:34 +02:00
Randy Heit 4228386837 - Fixed: When P_Add3DFloor() adds the "inside" plane, it needs to copy the translucency flags
from the original plane.

SVN r4006 (trunk)
2013-01-02 03:01:03 +00:00
Randy Heit 280ca05554 - In P_SpawnMapThing(), pass the same flags to P_FindFloorCeiling() as the respawn functions do.
- Rename FFCF_3DMIDTEXRESTRICT to FF_3DRESTRICT and make it work with 3D floors too.

SVN r3562 (trunk)
2012-04-14 03:55:46 +00:00
Randy Heit f9aae72dc4 - Fixed: P_CheckFor3DFloorHit() needs to use the actor's floorz instead of its z, and
P_CheckFor3DCeilingHit() needs to use the actor's ceilingz instead of its z. These functions
  are called from P_ZMovement() when a collision with the floor or ceiling has been detected
  but before the z has been clamped. e.g. A hard fall will leave the actor's z beneath the floor
  even though it will be set to the floor after P_CheckFor3DFloorHit() returns.

SVN r3460 (trunk)
2012-03-20 03:05:33 +00:00