Commit Graph

10422 Commits

Author SHA1 Message Date
Mitchell Richters 83936bf5eb Revert "SW: Improve main game loop."
This reverts commit e878c5bab8.

Revert "SW: Use Q16.16 for horiz."

This reverts commit f07a0ae01e.

Revert "SW: Use Q16.16 for angle."

This reverts commit 1ecc74c2ec.

Revert "SW: Minor repairs for Q16.16 implementation."

This reverts commit d78d046bad.

Revert "SW: Process input at frame rate."

This reverts commit c162014dab.

Revert "SW: Amendments to accommodate changes in master."

This reverts commit eaa51138ad.

Revert "SW: Fix incorrectly declared function input type."

This reverts commit 1cdd5b08d8.

Revert "SW: Amend scaleAdjustmentToInterval() with correct value for SW."

This reverts commit d4dd737cd5.

Revert "SW: Refinements to new input code."

This reverts commit 5ebc65a1fb.

Revert "SW: Adjust look and snap up/down keys and slightly tune PLAYER_TURN_AMOUNT."

This reverts commit 2852536dbf.

Revert "SW: Get PLAYER_TURN_SCALE to be just right."

This reverts commit 4630c8a0b7.

Revert "SW: Make map follow mode work better."

This reverts commit 8e94c48eff.

Revert "SW: Remove line accidentally left from 'MoveScrollMode2D()'."

This reverts commit 5db8047b41.

Revert "Fix multiplayer desync after the change to q16 angle and horiz."

This reverts commit 3bc46078b8.

Revert "SW: Revert commented out horiz->q16horiz renames in DSPRINTF strings"

This reverts commit 537313f620.

Revert "sw/src/draw.cpp:drawscreen: We can set the pp->si* fields just once,"

This reverts commit d2e9595980.

Revert "sw/src/game.cpp:LoadLevel: Rename q16ang -> ang"

This reverts commit a178961a3e.

Revert "SW: Minor tweaks."

This reverts commit 377ba68344.

Revert "SW: Further refine turning and optimise horizon adjustment."

This reverts commit 039022d9ac.

Revert "SW: Don't process input at frame rate if ScrollMode2D is true."

This reverts commit 1aa1e62c4d.

Revert "SW: Use a bit more Q16.16 in places."

This reverts commit 40ca656f38.

Revert "SW: Use the old interpolation path in drawscreen if player is dead"

This reverts commit 2d73466425.

Revert "SW: Smooth out 180 degree turn landing and replace some fix16_min/max with fix16_clamp."

This reverts commit 0996e87f79.

Revert "Change Next/Previous Weapon button handling for Shadow Warrior."

This reverts commit f6b8ca6a22.

Revert "SW: Make "Center_View" key return smoothly."

This reverts commit 23c401fbc2.

Revert "SW: Use the old interpolation path in drawscreen if player is dead"

This reverts commit 43ec16eb55.

Revert "Interpolation fixes for SW:"

This reverts commit ac8a7ecfbd.

Revert "SW: Reset the number of interpolations on level load"

This reverts commit 04bf8499e7.

Revert "Another change modifying saved game format in SW:"

This reverts commit e80888523e.

Revert "SW: Interpolate sector objects in non-demo, single player games."

This reverts commit 996ab77cf4.

Revert "- fixed merge errors in SW."

This reverts commit b8cfa94568.

Revert "- fix interpolation stutters when opening console for SW."

This reverts commit 99fdbfb6cb.

Revert "- reset buttonMap button states after returning from pause for SW (stops keys acting stuck down if down prior to pausing)."

This reverts commit 693b6955da.

Revert "SW: fix stupid input scaling bug"

This reverts commit 1c79e6e17c.

Revert "SW: Make vehicle input better."

This reverts commit 670a53c402.

Revert "SW: Change fix16_from_float() to fix16_from_int() that was changed in 4630c8a0b7 but should have been reverted in 377ba68344e34495638c6fa7685ff78c9a0ed6f8."

