Commit graph

158 commits

Author SHA1 Message Date
Christoph Oelckers
229ee3dbe4 Revert "- did a few checks with the compatibility optioned slope adjustment and decided to enable it unconditionally."
This reverts commit 6636064d1f.

As it turned out this is not a benign change. It breaks accessibility to a key in RR-Route 66's slaughtr.map - and it's reasonable to assume if it breaks one map it may break others as well.
2022-11-26 16:47:02 +01:00
Christoph Oelckers
043e005363 - fixed bad index in pushmove. 2022-11-16 00:08:37 +01:00
Christoph Oelckers
42e02d2956 - eliminated firstWall as well. 2022-11-15 15:44:33 +01:00
Christoph Oelckers
7d9a4ea70d - eliminated wallsofsector. 2022-11-15 15:24:17 +01:00
Christoph Oelckers
84b17a8a53 - eliminate wall_count. 2022-11-15 14:59:28 +01:00
Christoph Oelckers
c23db8ea35 - wrapped all reads of sectortype::wallnum and renamed all other wallnum variables. 2022-11-15 12:21:21 +01:00
Mitchell Richters
7f124eef58 - Adjust chase-cam code to work in a pitch-corrected capacity. 2022-11-06 21:59:04 +11:00
Christoph Oelckers
73deae88ce - fixed neartag's trace vector maintenance for sprite hits.
The trace vector needs to be shortened so that further checks only find items in front of the sprite.
2022-11-04 13:23:01 +01:00
Christoph Oelckers
0c87bcb91b - renamed getzsofslopeptr to calcSlope and removed one redundant inline. 2022-10-30 16:51:40 +01:00
Christoph Oelckers
ce4a6fc7e3 - split off one part of clipmove into a utility function. 2022-10-30 16:51:40 +01:00
Christoph Oelckers
e3254a8546 - fixed an edge case in cansee where an actor placed directly on a two-sided wall would fail to register that wall's back sector. 2022-10-30 16:51:37 +01:00
Christoph Oelckers
14769e9b79 - reroute cliptestsector to checkOpening.
This required adding one more check for the 'precise' mode.
2022-10-30 16:51:36 +01:00
Christoph Oelckers
40271e15b3 - minor tweaks to checkOpening
mainly some extensions to let it replace cliptestsector.
2022-10-30 16:51:36 +01:00
Christoph Oelckers
2190499d63 - pushmove rewritten. 2022-10-30 16:51:36 +01:00
Christoph Oelckers
902f8c9706 - silenced lots of warnings for deliberate type conversions.
The ones in d_net.cpp are not in active code.
2022-10-30 16:51:35 +01:00
Christoph Oelckers
3c6b64d621 - renamed everything back 2022-10-30 16:51:33 +01:00
Christoph Oelckers
85b52b1c77 - removed Scale(), CopyScale() and MultScale wrappers. 2022-10-30 16:51:32 +01:00
Christoph Oelckers
51768439a9 - started removing wrappers. ScaleX() and ScaleY() done.
No manual changes in here.
2022-10-30 16:51:31 +01:00
Christoph Oelckers
520d838a8c - use Scale wrappers in global code and parts of Duke. 2022-10-30 16:51:23 +01:00
Christoph Oelckers
91c318b708 - renamed most non-sprite xrepeat and yrepeat as refactpring aid.
These will be renamed back later but now they create too much search noise.
A few local variables have been permanently renamed to scale*.
2022-10-30 16:51:20 +01:00
Christoph Oelckers
e60fafec52 - got rid of most REPEAT_SCALE factors. 2022-10-30 16:51:19 +01:00
Christoph Oelckers
8c308c8d3e - added ScaleY method to spritetype and used it to get rid of a large amount of 'yrepeat * REPEAT_SCALE' 2022-10-30 16:51:18 +01:00
Christoph Oelckers
4af4983d3e - floatified clipdist and replaced fClipdist wrapper.
This uses a new variable because a few things use clipdist as a flag byte
2022-10-30 16:51:14 +01:00
Christoph Oelckers
3577b53c4d - GetWallSpritePosition also benefits from using .dot 2022-10-30 16:51:14 +01:00
Christoph Oelckers
f1baf5c69c - use dot product for getslopeval as well 2022-10-30 16:51:13 +01:00
Christoph Oelckers
02f1f79333 - use .dot() for calculating slopes 2022-10-30 16:51:13 +01:00
Mitchell Richters
0600bf5860 - Negate everything to do with PlayerHorizon::__horiz where appropriate, including some loose horizoff members. 2022-10-30 16:51:11 +01:00
Christoph Oelckers
a4dd5bb4ce - rewrote the model storage code.
Using proper C++ containers now.
2022-10-27 16:55:54 +02:00
Christoph Oelckers
6636064d1f - did a few checks with the compatibility optioned slope adjustment and decided to enable it unconditionally.
A CVar was added to make it user-settable, but having this dramatically improves handling on slope edges.
2022-10-27 16:55:52 +02:00
Christoph Oelckers
c505da79e4 - fixed: getzrange must look a bit further for sprites affecting the current position.
This was missed when the function was rewritten because the code was too unclear about it.
2022-10-27 16:55:52 +02:00
Christoph Oelckers
8e9ddf370c - rewrote getzrange
Not using any old Build code anymore. Aside from the trivial stuff this uses code from Doom and SW instead.
2022-10-27 16:55:28 +02:00
Mitchell Richters
fc8c0b80aa - Clean up chase cam backwards scaling since we're now using floats of the same scale. 2022-10-25 07:07:14 +02:00
Mitchell Richters
3db6a38b4b - Make dragpoint() inline since its a wrapper for another function anyway. 2022-10-25 07:07:14 +02:00
Mitchell Richters
9dd27ee3a2 - Remove old integer dragpoint() interface that was used by floats in lots of places.
* Cannot wait until all the narrowing warnings can be re-enabled...
2022-10-25 07:07:14 +02:00
Christoph Oelckers
2ba68df27f - eliminate int_floorz / int_ceilingz in the backend. 2022-10-25 07:07:00 +02:00
Christoph Oelckers
5e2e53d684 - more CanMove fixes, plus salvaging the rest of the old commit.
CanMove twice uses the texel-based nRange as a Build-unit value, this caused strange problems with the initial floatification.
2022-10-25 07:06:57 +02:00
Christoph Oelckers
6b579156aa - Blood HitScan fixes
- changed target parameter of hitscan to a double to simplify its handling.
- HitScan's nRange parameter may be an int, but it is in texel units, not Build units.
2022-10-25 07:06:56 +02:00
Mitchell Richters
8d3f3c6025 - Cut over to DAngle from fixedhoriz and remove the latter. 2022-10-25 07:06:55 +02:00
Christoph Oelckers
f1514bbc52 - alternative math for slope planes in hitscan. 2022-10-22 20:41:27 +02:00
Christoph Oelckers
74cf9a2ff2 - hitscan fully rewritten.
No traces of Build code left here! :)
2022-10-22 20:41:27 +02:00
Christoph Oelckers
116ba340b2 - further hitscan overhaul.
* added floating point sprite intersect handlers for all sprite types. Hopefully this code is more understandable than Build's original variant.
* cleaned up intersectSprite a bit and moved the geometry math into the utility header.
* made some minor corrections to neartag.
* moved SW's testpointinquad to the backend because it was useful here.
2022-10-22 20:41:26 +02:00
Mitchell Richters
6ca42dc08c - Slightly clean up calcChaseCamPos(). 2022-10-22 20:41:26 +02:00
Christoph Oelckers
6dd7fac902 - eliminated the sine table and moved tilehasmodelorvoxel to a different file to delete engine.cpp. 2022-10-22 12:17:04 +02:00
Christoph Oelckers
ef2f781e09 - rewrite from scratch of neartag. 2022-10-22 12:17:04 +02:00
Christoph Oelckers
dcd4ee133b - use a simpler method to calculate the intersection point in intersectSprite and fixed the distance check. 2022-10-22 12:17:03 +02:00
Christoph Oelckers
9c564db015 - replaced try_facespr_intersect with something independently written. 2022-10-22 12:17:03 +02:00
Christoph Oelckers
28a169d02d - cansee floating point rewrite using backend utilities. 2022-10-22 12:17:02 +02:00
Christoph Oelckers
6a1ff029b7 - floatified getslopeval and all related code. 2022-10-22 12:17:00 +02:00
Christoph Oelckers
ece8663f5e - floatified calcSlope and cleaned up the get*slope interface 2022-10-22 12:17:00 +02:00
Christoph Oelckers
bd9dfadf6d - use REPEAT_SCALE ih the wall/floorsprite getter functions. 2022-10-22 12:16:57 +02:00