Commit graph

5619 commits

Author SHA1 Message Date
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
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
0ef9527209 - eliminated the last uses of int_hitpos. 2022-10-25 07:06:48 +02:00
Christoph Oelckers
a655b3835f - like actFireVector, the direction vector needs to have unit length in 2D for actFireMissile as well.
May later be turned into a 3D unit vector for pitch correct missile movement.
2022-10-25 07:06:48 +02:00
Christoph Oelckers
5e4d45f6b8 - floatified actFireMissile 2022-10-25 07:06:48 +02:00
Christoph Oelckers
a070342f0c - floatified actFireThing 2022-10-25 07:06:48 +02:00
Christoph Oelckers
40cb2116e0 - restore Duke's cheats. 2022-10-24 23:30:09 +02:00
Christoph Oelckers
9342b7b1a4 - Duke/RR: fixed move_player smart action. 2022-10-24 22:09:34 +02:00
Christoph Oelckers
33002b37a9 - RR: fixed randomization for hitscan weapons. 2022-10-24 21:26:41 +02:00
Christoph Oelckers
f9d8763ed5 - Exhumed: fixed wasp's death animation 2022-10-24 20:56:41 +02:00
Christoph Oelckers
c2e5bdbdce - Exhumed: fixed grenade bouncing. 2022-10-24 20:41:15 +02:00
Christoph Oelckers
5fa27c2a72 - replaced the last set_int_ang calls. 2022-10-23 18:47:17 +02:00
Christoph Oelckers
4500fe6325 - Blood: replaced all calls to randomAngle with RandomAngle 2022-10-23 18:47:17 +02:00
Christoph Oelckers
a8cc6c1189 - floatified angles in useSectorWindGen plus two other set_int_ang. 2022-10-23 18:47:17 +02:00
Christoph Oelckers
a618161387 - floatified nnExtSpawnDude. 2022-10-23 18:47:16 +02:00
Christoph Oelckers
8505757d74 - floatified most of ProcessMotion. 2022-10-23 18:47:16 +02:00
Christoph Oelckers
a90eb853d5 - floatified fxBouncingSleeve and fxPodBloodSplat 2022-10-23 18:47:16 +02:00
Christoph Oelckers
e2d0cbf772 - allow entering cheats in the chat editor without using '#'. 2022-10-23 18:46:18 +02:00
Christoph Oelckers
c23d23ea60 - Blood: floatified fxBloodBits 2022-10-22 20:41:27 +02:00
Christoph Oelckers
fdb31fc2cc - missing declaration. 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
babbad83af - fixed FAFhitscan to not pass the hitpos back into hitscan.
This will overwrite the scan's start and cause the function to malfunction.
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
Christoph Oelckers
6c6fdaf332 - floatified actSpawnDude and removed its unused last parameter.
All callers left it at 0.
2022-10-22 20:41:26 +02:00
Christoph Oelckers
aa0b6bb077 - changed parameters in a few HitScan calls in condCheckSprite 2022-10-22 20:41:26 +02:00
Christoph Oelckers
fc011e847f - Blood: floatified actCheckTraps 2022-10-22 20:41:26 +02:00
Christoph Oelckers
8d1938b363 - Blood: cleaned up various angle and distance checks in AI code 2022-10-22 20:41:26 +02:00
Christoph Oelckers
e6cfb165f8 - converted all remaining add_int_bvel* calls. 2022-10-22 20:41:26 +02:00
Christoph Oelckers
068feae64e - floatified actFireVector. 2022-10-22 20:41:25 +02:00
Christoph Oelckers
5c6cac49c8 - changed a few vel setter calls. 2022-10-22 20:41:25 +02:00
Christoph Oelckers
e00eda6cb8 - Blood: floatified VectorScan.
The texture checks in here definitely need some more verification, though.
Doing a quick test looked ok, but I do not think this was enough.
2022-10-22 20:41:25 +02:00
Christoph Oelckers
3b76de7b7d - Blood: renamed actFireVector's arguments.
No way this can be refactored with names like a2, a3, a4 etc...
2022-10-22 20:41:25 +02:00
Christoph Oelckers
d1d68f1570 - handled the last remaining set_int_bvel* calls in nnexts.cpp. 2022-10-22 20:41:25 +02:00
Christoph Oelckers
88feac4272 - floatified useVelocityChanger 2022-10-22 20:41:25 +02:00
Christoph Oelckers
044b9e555b - floatified a bit more of nnExtProcessSuperSprites 2022-10-22 20:41:25 +02:00
Christoph Oelckers
fd5bbbedaf - floatified aiPatrolMove 2022-10-22 20:40:42 +02:00
Mitchell Richters
0993799967 - Blood: Use sprite angle radians in GameInterface::UpdateSounds(). 2022-10-22 19:45:10 +02:00
Mitchell Richters
633fb01487 - Blood: Rename some weapon function variables to give us half a chance of refactoring it. 2022-10-22 19:45:10 +02:00
Mitchell Richters
cea0e74299 - Blood: Floatified remaining bits of playerProcess(). 2022-10-22 19:45:10 +02:00
Mitchell Richters
32c784cd0f - Blood: Floatified remaining bits of ProcessInput(). 2022-10-22 19:45:10 +02:00
Christoph Oelckers
781c2492a9 - Blood: floatified aiFightDudeCanSeeTarget + aiPatrolMarkerReached 2022-10-22 19:45:10 +02:00
Christoph Oelckers
ead39cb010 - Blood: floatified parts of condCheckDude 2022-10-22 19:45:09 +02:00
Christoph Oelckers
92f958ded0 - Blood: floatified debrisBubble 2022-10-22 19:45:09 +02:00
Christoph Oelckers
39d100c970 - Blood: floatified debrisConcuss 2022-10-22 19:45:09 +02:00
Christoph Oelckers
549f062973 - Blood: floatified windGenDoVerticalWind 2022-10-22 19:45:09 +02:00
Mitchell Richters
ef03e64025 - Blood: Floatified ActionScan(). 2022-10-22 12:17:04 +02:00
Mitchell Richters
b8b5fe9162 - Blood: Floatified playerStart() and ZONE::ang. 2022-10-22 12:17:04 +02:00
Christoph Oelckers
243c071834 - got rid of bsinf and bcosf. 2022-10-22 12:17:04 +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
600648939a - removed some unnecessary distance checks.
These are the same as the specified max distance and redundant.
2022-10-22 12:17:03 +02:00
Christoph Oelckers
aae468e2b2 - migrated all of SW's neartag calls to the fully floatified version 2022-10-22 12:17:03 +02:00
Christoph Oelckers
20043f6223 - use symbolic constants in neartag calls. 2022-10-22 12:17:03 +02:00
Mitchell Richters
95cd74bdc0 - renamed slope functions so that the int versions get a special name. 2022-10-22 12:17:02 +02:00
Christoph Oelckers
ac2a3c443f - got rid of all deprecated updatesector variants.
This required a few changes in the map loader and render interface.
2022-10-22 12:17:02 +02:00
Mitchell Richters
2e4996e8fc - floatified nnextCanMove and deleted most deprecated updatesector variants. 2022-10-22 12:17:02 +02:00
Christoph Oelckers
c5a5e3cef5 - deleted some unused deprecated functions. 2022-10-22 12:17:01 +02:00
Christoph Oelckers
9b84a510da - Blood: floatified debrisMove 2022-10-22 12:17:01 +02:00
Christoph Oelckers
d9453138f9 - fixed FAFcansee not working in some edge cases where one actor is very small and poorly placed.
Instead of directly going to the alternative, let's just do a regular cansee anyway and only run the fallback if this fails. hitscan is not good enough to perform sight checks.
2022-10-22 12:17:01 +02:00
Mitchell Richters
ef3be6181e - Blood: Floatified GibThing(). 2022-10-22 12:17:01 +02:00
Mitchell Richters
2e202a022c - Blood: Floatified GibFX(). 2022-10-22 12:17:01 +02:00
Mitchell Richters
3d16b76c9a - Blood: Floatified ghostThinkChase(). 2022-10-22 12:17:01 +02:00
Mitchell Richters
8025682334 - Blood: Floatified gargThinkChase(). 2022-10-22 12:17:00 +02:00
Mitchell Richters
ad8fbc51de - Blood: Floatified batThinkChase(). 2022-10-22 12:17:00 +02:00
Christoph Oelckers
761412313f - did some trivial replacements for deprecated functions. 2022-10-22 12:17:00 +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