This reverts commit 423c9da071.

Revert "SW: Remove ScrollMode2D extern boolean and move into PLAYERp struct."

This reverts commit 31eb55c1fa.
2020-05-20 14:43:03 +02:00
Mitchell Richters 31eb55c1fa SW: Remove ScrollMode2D extern boolean and move into PLAYERp struct. 2020-05-19 12:55:32 +02:00
Mitchell Richters 423c9da071 SW: Change fix16_from_float() to fix16_from_int() that was changed in 4630c8a0b7 but should have been reverted in 377ba68344. 2020-05-19 12:55:32 +02:00
Mitchell Richters 670a53c402 SW: Make vehicle input better.
- Define new boolean 'on_vehicle' in PLAYERp struct for use with interpolating while on vehicle and other checks.
- Move horizon code back into separate DoPlayerHorizon() function. Adjusting horizon while in vehicle must come at the end of the DoPlayerOperate*() function.
- Make DoPlayerHorizon() accessible in game.cpp.
- Change code in DoPlayerHorizon() to process according how 'pp->on_vehicle' is set.
- Make scaleAdjustmentToInterval available outside of getinput().
- Don't process input at frame-rate while on a vehicle. Vehicle code is too difficult to process outside of the game's clock.

Partially based on NY00123's upstream implementation of tying player input to frame-rate.
2020-05-19 12:55:32 +02:00
Mitchell Richters 58bb2e149b SW: Fix broken interpolation pathway following changes in 43ec16eb55.
What 43ec16eb55 intends to do was already done via 2d73466425, however I applied the if statement in the opposite order so when it was cherry-picked again, the pathway was actually reversed - interpolating when alive and not when dead.

