Commit Graph

254 Commits

Author SHA1 Message Date
Christoph Oelckers 217414cb1c -floatified P_ExplodeMissile and P_XYMovement 2016-03-28 00:55:57 +02:00
Christoph Oelckers 7b256dda3d - did the last remaining bits in p_map.cpp. 2016-03-27 22:49:59 +02:00
Christoph Oelckers 8b4a33794a - floatified P_ChangeSector. 2016-03-27 22:35:58 +02:00
Christoph Oelckers 0baaa3cf63 - floatified P_LineAttack, P_TraceBleed and P_UseLines. 2016-03-27 20:58:01 +02:00
Christoph Oelckers 23d311dd04 - floatified P_CheckSlopeWalk. It should be noted that this function is one place where full double precision is too high and needed to be truncated. 2016-03-27 14:07:35 +02:00
Christoph Oelckers 26ff2f73d7 - floatified P_TryMove and the sliding and bouncing code. 2016-03-27 13:29:58 +02:00
Christoph Oelckers 1877eca2ab - more floatification of p_map, plus some stuff used in those functions. 2016-03-27 01:06:54 +01:00
Christoph Oelckers 6e93264016 - started floatification on p_map.cpp. 2016-03-26 23:19:38 +01: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 e42b0171b3 - floatification of bot code. 2016-03-26 00:34:56 +01:00
Christoph Oelckers 21340c6eba - floatified the rest of thingdef_codeptr.cpp and got rid of the remaining fixed_t and angle_t parameters in VM-accessed function. The VM should now be free of those types completely. 2016-03-25 12:57:22 +01:00
Christoph Oelckers f76524f459 - some cleanup on P_RailAttack plus a bit of parameter floatification in thingdef_codeptr.cpp 2016-03-25 00:59:14 +01:00
Christoph Oelckers 7a26318bf0 - floatified friction. 2016-03-24 22:50:03 +01:00
Christoph Oelckers 2dbd79cc8d - floatified the return data from Trace(). 2016-03-23 18:07:04 +01:00
Christoph Oelckers 7c87479eea - parameter rework of several spawning functions. 2016-03-23 13:31:12 +01:00
Christoph Oelckers f8cf4bcf3d - trimmed down the AActor Spawn interface and removed all non-float variants.
This still needs some cleanup in a few calling functions.
2016-03-23 10:42:41 +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 cf79e1cb6d - fixed some leftover fixed point remnants in g_hexen.
- made the full-coordinate version of P_SpawnPlayerMissile use float coordinates.
2016-03-22 00:30:56 +01:00
Christoph Oelckers c830801da3 - g_hexen almost done except for 3 things that require more extensive changes. 2016-03-21 22:20:10 +01:00
Christoph Oelckers f1602882c8 - added a no-parameter Spawn function for inventory items that never show on the map, because the coordinate and replacement parameters will always be 0 for them.
- started converting g_hexen.

Most importantly this removes CHolyWeave as it is just a specialized version of A_Weave with far more convoluted use of parameters.
2016-03-21 14:00:05 +01:00
Christoph Oelckers 8362c6a856 - conversion of floorz to double. 2016-03-20 19:52:35 +01:00
Christoph Oelckers b81080ce08 - converted most of g_heretic to float. 2016-03-20 16:51:42 +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 ec58e70078 - replaced ceilingz with a floating point variable, also in FCheckPosition. 2016-03-20 13:32:53 +01:00
Christoph Oelckers 5875e91f39 - finished conversion of most of g_doom.
Only things left here are accesses to AActor::ceilingz and radius in A_PainShootSkull, plus scaleX and scaleY in the ScriptedMarine sprite setting code.
Most is still using wrapper functions around the fixed point versions.
2016-03-20 10:52:10 +01:00
Christoph Oelckers a4f5846c7c - replaced all uses of P_ThrustMobj with the already implemented AActor::Thrust method and deleted this function.
- for quakes, making a distinction between circular and elliptic thrust is pointless, so the checks were removed and both paths consolidated. The elliptic code will do exactly the same for circles and there isn't even a performance difference.
2016-03-20 01:25:47 +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 f332a098cd - reworked calls to P_SpawnPlayerMissile, P_AimLineAttack and P_LineAttack to use floating point angles. 2016-03-18 00:43:05 +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 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 3c25b2c066 - some redesign of P_CheckSight to handle portals.
Portal stuff not tested yet.
2016-03-07 21:59:32 +01:00
Christoph Oelckers 5175d56129 - made adjustments to P_LineAttack and P_RailAttack to deal with altered angles by passing through a non-parallel portal.
- fixed: P_FindFloorCeiling set the floorsector for a new ceilingheight.

