Commit graph

6640 commits

Author SHA1 Message Date
Christoph Oelckers
0c37a90e32 - moved the initial 3D floor check from Trace to TraceTraverse, because that's where it will be needed for handling portals. 2016-03-04 01:13:17 +01:00
Christoph Oelckers
9f805daa73 - added missing handling of ALF_PORTALRESTRICT flag. 2016-03-04 01:13:16 +01:00
Christoph Oelckers
81b634a798 - preparation for making Trace portal aware: Added a new flag Trace_PortalRestrict, so that I could disable portals without static offset for P_LinePickActor and A_CheckLOF, because both depend on the target info being retainable which requires a static offset. 2016-03-04 01:13:16 +01:00
Randy Heit
3c2ed52442 Fix 21:9 base width and height values 2016-03-03 18:00:06 -06:00
Randy Heit
16d8af6b77 Add some 21:9 resolutions 2016-03-03 17:59:55 -06:00
Randy Heit
79f0714341 Update ratios[] tables for SDL and Cocoa 2016-03-03 17:32:30 -06:00
Michael Labbe
a28c8091fc UI support for 21:9
- Can specify aspect ratio 21:9 in video menu
 - menu_screenratios cvar can now force 21:9
2016-03-03 17:31:12 -06:00
Michael Labbe
a4705c8404 vid_listmodes crash fix 2016-03-03 17:31:12 -06:00
Michael Labbe
3ac4968218 Slightly improve 21:9 ar 2016-03-03 17:31:12 -06:00
Michael Labbe
afb1d438c2 21:9 fix for black bars overlapping fullscreen images 2016-03-03 17:31:12 -06:00
Michael Labbe
73c7e51391 fix: 21:9 AR stretching in intermission, end level screens 2016-03-03 17:31:12 -06:00
Michael Labbe
97821a3036 21:9 aspect ratio support
- vid_aspect 6 forces 21:9
2016-03-03 17:31:12 -06:00
Randy Heit
e3d35f4fe8 PClassPointer should use its own type as the metatype in the type table
- I don't remember why I thought using PPointer as the metatype for
  PClassPointer would be preferable, but it means that PPointer's MatchID
  can potentially be called for PClassPointer entries.
2016-03-03 17:31:01 -06:00
Randy Heit
6d68f69674 Use lambdas for more concise code 2016-03-03 13:27:52 -06:00
Christoph Oelckers
2587e82a67 . removed some redundant computation of a trace's hit position. 2016-03-03 16:15:42 +01:00
Christoph Oelckers
b8abafb486 - disabled all the debug messages in P_AimLineAttack but left them in with a CVAR check so that the debug output can be reenabled, should some problem require it in the future. 2016-03-03 13:31:21 +01:00
Christoph Oelckers
ec258c9588 - redid P_ClipLineToPortal with revised visibility rules:
* any line completely parallel to the portal is rejected
 * any line with one end on the same straight line than the portal is solely decided by the other vertex.
 * any line with both ends behind the portal cannot be visible inside, so there's no need to check for an intersection with the view range.
 * due to the above P_IntersectLines could be removed as it was redundant.
 * for any line that does intersect with the portal straight, do a reverse check: If both ends of the portal lie on the other side of the line than the viewpoint, the line is between viewpoint and portal and needs to be rejected.

This fixes nearly all the phantom wall glitches in the demo map.
2016-03-03 13:07:11 +01:00
Christoph Oelckers
14a0567343 - optimized the portal translation functions by precalculating the rotation angle, sine and cosine. 2016-03-03 11:58:04 +01:00
Christoph Oelckers
ede07f93b2 - fixed: Failure to open bots.cfg would throw an exception that prevented the level from starting. Catch it in FCajunMaster::LoadBots instead and handle it non-disruptively. 2016-03-03 11:11:25 +01:00
Christoph Oelckers
74c326e9b2 - fixed: An option value with an invalid value type would eat all key events when being selected. 2016-03-03 10:52:56 +01:00
Christoph Oelckers
4d2b9fbe1b - don't freeze if the menu item search can't find anything selectable. 2016-03-03 10:47:11 +01:00
Christoph Oelckers
d8c009bb41 - fixed: A_Blast read the blast radius as an int, but used it as fixed_t. Also changed the definition of this parameter to float. 2016-03-03 10:23:04 +01:00
MaxED
81a5273b58 Added "Miscellaneous Options" -> "Save/Load confirmation" option (defaults to true). When disabled, confirmation dialog won't be shown when performing quicksave/quickload. 2016-03-03 09:59:26 +01:00
MajorCooke
59ad6206de Added CBF_NOACTORS to A_CheckBlock.
- Self explanatory, doesn't count actors as blocking them.
2016-03-02 20:35:54 -06:00
MajorCooke
7f672039bf Cleanup. 2016-03-03 02:58:44 +01:00
MajorCooke
fb3769a730 Added offsetforward to A_CheckLOF.
- offsetforward is to A_SpawnItemEx's x offset property, just like offsetwidth is to y offset.
2016-03-03 02:58:43 +01:00
Christoph Oelckers
90cad80422 - fixed some issues with FPathTraverse:
* when starting directly on a blockline the trace was offset by one map unit. Do this only for the internal block trace calculations but not for the variable that's being exposed to the outside because in rare situations that can create incorrect values.
 * using startfrac could lead to an actor whose inside was right at that positon to be missed.
 * when using startfrac the adjusted trace start was not used for all calculations, which could cause the trace to fail.

