Commit graph

5869 commits

Author SHA1 Message Date
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
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
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
alexey.lysiuk
2b74ee1eef Fixed assertion failure caused by a missing class to spawn
This fixes debugging troubles with states that have action functions like A_SpawnItem("MissingClass")
2016-02-29 12:54:30 +01:00
Christoph Oelckers
2321c9973f - fixed some serious efficiency problems with clipping masked geometry against portals.
The function to do the work scanned the full list of drawsegs to find portals, which with a large amount of masked geometry and/or drawsegs could become extremely slow.
Changed it so that R_DrawMasked collects all portal related drawsegs up front so that the actual clipping code can
 a) scan a far shorter list and
 b) can skip half of the validation.

Also using P_PointOnLinePrecise to shave off a small bit of additional time.
2016-02-29 12:39:03 +01:00
Christoph Oelckers
0cf9cae7f3 - added some #pragma warnings to i_crash.cpp to silence a warning message in Microsoft's headers. 2016-02-29 10:48:51 +01:00
Christoph Oelckers
6c37ab2310 - changed: If the IWAD contains a MENUDEF lump the one in zdoom.pk3 should not print texture warnings.
The reason is that in such a case it is very likely that the IWAD defines its own menu and will most likely not provide all assets for the base definitions. See 'Adventures of Square' for an example.
2016-02-29 10:45:14 +01:00
Christoph Oelckers
7242a0ef94 - fixed: Rendering 2-sided walls with 3D floor light effects had the 'is3dfloor' flag of GetLightLevel inverted. 2016-02-29 10:26:07 +01:00
Christoph Oelckers
fadc7de636 - added a sight check to A_Blast for cross-portal effects. 2016-02-29 01:36:39 +01:00
alexey.lysiuk
0822485593 Used ISO Latin 1 encoding for text in startup window on OS X
Attempts to output errors with bad characters encountered during text lumps parsing were failed miserably because of UTF-8 conversion
Example: loading of GZ-Models-r16.pk3 with GZDoom caused 'NSConcreteAttributedString initWithString:: nil value' exception
2016-02-28 23:15:23 +01:00
alexey.lysiuk
243f59d96d Made sure that the last text line is always visible in OS X startup window
These case are handled specifically:
* When waiting for clients or host to join
* When showing a fatal error
2016-02-28 23:15:22 +01:00
alexey.lysiuk
067b421f39 Fixed default width of progress bar in OS X startup window
If window was resized before progress bar appears it will have hardcoded and so incorrect width
2016-02-28 23:15:21 +01:00
alexey.lysiuk
64f80456ad Initialized scroll view with the same rectangle as other controls in OS X startup window 2016-02-28 23:15:20 +01:00
alexey.lysiuk
145b7be0a1 Fixed particular slowdown in OS X startup window
During loading of .pk3 that stores hundred of .wad's significant amount of time were spent on scrolling text to the last line
The same applies to other cases like output of thousands warnings/errors
2016-02-28 23:15:19 +01:00
alexey.lysiuk
c687394f72 Added generic way to do periodic updates of OS X startup window
It's used to avoid updating of window (progress bar in particular) too often
Most of time were spent on UI events processing but not on data loading
2016-02-28 23:15:18 +01:00
alexey.lysiuk
0fba6563c7 Disabled fullscreen mode for OS X startup window
There is no use for auxiliary fullscreen window because it behaves really weird
2016-02-28 23:15:17 +01:00
Christoph Oelckers
d4f87203bd - added portal awareness to several functions.
* Arch-Vile resurrection
 * Boom point pushers (due to complete lack of z-handling only for line portals.)
 * A_RadiusGive

These also require a more thorough collection of portal groups than simple position checks.
2016-02-28 23:08:32 +01:00
Christoph Oelckers
8be690fbf2 - fixed type truncation warning. 2016-02-28 21:16:16 +01:00
Christoph Oelckers
27ac207f4c - added oortal handlong to P_RecursiveSound. 2016-02-28 18:03:42 +01:00
Christoph Oelckers
4bb0ca5889 - consolidated some nearly identical code repetitions in Hexen's attack functions. 2016-02-28 16:06:48 +01:00
Christoph Oelckers
c390b98966 - fixed: Not all paths in A_CStaffCheck did proper checks on the player's health. 2016-02-28 15:14:05 +01:00
Christoph Oelckers
94f37bde30 - Forgot changing two comparisons when cleaning up the if statement in FindRefPoint. 2016-02-28 14:03:57 +01:00
Christoph Oelckers
e9fa53c54d - fixed dropoff calculation over portals.
It can easily happen that the lower sector has no lines below the checked area, in which case it would not set the dropoffz correctly. To prevent this, P_LineOpening must, when it checks the opening over a sector portal, actually calculate the dropoff to the lower portal itself by calling sector_t::NextLowestPointAt. It also means that FindRefPoint must calculate a proper reference point when one side of the line to be checked is part of a floor portal.
2016-02-28 13:59:15 +01:00
Christoph Oelckers
b0f1e9b8f3 - fixed typo in portal blockmap code. 2016-02-28 12:16:58 +01:00
Christoph Oelckers
9e3bde0913 - fixed: invisible line within a portal could affect floor height checks in P_CheckPosition. 2016-02-28 12:14:37 +01:00