Note: P_DrawRailTrail still needs to be changed, at the moment rail trails through portals will not work correctly.
2016-03-06 21:58:36 +01:00
Christoph Oelckers 90553bb61c - deal with portals in P_AimCamera.
This will most likely need some more testing and refining but at least it should work through line portals now.
2016-03-06 13:10:42 +01:00
Christoph Oelckers f5fd0df077 - made P_AimLineAttack work through sector portals.
Note: Test output not removed yet!
2016-03-02 20:44:02 +01:00
Randy Heit 55142078d8 Normalize line endings 2016-03-01 09:47:10 -06:00
Christoph Oelckers b4a002a07f - preparations for allowing hitscans through portals.
To allow processing the hit through an arbitrary portal without reference to the portal group table, P_AimLineAttack and P_LineAttack need to pass some more info than just the linetarget.
We need the relative positions of shooter and target within the visual reference of the other to calculate proper angles and we need to know if such a portal was crossed at all, because a few things, e.g. seeker missiles won't work with them.

- fixed setup of target acquisition for the Mage Staff.

The pre-acquired seeker target was never passed to the spawned projectiles.
2016-03-01 16:39:31 +01:00
Christoph Oelckers 8d58d63b60 - implemented line portal transition. Not yet tested for arbitrary portals but for static ones it is working - including camera interpolation. 2016-02-27 01:23:43 +01:00
Christoph Oelckers 730145d1fc - more transition to FMultiBlock* iterators:
* removed all code for dealing with z-displacing portals in the iterator loops. This would cause too many problems so I decided to scrap any provisions for allowing interactive portals with z-displacement. They will remain restricted to pure teleporter portals.
 * changed spechit to carry a position along with the special line. If something is activated through an interactive portal this is needed to calculate movement.
 * pass the abovementioned position to CheckForPushSpecial.
 * collect touched portal lines in a second array analogous to spechit.
 * use FMultiBlockThingsIterator in P_TestMobjZ.
2016-02-22 12:05:38 +01:00
Christoph Oelckers ca2fc47fa3 - refactoring of PIT_CheckThing. 2016-02-22 12:05:37 +01:00
Christoph Oelckers 02d7572343 - some header dependency cleanup so that it is no longer needed to include portal.h to get the inline functions. Portal.h has been reduced of most dependencies now so that including it is cheap and can be done in other headers.
- some consolidation in p_map.cpp. PIT_CheckLine and PIT_FindFloorCeiling had quite a bit of redundancy which has been merged.
- Ĩontinued work on FMultiBlockLinesIterator. It's still not completely finished.
2016-02-19 14:08:41 +01:00
Christoph Oelckers 1b88052bba - started refactoring ZatPoint calls which need to be portal aware.
To summarize, anything that just works with map geometry doesn't need to bother, as does the renderer. (i.e. nearly all r_* files, p_floor.cpp, p_ceiling.cpp et.al)
But all calls that are somehow related to actor positions need to be made aware of potential portal transitions:

 * added FloorAtPoint, CeilingAtPoint and PlaneAtPoint methods to sector_t, which can be used to calculate a plane's height with relation to a given actor, even if that actor is on the other side of a portal.
 * added HighestCeilingAt and LowestFloorAt methods which traverse all ceiling/floor portals until they find an impassable plane.
2016-02-16 16:40:53 +01:00
Christoph Oelckers f24bf7e622 - separated FCheckPosition and its FPortalGroupTable substructure into its own header because this was creating too many dependencies on other headers with FCheckPosition in p_local.h and FPortalGroupTable in portals.h. 2016-02-15 13:40:31 +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
MajorCooke 35b7a5ccc1 Updated for scripting branch merge. 2016-02-04 22:41:02 -06:00
Randy Heit b3b0886b64 Merge branch 'scripting'
Conflicts:
	src/actor.h
	src/g_doom/a_doomweaps.cpp
	src/g_hexen/a_blastradius.cpp
	src/p_enemy.cpp
	src/p_enemy.h
	src/thingdef/thingdef.h
	src/thingdef/thingdef_codeptr.cpp
	wadsrc/static/actors/constants.txt
2016-02-04 15:17:22 -06:00
MajorCooke a1c1de9edb Fixed merge conflicts. 2016-02-02 18:26:20 -06:00
Christoph Oelckers 46024398fe - fixed: Change FCheckPosition::LastRipped to a TMap so that it can track multiple overlapping actors being ripped during the same tic. 2016-01-30 22:06:04 +01:00
Randy Heit 87dee5c611 Fixed: Co-op players could spawn at (0,0) if no start spots for them
- Check if a co-op start exists. If not, pick one at random.
- Don't telefrag other players when spawning in co-op games, since
  you're allowed to move out of other players now.
2016-01-28 20:08:09 -06:00
Edward Richardson e5c67cee83 Merge branch conflicts fix
- CONFLICT (content): Merge conflict in src/p_acs.cpp
- Updated position variables
2016-01-21 10:49:57 +13:00
Christoph Oelckers b73e1e65f5 Merge branch 'master' into scripting
Conflicts:
	src/actor.h
	src/p_local.h
	src/thingdef/thingdef_codeptr.cpp
2016-01-19 20:17:34 +01:00