Commit graph

70 commits

Author SHA1 Message Date
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
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
Randy Heit
1bda16cc45 - Use side_t::RightSide in IterFindPolySides() instead of the SideListHead array.
SVN r2461 (trunk)
2010-07-25 21:38:34 +00:00
Christoph Oelckers
4ac64b6df7 - merged polyobject branch into trunk and made some adjustments for savegame compatibility.
SVN r2448 (trunk)
2010-07-23 05:56:25 +00:00
Christoph Oelckers
6c4d070095 - restored original Doom behavior for hitscans to only check actors which have their center in the blockmap cells being checked, compatibility optioned by COMPATF_HITSCAN.
SVN r2341 (trunk)
2010-05-28 21:07:45 +00:00
Christoph Oelckers
635759ee2c - fixed: UpdateSegBBox only used the first seg of a linedef to calculate the linedef's bounding box.
SVN r2210 (trunk)
2010-03-14 15:17:36 +00:00
Christoph Oelckers
92b8ac26c0 - fixed: Polyobjects could contain segs that weren't flagged as such.
SVN r2081 (trunk)
2010-01-02 13:17:47 +00:00
Christoph Oelckers
a4f4994e18 - re-fixed polyobject CheckSwitchRange so that it doesn't have to alter the polyobject's linedefs.
SVN r1954 (trunk)
2009-10-30 07:03:26 +00:00
Randy Heit
321ab2f686 - Make TranslateToStartSpot() set the new sector references for a polyobj's
walls so that P_CheckSwitchRange() will work with them.


SVN r1951 (trunk)
2009-10-30 03:29:15 +00:00
Randy Heit
750659a82e - Added new sound sequence ACS functions:
SoundSequenceOnActor(int tid, string seqname);
    SoundSequenceOnSector(int tag, string seqname, int location);
    SoundSequenceOnPolyobj(int polynum, string seqname);
  SoundSequenceOnSector takes an extra parameter that specifies where in the
  sector the sound comes from (floor, ceiling, interior, or all of it). See
  the SECSEQ defines in zdefs.acs.


SVN r1939 (trunk)
2009-10-27 02:43:00 +00:00
Randy Heit
e4af82ae96 - Enough with this "momentum" garbage. What Doom calls "momentum" is really
velocity, and now it's known as such. The actor variables momx/momy/momz
  are now known as velx/vely/velz, and the ACS functions GetActorMomX/Y/Z
  are now known as GetActorVelX/Y/Z. For compatibility, momx/momy/momz will
  continue to work as aliases from DECORATE. The ACS functions, however,
  require you to use the new name, since they never saw an official release
  yet.


SVN r1689 (trunk)
2009-06-30 20:57:51 +00:00
Christoph Oelckers
eb52c9a90e - Added ACS GetChar function.
- Added Gez's submission for polyobjects being able to crush corpses but made
  it an explicit MAPINFO option only.


SVN r1585 (trunk)
2009-05-15 17:21:45 +00:00