Commit graph

1763 commits

Author SHA1 Message Date
Evan Ramos
262f2234c6 Duke3D: Disable dead code in implementation of undocumented SE 128
Avoids warning: bitwise or with non-zero value always evaluates to true [-Wtautological-bitwise-compare]
2020-05-22 17:11:16 +02:00
Jordon Moss
49deeb350e Fix trains not moving spawn points with higher indexes than player count. 2020-05-22 17:11:16 +02:00
Richard C. Gobeille
d9b8f58558 Duke3d: make CON_GETFLORZOFSLOPE and CON_GETCEILZOFSLOPE TROR aware 2020-05-22 17:01:37 +02:00
Richard C. Gobeille
e2d79b4682 engine: add yax_getflorzofslope() and yax_getceilzofslope() 2020-05-22 17:01:36 +02:00
Richard C. Gobeille
5e677d6089 Duke3d: restore previous version of VM_ASSERT macro for compilers other than MSVC 2020-05-22 17:01:35 +02:00
Richard C. Gobeille
14f3eb17f1 Duke3d: flip CON_USE_COMPUTED_GOTO dispatch macro logic around so the branch is taken less often 2020-05-22 17:00:12 +02:00
Richard C. Gobeille
34126a50be Duke3d: change random_angle hack in CON_MOVE to match CON_AI 2020-05-22 17:00:11 +02:00
Richard C. Gobeille
b0902f916a Duke3d: zero player return_to_center when setting horizRecenter to false 2020-05-22 17:00:10 +02:00
Richard C. Gobeille
2d4f6be147 Duke3d: convert several more VM error checks into VM_ASSERT statements
# Conflicts:
#	source/duke3d/src/gameexec.cpp
2020-05-22 17:00:09 +02:00
Richard C. Gobeille
7fbcab3dc1 Duke3d: VM_ASSERT fix 2020-05-22 16:57:34 +02:00
Richard C. Gobeille
86e2f4ec8a Revert "Duke3d: set .horizRecenter when handling SK_CENTER_VIEW"
This reverts commit ef06d8c3dba3e4ccf9388bf31404ab23ebdcb37e.
2020-05-22 16:57:01 +02:00
Richard C. Gobeille
1f82cfa3bf Duke3d: replace VM_CONDITIONAL macro with a lambda
# Conflicts:
#	source/duke3d/src/gameexec.cpp
2020-05-22 16:57:00 +02:00
Richard C. Gobeille
c0160065e4 Duke3d: this is intended to fix an issue where CON VM errors within a CON_FOR loop could cause an infinite loop 2020-05-22 16:56:24 +02:00
Richard C. Gobeille
8cf064b90c Duke3d: add a few missing VM_ASSERT checks 2020-05-22 16:56:23 +02:00
Richard C. Gobeille
1a1112b4c1 Duke3d: fix OOB memory access in CON_FOR 2020-05-22 16:55:37 +02:00
Richard C. Gobeille
dc9c6ce2e6 Duke3d: allow SE_14_SUBWAY_CAR to move STAT_PLAYER sprites
Fixes #18.
2020-05-22 16:54:12 +02:00
Richard C. Gobeille
23909f8ca1 Duke3d: hoist checks for ST_2_UNDERWATER outside of loops in SE_14_SUBWAY_CAR processing 2020-05-22 16:54:10 +02:00
Richard C. Gobeille
45fd214ffe Duke3d: remove interpolation fixups from subway
These aren't needed anymore after Striker's patch to improve overall interpolation.
2020-05-22 16:54:09 +02:00
Richard C. Gobeille
b19d258870 Duke3d: fix APLAYER radius damage distance calculation regression
Fixes #20.
2020-05-22 16:54:08 +02:00
Richard C. Gobeille
32ddabb12c Derp...
Probably actually fixes #4. Regardless, I want to note that this is really sub-optimal.

# Conflicts:
#	source/duke3d/src/m32def.cpp
2020-05-22 16:51:27 +02:00
Richard C. Gobeille
61d82c8152 Fix really stupid error with CON_NULLOP branch detection
Fixes #4.

# Conflicts:
#	source/duke3d/src/gamedef.cpp
#	source/duke3d/src/m32def.cpp
2020-05-22 16:50:28 +02:00
Jordon Moss
79d2bb1bb8 Fix player sprite disappearing and chat indicator using the wrong sprite when typing. 2020-05-22 16:48:44 +02:00
Jordon Moss
658a96ce19 Re-added a check in VM_Move that probably should't have been removed. 2020-05-22 16:48:24 +02:00
alexey.lysiuk
2974af3178 - fixed a bunch of compilation errors with MSVC 16.6.0 2020-05-21 10:29:59 +03: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
2c13e746c5 Duke3D: Reset one_eighty_count if player angle input is detected. 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
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
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
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
d30bf548bd Duke3D: Restore old interpolations when camera is chasing actor who whacked you (idea from NY00123). 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
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
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
Mitchell Richters
d99c907acb - reset buttonMap button states after returning from pause for Duke3D (stops keys acting stuck down if down prior to pausing). 2020-05-06 10:51:08 +02:00
Mitchell Richters
1bb3640bc9 - fix interpolation stutters when opening console for Duke3D. 2020-05-06 10:51:08 +02:00
Richard C. Gobeille
b21a4d5880 Duke3d: fix stupid input scaling bug 2020-04-16 00:03:06 +02:00
Mitchell Richters
db428a4f03 All Games: Make more precise use of 'scaleAdjustmentToInterval()'.
- Inline function returns a double, therefore we should use it and not potentially truncate the mantissa.
- Use divisors to get true numbers of some floats (3.333 -> 10/3, etc).
- Remove a few brackets/parentheses where possible from what are already exceedingly bracketed lines.
2020-04-14 00:00:21 +02:00
Mitchell Richters
02d436f802 Change Next/Previous Weapon button handling for Duke and RR games.
- Resolves inability to change weapons under SDL-based environments as reported at https://forum.zdoom.org/viewtopic.php?f=340&t=67232#p1142970
2020-04-13 23:59:47 +02:00
Christoph Oelckers
fda4293013 - draw the movie franes outside of the tile system to reduce the palette maintenance.
The movie code has always been the part causing the most issues because it alters the palettes - the rest treats them as static data.
2020-04-13 23:58:45 +02:00
Christoph Oelckers
fac004b4d2 - palette code cleanup 2020-04-13 23:58:44 +02:00
Christoph Oelckers
57cb22f135 - console code matching with GZDoom
Refactored the buttons to be definable locally per game for easier handling of differing input.
2020-04-12 08:30:41 +02:00