Commit graph

19029 commits

Author SHA1 Message Date
Mitchell Richters
293a71ed55 - Remove horizon from gi->WarpToCoords() since we don't even print the horizon in our stats. 2022-10-25 07:06:54 +02:00
Mitchell Richters
eedcfb46c6 - Convert calcviewpitch() to work with a temporary DAngle so we can eliminate the temporary tanhoriz() friend. 2022-10-25 07:06:54 +02:00
Mitchell Richters
ca8f8d6d36 - Remove all remaining q16horiz() calls, also correcting a long-standing Duke bug. 2022-10-25 07:06:54 +02:00
Mitchell Richters
8697e5f054 - Replace all q16horiz(0) calls. 2022-10-25 07:06:54 +02:00
Mitchell Richters
22a9f89b64 - Remove all uses of fixedhoriz::asq16(). 2022-10-25 07:06:54 +02:00
Mitchell Richters
06a9a7b1a7 - SW: Change all weapon recoils to work on pitch. 2022-10-25 07:06:54 +02:00
Mitchell Richters
5bf23f0642 - Develop new scaled horizon return to centre with initial return from full articulation scaled by the pitch's sine.
* When coming back from a full view pitch using the original algorithm, the initial snap-back from 90 degrees is very aggressive.
* Return to centre speed retuned to be 1:1 to the ms with the tangent at Duke/SW's clamped pitch.
2022-10-25 07:06:54 +02:00
Mitchell Richters
d923ef9a8c - Perform horizon's return to centre using pitch instead of tangent.
* Return to centre speed tuned to be 1:1 to the ms with the tangent at Duke/SW's clamped pitch.
2022-10-25 07:06:53 +02:00
Mitchell Richters
5851c0f2c6 - Clean up some q16horiz usage and how the view pitch is clamped. 2022-10-25 07:06:53 +02:00
Mitchell Richters
4ef9ec93ea - Remove fixedhoriz::asbuildf() and associated buildf friend.
* The new friend `tanhoriz()` is just for the input code for now.
2022-10-25 07:06:53 +02:00
Mitchell Richters
d8a6471680 - Add fixedhoriz::Tan() and replace most asbuildf() calls with it. 2022-10-25 07:06:53 +02:00
Mitchell Richters
f6f88f587d - SW: Consolidate random range applied to weapon vel.Z into an inline. 2022-10-25 07:06:53 +02:00
Mitchell Richters
fcdb360b92 - Add fixedhoriz::Sgn(). 2022-10-25 07:06:53 +02:00
Mitchell Richters
e4ae726015 - Rename fixedhoriz::aspitch() to Degrees() to match DAngle objects. 2022-10-25 07:06:53 +02:00
Mitchell Richters
5e11fc1a15 - Remove unused fixedhoriz methods and friends. 2022-10-25 07:06:52 +02:00
Mitchell Richters
d00108b9cf - Blood: Repair life leach turret mode where target's position and not velocity was used. 2022-10-25 07:06:52 +02:00
Mitchell Richters
ef4b72d18e - Blood: Floatify LifeLeechOperate().
* These divscales hurt my soul...
2022-10-25 07:06:52 +02:00
Christoph Oelckers
1255fda4c1 - two more functions in aibeast.cpp.
Note that the eyeHeight adjustment was removed because it was applied incorrectly and essentially non-functional.
eyeHeight is in world coordinates but was used as if it was Q24.8, resulting in a value too small to be significant.
2022-10-25 07:06:52 +02:00
Christoph Oelckers
e9fc0d09a9 - renaming things in StompSeqCallback 2022-10-25 07:06:52 +02:00
Christoph Oelckers
0ed4b8b01a - Blood: floatified SlashSeqCallback 2022-10-25 07:06:52 +02:00
Christoph Oelckers
c1da02de8a - Blood: floatified calebThinkSwimChase 2022-10-25 07:06:52 +02:00
Christoph Oelckers
c85a95ca03 - Blood: floatified cultThinkChase
Welcome to spaghetti-land, this is one 400 line monstrosity. :(
2022-10-25 07:06:52 +02:00
Christoph Oelckers
3055a1e5a7 - Blood: renamed functions and floatified cultThrowSeqCallback3 2022-10-25 07:06:52 +02:00
Christoph Oelckers
fd7c47ce2b - Blood: floatified cultThrowSeqCallback 2022-10-25 07:06:51 +02:00
Christoph Oelckers
c1e0e04016 - Blood: floatified cerberusThinkChase 2022-10-25 07:06:51 +02:00
Christoph Oelckers
79d17dc645 - floatified cerberusThinkTarget 2022-10-25 07:06:51 +02:00
Christoph Oelckers
d3c3363e92 - Blood: floatified calebThinkChase 2022-10-25 07:06:51 +02:00
Christoph Oelckers
9394691601 - Blood: floatified burnThinkGoto 2022-10-25 07:06:51 +02:00
Christoph Oelckers
3c2239533b - Blood: floatified burnThinkChase 2022-10-25 07:06:51 +02:00
Christoph Oelckers
f2f74fc239 - Blood: floatified eelThinkChase 2022-10-25 07:06:51 +02:00
Christoph Oelckers
beefa700b7 - Blood: floatified eelThinkPonder 2022-10-25 07:06:51 +02:00
Christoph Oelckers
0672a1a958 - replaced mapangle(85) with DAngle15. 2022-10-25 07:06:50 +02:00
Christoph Oelckers
2c46d66c1e - Blood: floatified beastThinkChase 2022-10-25 07:06:50 +02:00
Christoph Oelckers
105e20a32d - eliminated lots of approxDist calls.
Only the really simple ones.
2022-10-25 07:06:50 +02:00
Christoph Oelckers
dcfac1c930 - handle a few nAccel values that do not match the generic pattern 2022-10-25 07:06:50 +02:00
Christoph Oelckers
9927d5e25d - always use FrontSpeed() access function for nAccel.
This gets rid of a large amount of FixedToFloat calls.
2022-10-25 07:06:50 +02:00
Christoph Oelckers
8b96a93e80 - turned TurnRange calculation into a subfunction.
This formula was used in 36 places
2022-10-25 07:06:50 +02:00
Christoph Oelckers
e309d05161 - use literal constant for this. 2022-10-25 07:06:50 +02:00
Christoph Oelckers
6a0b552352 - floatified first half of aibat.cpp.
Note: The scale factor for actFireVector calls with XY set per ToVector is 64. The vector being passed to it uses the same scale for Z as for XY.
This means that XY is 1/16384 of the fixed point vector and Z is 1/256, meaning the scale for XY must be 64x higher.
2022-10-25 07:06:50 +02:00
Christoph Oelckers
ca58e3fc6b - the rest of ai.cpp. 2022-10-25 07:06:49 +02:00
Christoph Oelckers
48cadbd392 remaining floatification on aiLookForTarget 2022-10-25 07:06:49 +02:00
Christoph Oelckers
fafb4cfc29 - remaining floatification on aiThinkTarget 2022-10-25 07:06:49 +02:00
Christoph Oelckers
298d029d55 - found one last place where an integer wrapper was called in actor.cpp 2022-10-25 07:06:49 +02:00
Christoph Oelckers
6c98a07a60 - elininated the actSpawnThing wrapper. 2022-10-25 07:06:49 +02:00
Christoph Oelckers
f7fe24b19e - some remaining cleanup on actor.cpp 2022-10-25 07:06:49 +02:00
Christoph Oelckers
b0160bb87c - removed the int vector in actCheckExplosion. 2022-10-25 07:06:49 +02:00
Christoph Oelckers
080d6969ec - Blood: floatified some smaller parts in actor.cpp 2022-10-25 07:06:49 +02:00
Christoph Oelckers
b29000c9e1 - this wasn't really a fixed point value - just some scaling factor, so it shouldn't use FixedToFloat. 2022-10-25 07:06:48 +02:00
Christoph Oelckers
c94a361788 - deleted int_hitpos. 2022-10-25 07:06:48 +02:00
Christoph Oelckers
0ef9527209 - eliminated the last uses of int_hitpos. 2022-10-25 07:06:48 +02:00