Rather than re-apply the opposite order, I've made the if statement match upstream for more consistency and to avoid further conflicts.
2020-05-15 15:00:58 +02:00
Mitchell Richters 9a144a9afb - bump save versions for Duke3D following changes to DukePlayer_t struct. 2020-05-14 15:15:59 +02:00
Mitchell Richters 10142eee6b RR: Move lastInputTicks from DukePlayer_t struct to PlayerData_t struct.
Better location for it since it never needs to be sent across the wire in a multiplayer situation. It's now also located where the other properties to do with input being tied to frame-rate are located.
2020-05-14 10:00:16 +02:00
Mitchell Richters 1f807792af Duke3D: Move lastInputTicks from DukePlayer_t struct to PlayerData_t struct.
Better location for it since it never needs to be sent across the wire in a multiplayer situation. It's now also located where the other properties to do with input being tied to frame-rate are located.
2020-05-14 10:00:16 +02:00
Mitchell Richters 22ae4182b5 RR: Properly reset pPlayer->lastInputTicks in G_EnterLevel() since all calls to P_ResetPlayer() are commented out.
Repairs issue with player spinning out of control when entering a new level.
2020-05-13 15:12:44 +02:00
Mitchell Richters d411defd04 RR: Reset one_eighty_count if player angle input is detected. 2020-05-13 15:12:44 +02:00
Mitchell Richters 2c13e746c5 Duke3D: Reset one_eighty_count if player angle input is detected. 2020-05-13 15:12:44 +02:00
Mitchell Richters 5f59c1364c RR: Process one_eighty_count (Turn-around key) at frame-rate. 2020-05-13 15:12:44 +02:00
Mitchell Richters 2129d3b4e7 Duke3D: Process one_eighty_count (Turn-around key) at frame-rate. 2020-05-13 15:12:44 +02:00
Mitchell Richters 5299a0625d RR: Process q16rotscrnang and q16look_ang at frame-rate.
Had to move lastInputTicks to the DukePlayer_t struct. When first running P_GetInput(), the initial value of elapsedInputTicks is the actual value of timerGetHiTicks(), which is into the thousands. This high initial value was affecting how scaleAdjustmentToInterval() scales as it was taking an initial q16look_ang value of 512 and overflowing the fix16_t type, making it -32,768.
2020-05-13 15:12:44 +02:00
Mitchell Richters 22e9396feb RR: Promote look_ang to Q16.16. 2020-05-13 15:12:44 +02:00
Mitchell Richters 21e58160bf RR: Promote rotscrnang to Q16.16. 2020-05-13 15:12:44 +02:00
Mitchell Richters 3af6ad697b Duke3D: Process q16rotscrnang and q16look_ang at frame-rate.
Had to move lastInputTicks to the DukePlayer_t struct. When first running P_GetInput(), the initial value of elapsedInputTicks is the actual value of timerGetHiTicks(), which is into the thousands. This high initial value was affecting how scaleAdjustmentToInterval() scales as it was taking an initial q16look_ang value of 512 and overflowing the fix16_t type, making it -32,768.
2020-05-13 15:12:44 +02:00
Mitchell Richters de0cc8f164 Duke3D: Promote look_ang to Q16.16. 2020-05-13 15:12:44 +02:00
Mitchell Richters ac4b33a770 Duke3D: Promote rotscrnang to Q16.16. 2020-05-13 15:12:44 +02:00
Mitchell Richters 3749a89d6a Build: Change renderSetRollAngle() to take a float and not an int32_t. 2020-05-13 15:12:44 +02:00
Mitchell Richters bece408548 Exhumed: Set scaleAdjustmentToInterval to correct value for game's ticrate. 2020-05-13 15:10:18 +02:00
Richard C. Gobeille 98f4bac708 Exhumed: fix stupid input scaling bug 2020-05-11 21:27:29 +02:00
Richard C. Gobeille 1c79e6e17c SW: fix stupid input scaling bug 2020-05-11 21:27:29 +02:00
Richard C. Gobeille c5e4c9631d RR: fix stupid input scaling bug 2020-05-11 21:27:29 +02:00
Mitchell Richters e7621b4e05 RR: Properly scale tilt_status on vehicles with input being tied to frame-rate. 2020-05-11 21:27:29 +02:00
Mitchell Richters da04a1d0aa RR: Return to centre improvements.
- Lock player horizon while returning to centre.
- Precisely scale player's horizon in time with rate at which 'pPlayer->return_to_center' decrements.
- Check player's horizon is between 99 and 101 degrees, not 99.9 and 100.1. The extra 0.9 degrees of precision is not noticeable and is dramatically slower.
- Reset 'pPlayer->return_to_center' to '0' when player's horizon is at 100.
- Match q16horizoff precision to precision of q16horiz.
2020-05-11 21:27:29 +02:00
Mitchell Richters 549ff75b99 RR: Change horizSkew from fix16_t to int8_t.
- No point converting an int to fix16, only to convert it back. It's only ever an unrounded integer.
2020-05-11 21:27:29 +02:00
Mitchell Richters 742974c61c Duke3D: Return to centre improvements.
- Lock player horizon while returning to centre.
- Precisely scale player's horizon in time with rate at which 'pPlayer->return_to_center' decrements.
- Check player's horizon is between 99 and 101 degrees, not 99.9 and 100.1. The extra 0.9 degrees of precision is not noticeable and is dramatically slower.
- Reset 'pPlayer->return_to_center' to '0' when player's horizon is at 100.
- Match q16horizoff precision to precision of q16horiz.
2020-05-11 21:27:29 +02:00
Mitchell Richters ae353b93fb Duke3D: Change horizSkew from fix16_t to int8_t.
- No point converting an int to fix16, only to convert it back. It's only ever an unrounded integer.
2020-05-11 21:27:29 +02:00
Mitchell Richters c7d3753c2b Revert "RR: Fix hard landing from preventing vertical mouse movement with player input tied to frame-rate."
This reverts commit 4bc105ec07.
2020-05-11 21:27:29 +02:00
Mitchell Richters d088795f28 Revert "Duke3D: Fix hard landing from preventing vertical mouse movement with player input tied to frame-rate."
This reverts commit 6dcd83b734.
2020-05-11 21:27:29 +02:00
Mitchell Richters 9cc86bd003 RR: Restore old interpolations when camera is chasing actor who whacked you (idea from NY00123). 2020-05-11 21:26:34 +02:00
Mitchell Richters d30bf548bd Duke3D: Restore old interpolations when camera is chasing actor who whacked you (idea from NY00123). 2020-05-11 21:26:34 +02:00
Richard C. Gobeille 3b6b1a3063 Fix stupid typo that broke the camera aiming at the enemy that killed you in Duke3D 2020-05-11 21:26:34 +02:00
Mitchell Richters aad2b3a782 - hacks to make IF launch again after gamefunc changes in 57cb22f135.
Also re-ordered gamefuncs to 1:1 match EDuke32.
2020-05-11 13:30:14 +02:00
Mitchell Richters 8730bd9dda - allow game's clock to keep running while paused (restores interpolations/animations in menus). 2020-05-08 21:23:02 +02:00
Mitchell Richters 401e87f3d9 RR: Remove left-over else statement that should have been removed in 0ec2b87. 2020-05-08 10:51:59 +02:00
Mitchell Richters d58f90de19 RR: Properly lock player movement when necessary while in a vehicle.
- This makes map follow mode work as expected again.
2020-05-08 10:51:59 +02:00
Mitchell Richters 9c27f49d42 RR: restore proper vehicle accuracy to RedNukem code-base.
- I tried to do something smarter originally but want the values to be 100% accurate to upstream.
2020-05-08 10:51:59 +02:00
Mitchell Richters 4bc105ec07 RR: Fix hard landing from preventing vertical mouse movement with player input tied to frame-rate. 2020-05-08 10:51:59 +02:00
Mitchell Richters 6dcd83b734 Duke3D: Fix hard landing from preventing vertical mouse movement with player input tied to frame-rate. 2020-05-08 10:51:59 +02:00
Mitchell Richters 2e3bcdadd6 Duke 3D & RR: Repair issue where player would not return to centre following hard landing.
- Accidentally left in while merging changes from upstream.
- Change restores accuracy to game play in that a hard landing now returns the player's view to center.
2020-05-08 10:51:59 +02:00
Richard C. Gobeille 08bc2fbbcd RR: set .horizRecenter when handling SK_CENTER_VIEW
This seems so obvious that I almost think I intentionally left it out before, but I can't remember why I would have.
2020-05-08 10:51:59 +02:00
Richard C. Gobeille 8225d20e23 RR: zero .horizAngleAdjust and .horizSkew after checking playerquitflag instead of before
I don't think this actually makes a difference, but it's more consistent.
2020-05-08 10:51:59 +02:00
Richard C. Gobeille bcf4903505 RR: zero .horizSkew in P_DoJetpack() 2020-05-08 10:51:59 +02:00
Richard C. Gobeille 818e14448d RR: zero player .horizRecenter, .horizSkew, and .horizAngleAdjust in P_ResetPlayer() 2020-05-08 10:51:59 +02:00
Richard C. Gobeille 3f7914ad57 Duke3d: set .horizRecenter when handling SK_CENTER_VIEW
This seems so obvious that I almost think I intentionally left it out before, but I can't remember why I would have.
2020-05-08 10:51:59 +02:00
Richard C. Gobeille c53edd9e5a Duke3d: zero .horizAngleAdjust and .horizSkew after checking playerquitflag instead of before
I don't think this actually makes a difference, but it's more consistent.
2020-05-08 10:51:59 +02:00
Richard C. Gobeille 26b87e3aa0 Duke3d: zero .horizSkew in P_DoJetpack() 2020-05-08 10:51:59 +02:00
Richard C. Gobeille 0ec9dd9a14 Duke3d: zero player .horizRecenter, .horizSkew, and .horizAngleAdjust in P_ResetPlayer() 2020-05-08 10:51:59 +02:00