Commit Graph

80 Commits

Author SHA1 Message Date
Christoph Oelckers a99ebc2356 - floatified p_sight.cpp. 2016-03-28 16:22:21 +02:00
Christoph Oelckers 26ff2f73d7 - floatified P_TryMove and the sliding and bouncing code. 2016-03-27 13:29:58 +02:00
Christoph Oelckers fb8e03d5eb - floatified FLineOpening.
- some smaller fixes.
2016-03-25 18:43:37 +01:00
Christoph Oelckers 8362c6a856 - conversion of floorz to double. 2016-03-20 19:52:35 +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 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 aa09cbdada - renamed some functions and fixed a few more conversion errors. 2016-03-17 00:07:37 +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
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
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 161d03231a - added custom math routines for reliability. 2016-03-11 15:45:47 +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 55142078d8 Normalize line endings 2016-03-01 09:47:10 -06: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 7ea3e49332 - refactored p_mobj.cpp and the first half of p_map.cpp. 2016-01-20 01:48:57 +01:00
Christoph Oelckers 87689d3ba6 - global search&replace of ZatPoint calls with commonly named actor variables. 2016-01-17 14:08:20 +01:00
Christoph Oelckers 867b7767ef - ignore COMPAT_POINTONSIDE in a few places where the side effects of the old P_PointOn*Side functions are either not needed or problematic:
* the sight checking code needs to be as precise as possible and should not depend on some old semi-broken routines. (This is more a precision issue of these routines - P_PointOnDivlineSide removes the lower 8 bits of each value - than having an issue with returning the wrong side in some cases.)
 * for slope creations it is flat out wrong to use the old routines at all.
 * also ignore this in the modern (box-shaped) case of FPathTraverse::AddLineIntercepts. This functionality is new to ZDoom and therefore not subject to compatibility concerns.
 * the line-to-line teleporter. It seems the hideous fudging code was just there to work around the design issues of these functions, so let's better not ever call them here in the first place.
 * A_PainShootSkull: Its usage here does not depend on these issues.
 * P_ExplodeMissile: New code exclusive to ZDoom.
 * FPolyObj::CheckMobjBlocking

All occurences in p_map.cpp have been left alone although most of them probably won't need the compatibility option either.
2016-01-15 12:56:27 +01:00
Randy Heit a43f5a8eca Remove now unused variable from SpawnPolyobj 2016-01-08 20:08:06 -06:00
Christoph Oelckers cf564c60c2 - simplified setup of polyobjects defined from explicit lines
The old method had a problem with missing order numbers and aborted the level load and made many assumptions that no longer apply with BSP based polyobject rendering.
2016-01-09 01:23:00 +01:00
Christoph Oelckers 51591d10b0 - handle slope things through new definition tables as well. Since these get processed outside P_SpawnMapThing it required some restructuring so that the actual spawn data is present when slope things get processed.
- removed FMapThing::Serialize because it isn't used anywhere - it was rather broken anyway.
2015-04-04 10:25:01 +02:00
Christoph Oelckers 9e5bf38123 - handle all special mapthing items (player starts, polyobj spots) via the new MAPINFO method instead of hard coding them in the spawn function.
(Note: The buildmap loading code should be adjusted to the new functionality as well eventually.)
2015-04-03 21:17:10 +02:00
Edoardo Prezioso 60b735dc60 Remove redundant code in polydoor swing code.
'Perpetual' check does not make sense for poly doors.
2015-02-07 15:03:16 +01:00
Edoardo Prezioso 78b4cbdf6c - Fixed a very old issue with rotating polydoors.
This happened when the polydoor was open. If a mobj blocked the poly door, such that the door could not move from its open position, the poly door could rotate a little bit more than needed, making the door partially closing when the door managed to close later.
2015-01-26 02:20:54 +01:00
Christoph Oelckers 6fd70ff320 - fixed: Trying to rotate a polyobject into its actual position during loading of a savegame still inflicted damage on all touching actors - including incomplete player pawns - and also got blocked by them.
Similar code already existed for the MovePolyobj function but apparently was overlooked here.
2014-12-25 18:46:50 +01:00
Randy Heit 4cf468452c Remove slopetype from line_t.
- Recomputing it in the only two places where it's used is trivial, so
  it's basically a waste of space to precompute it.
2014-07-31 19:15:08 -05:00
Randy Heit eb3f243fc8 - Make a copy of the polyobject mirror number instead of relying on being able to read it from the initial linedef. 2013-06-22 22:40:17 -05:00
Randy Heit c6dd658aa8 - Fixed: Polyobjs that rotated faster than their distance would overshoot on their first tic and
continue spinning until the next time around because the check for moving too fast was only
  done after the polyobject had been rotated once.
- Reduced the potential for overflow when setting up the speed of a rotating polyobj.