With these issues fixed, P_AimLineAttack can now successfully navigate line portals.
2016-03-03 02:50:48 +01:00
Christoph Oelckers
6b1485a89f - refactored those unwieldy intercept position calculations into a subfunction. 2016-03-03 02:50:47 +01:00
Christoph Oelckers
4b23a1c0c7 - added handling for line portals to P_AimLineAttack. 2016-03-03 02:50:45 +01:00
Christoph Oelckers
63d838c0a7 - fixed: P_CollectConnectedGroups could crash when being called before P_FinalizePortals.
- fixed: Entering a sector portal did not properly set up the starting sector of the cloned trace.
2016-03-03 02:50:44 +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
c160121f45 Add float casts to DECORATE for the sake of completeness 2016-03-01 11:36:15 -06:00
Randy Heit
55142078d8 Normalize line endings 2016-03-01 09:47:10 -06:00
Randy Heit
165d26baa1 Add .gitattributes 2016-03-01 09:45:09 -06:00
Randy Heit
8b5137461f Add a couple more directories to .gitignore 2016-03-01 09:44:53 -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
Randy Heit
a16f92c508 Convert "lump" names from directories to lowercase
- Zip and 7z already do this. Directories should too.
2016-03-01 08:49:43 -06:00
Christoph Oelckers
44a6cafd4b - we are using C++11 now, so all those old VC 2005 project files are of no use anymore. 2016-03-01 09:38:49 +01:00
Randy Heit
7c9fd12fc0 Don't generate code to call DECORATE cast functions
- All the cast functions do is return their parameter, so skip the
  function call and use the parameter directly.
2016-02-29 22:26:05 -06:00
Randy Heit
92f74634d6 Remove FxParameter and use a single function instead 2016-02-29 22:08:06 -06:00
Randy Heit
fb8d8dc775 Remove "state" from "Invalid state parameter" error message
- It's confusing to see this from inside an anonymous function. Actually,
  maybe it should be reworded altogether?
2016-02-29 21:44:12 -06:00
Randy Heit
cb1d9597f2 Allow if {} else if {} with DECORATE
This is as opposed to `if {} else { if {} }`, which is what was required
previously to express the same construct.
2016-02-29 21:40:10 -06:00
Randy Heit
f23c0121c5 Use new type system with DECORATE 2016-02-29 21:11:59 -06:00
Christoph Oelckers
15b6c11748 - did some cleanup on FPathTraverse::PortalRelocate. 2016-03-01 02:06:31 +01:00
Christoph Oelckers
5e7ecb3c44 - hm. I thouggr thia has been saved before committing. 2016-03-01 01:53:09 +01:00
Christoph Oelckers
2584108200 - removed the one-sided line portals on polyobjects only limitation. Using Eternity's polyportal testmap shows that it expects one-sided crossable portals on non-polyobject walls.
- converted the P_TranslatePortal* functions to use floating point trigonometry. The combination of R_PointToAngle and finesine even created discrepancies with perfectly parallel portals which is just not acceptable.
- added a function to FPathTraverse to relocate the trace and restart from the new position.
- made P_UseLines portal aware. Traversal through line portals is complete (all types, even teleporters), whether sector portals need better treatment remains to be seen - at the moment it only checks the range at the player's vertical center.
2016-03-01 01:36:36 +01:00
Christoph Oelckers
6bcaa51968 - updates eternity.xlat. 2016-02-29 21:40:37 +01:00
Christoph Oelckers
0c7aea88db - made particles portal-aware. 2016-02-29 16:40:28 +01:00
Christoph Oelckers
07771bd56e - changed parameter of P_GetOffsetPosition to a simple coordinate so that it can be used for other things than actors. 2016-02-29 16:29:51 +01:00
Christoph Oelckers
38c1b8588c - made spawning of teleport fog portal aware. 2016-02-29 16:21:05 +01:00