Mitchell Richters
216fad7e18
- Rename PlayerHorizon::horizoff
in preparation for replacement work.
2022-12-11 18:41:53 +01:00
Mitchell Richters
0c53990c87
- Rename PlayerHorizon::ohoriz
in preparation for replacement work.
2022-12-11 18:41:53 +01:00
Mitchell Richters
401a829d54
- Rename PlayerHorizon::horiz
in preparation for replacement work.
2022-12-11 18:41:53 +01:00
Mitchell Richters
25460e8e98
- Fix change to constant in last commit.
...
* How did that little `3` not make it in...
2022-12-09 20:00:37 +11:00
Mitchell Richters
2a82ef85b8
- Minor optimisation to the return to centre code.
2022-12-09 18:00:56 +11:00
Mitchell Richters
92bf00d3e9
- Fix incorrect sector usage in calcviewpitch()
.
2022-12-09 17:48:26 +11:00
Mitchell Richters
1772238653
- Fix incorrect value for PITCH_HORIZOFFSPEED
input constant.
2022-12-07 15:21:52 +11:00
Mitchell Richters
df63e5411b
- Fix incorrect sign for PITCH_HORIZOFFCLIMB
input constant.
2022-12-07 13:11:59 +11:00
Mitchell Richters
817a0cb94a
- Clamp applied mouse input to be within safe ranges to interpolate with.
...
* Input greater than 180 degrees in a single tic can cause the input to be applied backwards.
2022-11-07 19:38:22 +11:00
Mitchell Richters
11f279fddd
- Slight input code tidy-up.
2022-11-06 21:59:07 +11:00
Mitchell Richters
033e0ea7bc
- Make rotscrnang return to zero at same speed as look_ang.
2022-11-06 21:59:07 +11: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
Mitchell Richters
cea2b6b428
- Rename PlayerHorizon::__horiz
back to horiz
.
2022-10-30 16:51:12 +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
Mitchell Richters
619b8005ac
- Rename PlayerHorizon::horiz
in prep for negating this angle throughout code.
2022-10-30 16:51:11 +01:00
Mitchell Richters
c3adf5ea58
- Slight clean up of input constants.
2022-10-25 07:07:14 +02:00
Mitchell Richters
5d8cc1b4fc
- Store all input speed constants as DAngle to avoid calling DAngle::fromDeg()
all the time.
2022-10-25 07:07:02 +02:00
Mitchell Richters
2baf35ed2d
- Slightly tidy up PlayerHorizon::applyinput()
.
2022-10-25 07:06:55 +02:00
Mitchell Richters
8d3f3c6025
- Cut over to DAngle
from fixedhoriz
and remove the latter.
2022-10-25 07:06:55 +02:00
Mitchell Richters
0d8b2ba59d
- Tidy up all constants in gameinput.cpp
and convert to native degrees/pitch where appropriate.
2022-10-25 07:06:55 +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
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
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
95cd74bdc0
- renamed slope functions so that the int versions get a special name.
2022-10-22 12:17:02 +02:00
Mitchell Richters
85f716e49b
- floatify calcviewpitch
2022-10-22 12:17:00 +02:00
Mitchell Richters
8bfcb8c939
- Floatify InputPacket::fvel
and InputPacket::svel
.
...
* Since all velocities are floated, we can now take each game's keymove scaling into its ticker and use a consistent keymove size, making non-mouselook and controller input truly identical across the games without having to try and fudge any values.
2022-10-20 00:48:09 +02:00
Mitchell Richters
def2b9d483
- Flip svel
around in the input code so we can use proper anti-clockwise vector math.
2022-10-20 00:48:09 +02:00
Mitchell Richters
bc018dd946
- Use getCorrectedScale()
in conjunction with looking keys like scaletozero()
functions.
2022-10-18 19:52:02 +02:00
Mitchell Richters
bdc6a5cf69
- Remove fudging from I_GetInputFrac()
and correct getPushBuild()
.
2022-10-18 19:52:02 +02:00
Mitchell Richters
478e7a6801
- Eliminate some TAngle floating point Build method usage.
2022-10-05 00:36:31 +02:00
Mitchell Richters
5c84f93c08
- Use the static constexpr nullAngle
everywhere possible.
2022-10-05 00:36:30 +02:00
Mitchell Richters
b23e77d9c7
- Replace player's ang
with DAngle
object.
...
* This commit does not build. Committed items are everything that's been done by find and replace.
* Next commit has hand-performed changes that are better separated out for clarity.
2022-10-05 00:36:27 +02:00
Mitchell Richters
7a6f5c0864
- Replace binangle
usage in PlayerHorizon::calcviewpitch()
with DAngle
object.
2022-10-05 00:36:27 +02:00
Mitchell Richters
13ea55b4cb
- Replace player's rotscrnang
and look_ang
angles with DAngle
objects.
...
* Went the el cheapo route and added some floating point Build angle methods. As these and the integer build methods are really just refactoring aids, we'll come back to this in due course.
2022-10-05 00:36:26 +02:00
Christoph Oelckers
b31e6c0bdf
- replaced getclosestpointonwall_internal with a floating point version based on NearestPointLine.
2022-08-05 17:04:46 +02:00
Mitchell Richters
79022e8afa
- Clean up and simplify getincangle()
/getincanglebam()
functions and inline them.
2022-07-23 12:57:45 +10:00
Mitchell Richters
4324f923bc
- Call updateTurnHeldAmt()
after doing the turn, not before it. This gives one tic more preamble.
2022-07-23 10:37:32 +10:00
Mitchell Richters
e016f65321
- Don't adjust joystick pitch/yaw speeds based on whether autorun is enabled or not.
...
* Only SW did this out of the box.
* Duke never did, NBlood has no working joystick setup to compare with, and GZDoom doesn't either.
* Fixes #693 .
2022-07-23 10:37:32 +10:00
Mitchell Richters
a423b93ad8
- Use turnscale
in controller pitch calculations, which is only used in SW when on a sector object, and is original behaviour.
2022-07-23 10:37:32 +10:00
Mitchell Richters
78fcf2b4f0
- Move invertmouse
and invertmousex
CVARs from gameinput.cpp
to inputstate.cpp
.
...
* Old setup was inverting the entire player's horz/avel, even for joystick input while not inverting `mousemovex` or `mousemovey` at all.
2022-07-23 10:37:32 +10:00
Mitchell Richters
c68e112867
- Remove some unnecessary branching and abs()
calls in processMovement()
.
...
* Since fvel/svel is clamped at the end of the function, these tests just aren't necessary.
* Reversed the logic in some if statements so the most likely outcome doesn't fall to the else branch.
2022-07-23 10:37:32 +10:00
Mitchell Richters
ea17352aea
- Do some small tidying up in gameinput.cpp
and change how some constants are stored.
2022-07-23 10:37:32 +10:00
Mitchell Richters
1906491129
- Move some PlayerHorizon
/PlayerAngle
class methods out into inlines in gameinput.cpp
.
...
* These class methods did nothing with the objects inside the class, they worked generically so they're better as inlines.
* Also tidied up some of the internals so they're easier to read.
2022-07-23 10:37:32 +10:00
Mitchell Richters
612dd049f9
- Remove unused PlayerPosition
structure.
...
* There were some plans around this being in use for all the various player structs in each game, but it hasn't come to be.
* Code remains in the commit history, it can come back if it's of use in the future.
2022-05-30 21:33:14 +10:00