SVN r4332 (trunk)
2013-06-06 20:08:56 +00:00
Randy Heit cb41771342 - When moving polyobjects, recalculate the floors and ceilings for the actors in their bounding boxes. (See http://forum.zdoom.org/viewtopic.php?f=2&t=35616)
SVN r4192 (trunk)
2013-03-21 02:07:42 +00:00
Randy Heit 549712e719 - P_DamageMobj() now returns the amount of damage actually done so that the bleed functions
can perform based on the amount of damage actually taken after all modifications are done to
  it. However, if the damage is canceled away, blood will still spawn for the original damage
  amount rather than the modified amount.

SVN r4012 (trunk)
2013-01-02 04:39:59 +00:00
Braden Obrzut 60dc67d5c3 - Fixed: Polyobjects must be blocking where an object is below the reference sector floor or above the reference sector ceiling.
- Fixed: 3DMidTexture polyobjects had open.top and open.bottom reversed.

SVN r3633 (trunk)
2012-05-08 19:55:26 +00:00
Randy Heit c445f684fc - Fixed: In P_LineOpening_3dMidtex(), set the floorpic or ceilingpic to the 3D midtex if it
alters the opening. This fixes things such as removing a projectile when it hits a 3D midtex
  instead of exploding it because the real floor or ceiling is sky.

SVN r3490 (trunk)
2012-03-29 05:09:56 +00:00
Randy Heit cfd5b84535 - Replace >>MAPBLOCKSHIFT with GetSafeBlockX/GetSafeBlockY from Mocha Doom.
SVN r3486 (trunk)
2012-03-28 03:49:38 +00:00
Randy Heit 676ce338b1 - Fixed: The game would lockup when using the override polyobject specials with cyclical chains
of mirrored polyobjects. Fixing this has also removed lots of duplicated code for mirrored
  polyobjects.

SVN r3400 (trunk)
2012-03-02 02:23:37 +00:00
Randy Heit f6c1c0e2df - Truncate rotating polyobjects to 7 bits of fractional precision per vertex.
Fixes known cases of freezing.

SVN r3399 (trunk)
2012-02-28 03:05:31 +00:00
Randy Heit d2c8a86bb4 - Fixed: CheckMobjBlocking() did not consider one-sided lines without the ML_BLOCKING flag to be blocking.
SVN r3353 (trunk)
2012-02-11 01:17:09 +00:00
Braden Obrzut cffae9c33c - Applied Thomas's patch to fix physics with non-solid polyobjs, but adjusted it to work with 3D mid textures as well (at least as well as I could).
SVN r3320 (trunk)
2011-11-25 21:49:03 +00:00
Randy Heit 7714ee3ffd - Fix more errors found with static code analysis.
SVN r3288 (trunk)
2011-09-01 22:57:49 +00:00
Christoph Oelckers f08188b0e5 - removed unneeded includes of r_local.h.
SVN r3261 (trunk)
2011-07-06 18:12:16 +00:00
Christoph Oelckers 463c276014 - removed more r_ header dependencies from the rest of the code.
SVN r3260 (trunk)
2011-07-06 15:31:05 +00:00
Christoph Oelckers 163301dcd5 - took all includes of farchive.h out of headers. This file will have to be included explicitly in each source file that needs it.
SVN r3259 (trunk)
2011-07-06 14:20:54 +00:00
Christoph Oelckers fbff5ca932 - moved r_interpolate.cpp and r_translate.cpp to r_data.
- merged r_jpeg.h into jpegtexture.cpp because that's the only place where it's ever used.


SVN r3255 (trunk)
2011-07-06 08:50:15 +00:00
Christoph Oelckers 4e1a514455 - fixed: Subsectors which are the origin of polyobjects should not be drawn on the textured automap because the vertices no longer are where they'd be expected to be.
SVN r2622 (trunk)
2010-08-28 16:51:41 +00:00
Christoph Oelckers 5647fed0cf - fixed: armor factor application was done wrong.
- fixed: APROP_Invulnerable could only be set and unset but not checked.
- fixed: Two sided polyobjects applied thrust to sctors in a way that did not work.


SVN r2620 (trunk)
2010-08-28 12:57:23 +00:00
Christoph Oelckers 9a4abe0915 - merged automap branch into trunk.
SVN r2609 (trunk)
2010-08-27 15:20:05 +00:00
Christoph Oelckers 66f6115c86 - added a compatibility option to render all segs of a polyobject in the center's subsector and automatically set it for Hexen MAP36 and HEXDD MAP47.
SVN r2543 (trunk)
2010-08-15 10:02:10 +00:00
Christoph Oelckers 482d7631f4 - sorted zspecials.acs properly so one can find all the specials.
- added Polyobj_MoveToSpot action specials. They are functionally identical to Polyobj_MoveTo but get the target coordinate from a map spot instead.


SVN r2503 (trunk)
2010-08-10 19:06:33 +00:00
Randy Heit fc6e48dd3f - Fixed: FPolyObj::LinkPolyobj() did not add the polyobject's first side to the polyobject's
bounding box. It should also add both vertices from each side, since non-closed polyobjects
  are possible with PolyObj_ExplicitLine.

SVN r2485 (trunk)
2010-08-01 19:50:41 +00:00
Randy Heit b9ea9a415e - Added Polyobj_MoveTo, Polyobj_OR_MoveTo, and Polyobj_Stop.
- Cleaned up a couple of warnings.

SVN r2483 (trunk)
2010-08-01 19:14:10 +00:00
Randy Heit 58269a18f0 - Use a flood-fill algorithm to define polyobjects with PolyObj_StartLine instead of a simple
loop-following algorithm. This fixes the polyobjects in http://www.doomworld.com/idgames/index.php?id=6291

SVN r2482 (trunk)
2010-08-01 05:16:09 +00:00
Randy Heit 677d07f837 - Merge BSP-able polyobjects back into the trunk.
SVN r2480 (trunk)
2010-08-01 02:41:56 +00:00