Mitchell Richters
bc103595ce
- force scaleAdjust
to be 1 when cl_syncinput
is 1.
...
* Above calculation has some micro variances to it which were leading to strange behaviour like the bike's tilting not working properly with `cl_syncinput 1`.
2020-08-04 17:11:32 +10:00
Mitchell Richters
293c1af4c2
- interpolate p->TiltStatus
for RR(RA).
2020-08-04 17:11:00 +10:00
Mitchell Richters
cdb8e5b94e
- do these in the order that processinput()
does them in.
2020-08-04 16:30:20 +10:00
Mitchell Richters
a2a668cd7b
- fix vehicle turning issues following cl_syncinput
changes/fixes in e474ebc2b7
.
2020-08-04 16:28:57 +10:00
Mitchell Richters
cb93560a4a
- fix regression from e474ebc2b7
by which the player could adjust their angle on a camera while cl_syncinput 0
(default) was set.
...
* Issue doesn't occur with `cl_syncinput 1` because `processinput()` returns when p->newowner >= 0 before `applylook()` is called from within it.
* Fixes #96 .
2020-08-04 13:02:19 +10:00
Christoph Oelckers
d526c6401f
- use the generic cheat system for Blood.
2020-08-03 20:51:31 +02:00
Christoph Oelckers
35a5c4e23c
- undid hardcoded coupling of Mapinfo slots with episode/level pairs in Blood.
...
This both lifts the imposed limit of 16 levels and will allow dynamic management of global mapinfo data.
2020-08-03 20:11:30 +02:00
Christoph Oelckers
d87f0dc0b0
- uninitialized variable fixed
2020-08-03 20:07:23 +02:00
Mitchell Richters
7493d4e334
- remove unused getters from player_struct
.
2020-08-03 23:01:53 +10:00
Mitchell Richters
aead65183c
- draw the crosshair using getHalfLookAng()
inline function, making use of its double precision and optionally interpolated result.
2020-08-03 22:56:43 +10:00
Mitchell Richters
d3d9bb0823
- partially revert 19e4393a4f
by adding the player's mouse input after calculating the true pitch of p->q16horiz
.
...
* Need to add `p->horizAdjust` in with `p->q16horiz` because the values passed to that variable are the same as what would have been directly added to `p->q16horiz` in `processinput()`.
* Leaving mouse input to apply after calculating the pitch lets us take advantage of the calculated pitch's accuracy to provide consistent mouse input across the pitch's range.
2020-08-03 22:39:09 +10:00
Mitchell Richters
1556e80dd2
- apply same RR horizon workaround from e474ebc2b7
for when cl_syncinput 1
is set for angle as well.
2020-08-03 22:31:44 +10:00
Mitchell Richters
19e4393a4f
- add all the horizon values before converting into true pitch inside sethorizon()
.
2020-08-03 22:13:10 +10:00
Mitchell Richters
573cb363ae
- add new weapon interpolation variable from player_struct
into savegame code.
2020-08-03 21:26:28 +10:00
Mitchell Richters
e474ebc2b7
- multiple input fixes for both games, and for both cl_syncinput 0
and cl_syncinput 1
modes.
...
* For RR, `processweapon_r()` was performing angle and horizon changes directly which provided a harsh experience with the default `cl_syncinput 0` mode.
* Added `angAdjust` variable to `player_struct` for use with ticrate angle adjustments.
* Renamed `horizAngleAdjust` to `horizAdjust` so that there is less confusion with the new `angAdjust` variable.
* Removed `horizSkew` variable, can just use `horizAdjust` for this.
* Replaced all calls to `addang()` and `addhoriz()` with the appropriate additions/subtractions to `angAdjust` and `horizAdjust` respectively.
* Removed now unused `addang()` and `addhoriz()` setters from `player_struct`.
* Define new function `resetinputhelpers()` to eliminate code duplication between `processinput_d()` and `processinput_r()` functions.
* Remove `p->q16ang` and `p->q16horiz` direct setting from `FinalizeInput()`.
* Change `applylook()` to accept an `fixed_t adjustment` for changing the player's angle. This can either be `input.q16avel` when `cl_syncinput` is 0, or `sync[snum].q16angvel` when `cl_syncinput` is 1.
* Change `sethorizon()` to accept an `fixed_t adjustment` for changing the player's horizon. This can either be `input.q16horz` when `cl_syncinput` is 0, or `sync[snum].q16horz` when `cl_syncinput` is 1.
* Re-work `sethorizon()` to always adjust `p->q16horiz` using the true pitch code. This closer resembles the EDuke32 implementation as per SVN 7342.
* Re-work returning to center to work off the true pitch code and always ensure that the player returns to center.
* Implement work-around for RR where we need to call `sethorizon()` before the call to `fi.doincrements()` like the original game, but also after the call to `processweapon()` to apply any angle or horizon changes due to weapon recoil, etc. We work around this by calling `sethorizon()` from within `doincrements_r()` only if `cl_syncinput` is 1 and only if `doincrements_r()` is to return 1.
2020-08-03 21:19:45 +10:00
Mitchell Richters
d9fab07c31
- interpolate p->hard_landing
for RR.
2020-08-03 17:27:09 +10:00
Mitchell Richters
c600295c93
- apply same fix from c63564eb7a
for returning interpolated value for the player's q16horiz - q16horizoff
if cl_syncinput
is true.
...
* Also changed `gethalflookang()` to camel case `getHalfLookAng()` for easier reading.
* Also broke a very long if statement down into smaller chunks for readability.
2020-08-03 17:06:28 +10:00
Mitchell Richters
c63564eb7a
- replace lookanghalf()
player_struct getter with inline that can accept cl_syncinput
as a bool for whether to return an interpolated calculation or not.
...
New HUD was being let down by using an uninterpolated `q16look_ang` regardless of whether `cl_syncinput` was true.
2020-08-03 16:27:14 +10:00
Mitchell Richters
6bd050e201
- fix some interpolation harshness with p->weapon_pos
.
2020-08-03 15:06:25 +10:00
Mitchell Richters
7efa905a01
- fix some interpolation harshness with p->kickback_pic
.
2020-08-03 15:06:25 +10:00
Mitchell Richters
531df48d38
- interpolate p->hard_landing
for Duke 3D.
2020-08-03 15:06:25 +10:00
Mitchell Richters
43ff42b330
- interpolate p->random_club_frame
for Duke 3D.
2020-08-03 15:06:25 +10:00
Mitchell Richters
038039eb3f
- interpolate p->kickback_pic
for Duke 3D.
2020-08-03 15:06:25 +10:00
Mitchell Richters
8cc4b5062a
Revert "- remove duplicate line.". In hindsight, I believe this was by design.
...
This reverts commit 6fd6926d8d
.
2020-08-03 15:06:25 +10:00
Mitchell Richters
6ad3237b62
- backup p->kickback_pic
in prep for interpolation and tidy up other weapon interpolation variables.
2020-08-03 15:06:25 +10:00
Mitchell Richters
11a10c1d87
- change calc_smoothratio()
inline function from int to double that was missed in 0c12436092
.
2020-08-03 11:57:39 +10:00
Mitchell Richters
034d6e129a
- always calculate smoothratio while paused, but only return it during play. This is so the time keeps elapsing and you don't get a large delta between the first call back to CalcSmoothRatio()
after the previous call.
2020-08-03 11:54:59 +10:00
Mitchell Richters
5792a2389a
- consistency cleanup with a use of calcSinTableView()
use within hudweapon_d.cpp.
2020-08-03 11:07:55 +10:00
Mitchell Richters
80291f9cb7
- For RR, pass vehicle TiltStatus through to backend as the double that it is.
2020-08-03 11:06:23 +10:00
Mitchell Richters
8526bd6a17
- interpolate weapon HUD for RR and make full use of calcSinTableValue()
's double precision.
2020-08-03 11:05:41 +10:00
Mitchell Richters
70794df76c
- remove bitwise & operations on calls to calcSinTableValue()
since they're no longer necessary, and remove last use of sintable[]
from hudweapon_d.cpp.
2020-08-03 09:19:14 +10:00
Christoph Oelckers
d083e12967
- added the "back" sound to the menu.
2020-08-02 22:14:58 +02:00
Christoph Oelckers
8acc4101be
- simplified calcSinTableValue and inlined it.
...
There's no need for all this magic voodoo - the sin function already returns the proper values all by itself.
2020-08-02 22:03:22 +02:00
Christoph Oelckers
9606601554
- wraooed "q16look_ang / (2. * FRACUNIT)" in an inline function.
...
No need to write it out each time, this wpuld be a nightmare if it ever had to be refactored.
2020-08-02 21:45:57 +02:00
Mitchell Richters
0bcb37860a
- interpolate p->weapon_pos
for smooth switching of weapons.
2020-08-02 21:20:54 +02:00
Mitchell Richters
85dcffc442
- use new fmulscale16()
static inline for high precision interpolation in place of manual code.
2020-08-02 21:20:54 +02:00
Mitchell Richters
9c8593018b
- define new function calcSinTableValue()
to calculate an equivalent sintable[]
entry.
...
* Returns a true double result.
* Also supports fractional input for fractional input. That is, if `sintable[1]` = 50 and `sintable[2]` = 100, `calcSinTableValue(1.5)` = 75.
* Increased precision of `BANG2RAD` define to use double and not float.
* As such, revert addition of `sintablef[]`.
2020-08-02 21:20:54 +02:00
Mitchell Richters
abb23a7bd0
- fix remaining interpolation issue with weapon swaying when taking off again from a stand-still.
2020-08-02 21:20:53 +02:00
Mitchell Richters
6fd6926d8d
- remove duplicate line.
2020-08-02 21:20:53 +02:00
Mitchell Richters
11b3f5a78a
- increase precision of local variable x
for displaypistol()
.
2020-08-02 21:20:53 +02:00
Mitchell Richters
184465460e
- make full use of sintablef[2048]
.
2020-08-02 21:20:53 +02:00
Mitchell Richters
977ddc5aa8
- make full use of Q16.16 resolution for player's angle and horizon values.
2020-08-02 21:20:52 +02:00
Mitchell Richters
3a4a224877
- interpolate p->weapon_sway
.
2020-08-02 21:20:52 +02:00
Mitchell Richters
4499e05b06
- pass smoothratio
through to displayweapon()
.
2020-08-02 21:20:52 +02:00
Mitchell Richters
0c12436092
- change returned value for CalcSmoothRatio()
from int to double and pass through to displayrest()
for future use with displayweapon()
.
...
* `displayrooms()` ultimately should be adjusted as well. For now, just relying on integer truncation as this is just a proof of concept.
# Conflicts:
# source/core/gamecontrol.cpp
# source/core/gamecontrol.h
2020-08-02 21:20:52 +02:00
Mitchell Richters
0aca26e197
- determine smoothRatio
immediately after a potential change to ototalclock
has occurred.
2020-08-02 20:57:08 +02:00
Mitchell Richters
1cf857e788
- create an enum for MaxSmoothRatio and replace multiple hard-coded uses of '65536' constant.
2020-08-02 20:57:08 +02:00
Christoph Oelckers
9dac66b6f0
- fudging for the broken FIRE animation.
...
Unfortunately the only thing that can be done here from inside the engine is to increase the likelihood of the animation actually starting.
Ideally the broken script should be replaced but with the way CON replacements are done this is not possible.
2020-08-01 17:54:38 +02:00
Christoph Oelckers
4332d02885
- fixed sound playback for doors etc.
...
The play code locked out the MUSICANDSFX actor but never properly checked for the sound being finished.
Fixes #87
2020-08-01 11:56:02 +02:00
Christoph Oelckers
76ba45ac8d
- fixed the reactor for good.
...
Fixes #70
2020-08-01 09:55:48 +02:00
Christoph Oelckers
f75d30d858
- partial reactor fix.
...
This fixes the position of the debris - but there's still something else as the lightning beam still doesn't get removed.
2020-08-01 01:04:17 +02:00
Christoph Oelckers
c7c59d33ff
- always set the spam timer when a quote is supposed to be printed, even if it gets rejected.
2020-07-31 21:16:07 +02:00
Christoph Oelckers
6d24a20f5c
- QUOTE_DEAD may never repeat.
...
This gets spammed hard enough to get past the timer filter.
2020-07-31 21:14:43 +02:00
Christoph Oelckers
b6cb0ce1a1
- consolidated shade to light conversion
2020-07-31 20:58:55 +02:00
Mitchell Richters
24b0e4438e
- Reset p->oq16horizoff
to p->q16horizoff
in resetplayerstats()
.
2020-07-31 14:23:58 +10:00
Mitchell Richters
ecf8bb699a
- Reset p->oq16look_ang
to p->q16look_ang
in resetplayerstats()
.
2020-07-31 14:21:10 +10:00
Christoph Oelckers
d0909b8224
- calculate proper distances in the sound code.
...
The original code didn't factor in that z has a different scale than x and y and use a function with severe precision issues.
Fixes #81
2020-07-31 00:08:39 +02:00
Christoph Oelckers
0ac11955df
- improve message spam prevention.
2020-07-30 21:09:11 +02:00
Christoph Oelckers
6980c64f7b
- BONUS_SPEECH1-4 are not continuous.
...
Fixes #83
2020-07-30 18:36:52 +02:00
Mitchell Richters
02dfa10d27
- remove redundant if statement left over from 2260c2353d
.
2020-07-30 08:49:01 +10:00
Mitchell Richters
2260c2353d
- re-factor interpolation backups into discrete functions for calling from multiple places.
...
Fixes #66 .
2020-07-30 08:24:27 +10:00
Christoph Oelckers
347ed51036
- refactored Blood's main loop.
...
* moved Smacker video playing code into the backend, so now all games can play all supported video formats
* logos and level intro/exit videos use ScreenJob
2020-07-29 23:18:08 +02:00
Christoph Oelckers
0958bccade
Disabled all adult censoring in Duke and RR.
...
Aside from being "authentic" the parental lock is just a stupid feature with often unwanted side effects.
2020-07-29 22:43:06 +02:00
Christoph Oelckers
5faf202b97
- fixed missing speech at the end of E1L2.
...
This was caused by a broken check for adult mode.
Fixes #33 .
2020-07-29 22:40:29 +02:00
Christoph Oelckers
e9b3e8ae09
- when in single player, always play talk sounds from the player actor.
...
It seems some places manage to play these sounds from undefined actors that may or may not be in range.
Fixes #75
2020-07-29 22:26:14 +02:00
Christoph Oelckers
a861126657
- fixed incorrect sprite being passed to reactor() function.
2020-07-29 20:59:32 +02:00
Christoph Oelckers
bd3b2bc5bf
- always align the "loogies" to a virtual 320x200 screen to render them consistently.
2020-07-29 20:04:57 +02:00
Christoph Oelckers
fb184388a2
- un-spam the "protective boots on" message
...
Fixes #72
2020-07-29 19:38:21 +02:00
Christoph Oelckers
5776f69d92
- transfer palette to gibs for LIZTROOP
...
EDuke did it for all actors - not sure if that is right. Needs checking.
2020-07-29 19:31:24 +02:00
Mitchell Richters
9f391c3e9f
- possible fix for continual rotscrnang thrashing when dead that was reported in #66 .
2020-07-29 18:57:06 +10:00
Mitchell Richters
9c1faaa3ac
- scaling consistency changes from uplifting Redneck Rampage HUDs.
2020-07-29 18:36:50 +10:00
Mitchell Richters
d72e69ac55
- FullscreenHUD1 tweaks for Redneck Rampage.
2020-07-29 18:36:23 +10:00
Mitchell Richters
f2fca857be
- FullscreenHUD2 tweaks for Redneck Rampage.
2020-07-29 15:38:56 +10:00
Mitchell Richters
b77a0809fa
- Statusbar tweaks for Redneck Rampage.
2020-07-29 15:09:08 +10:00
Mitchell Richters
742fab83df
- properly scale imgWeap x position based on length of ammo string.
...
* Simple divisor based on length of string was insufficient, ammo sprite was too close to ammo count when ammo string length was 1-2.
* Using chain-cannon with ammo levels at 100, 10 and 1, at 2560x1440 the sprite is always 48px from the 1 in the ammo count.
2020-07-29 14:13:35 +10:00
Mitchell Richters
72c4a5281c
- move inventory item used amount down 0.5px in Duke FullscreenHUD1 to perfectly line it up.
2020-07-29 09:17:57 +10:00
Mitchell Richters
1fc117341e
- add oq16ang
to weaponhit struct to allow interpolation of security cameras at full precision.
...
* Improves implementation from f64083bda9
.
2020-07-29 08:39:33 +10:00
Mitchell Richters
843cc94b6f
- readability improvements for all the long-winded interpolation code.
2020-07-29 07:10:28 +10:00
Mitchell Richters
f64083bda9
- backport camera interpolation from DukeGDX. Fixes #63 .
2020-07-29 06:57:01 +10:00
Christoph Oelckers
10e4482245
- fixed counter on summary screen.
2020-07-28 22:37:11 +02:00
Mitchell Richters
c26ab9fc36
- left-align health and armor values. Proportionally space ammo sprite depending on length of ammo string (15px * format.Len()).
2020-07-28 22:19:13 +02:00
Mitchell Richters
23c24b01a4
- new alignment for Fullscreen HUD1.
2020-07-28 22:19:13 +02:00
Mitchell Richters
6626323e3e
Revert "- possible fix for continual rotscrnang thrashing when dead that was reported in #66." What was I thinking?
...
This reverts commit e019939590
.
2020-07-29 05:50:19 +10:00
Mitchell Richters
9b51e29d20
Revert "Revert "- removed duplicate application in moving down code for the jetpack.". What was I thinking?"
...
This reverts commit 3b522e4c50
.
2020-07-29 05:50:06 +10:00
Mitchell Richters
3b522e4c50
Revert "- removed duplicate application in moving down code for the jetpack.". What was I thinking?
...
This reverts commit 34b213a99f
.
2020-07-29 05:49:38 +10:00
Christoph Oelckers
ea28356971
- avoid spamming the "Squished!" message.
2020-07-28 21:44:55 +02:00
Christoph Oelckers
34b213a99f
- removed duplicate application in moving down code for the jetpack.
...
Fixes #62
2020-07-28 21:41:37 +02:00
Mitchell Richters
e019939590
- possible fix for continual rotscrnang thrashing when dead that was reported in #66 .
2020-07-29 05:37:46 +10:00
Christoph Oelckers
7e8688ae2d
- fixed snd_channels menu entry.
...
Fixes #57
2020-07-28 20:59:17 +02:00
Christoph Oelckers
d531f4b029
- reduce message spam when holding down the quick_kick button.
...
If not kept in check this will flood the console with endless messages.
2020-07-28 20:43:33 +02:00
Christoph Oelckers
a2ff8b3354
- removed JFDuke-based kill count reduction for slimers because it doesn't seem to work right.
2020-07-28 20:31:08 +02:00
Mitchell Richters
27b3c8e0f8
- fix interpolation for p->q16rotscrnang
. Setting p->oq16rotscrnang
in displayrooms()
(at frame rate) isn't where it should be done.
2020-07-28 22:24:30 +10:00
Mitchell Richters
f49ded7962
- make cl_syncinput
work for Duke.
...
* Current setup was broken and unusable.
* Fixed interpolation issues.
* Only call `GetInput()` at frame-rate when `cl_syncinput` is 0.
* Create `oq16look_ang` and interpolate it for enhanced smoothness.
* Always reset `horizAngleAdjust` and `horizSkew` in `processinput_d()`.
* Don't pre-scale `sb_avel` in `processinput_d()` and `processinput_r()`.
* Promote `p->angvel` from short to fixed_t.
* Don't descale `sync[snum].q16horz` in `processinput_d()` and `processinput_r()`.
* Ensure `false` bool is provided to `sethorizon()` call in `processinput_d()` and `processinput_r()`.
* Reset `p->q16angvel` in `resetplayerstats()`.
2020-07-28 22:12:09 +10:00
Mitchell Richters
158fd46581
- change Duke's synchronized_input
to CVAR cl_syncinput
.
2020-07-28 21:38:28 +10:00
Mitchell Richters
4a3366d798
- slight pixel tweaks to FullscreenHUD2 and original status bar.
2020-07-28 16:47:34 +10:00
Mitchell Richters
ea98978ae7
- move p->wackedbyactor
chase-cam code into applylook()
for increased smoothness.
2020-07-28 12:30:09 +10:00
Mitchell Richters
baed75ff8a
- move p->actorsqu angle changes from moveplayers()
to applylook()
so that it can be applied when not running synchronous input.
...
Fixes #54 .
2020-07-28 12:21:35 +10:00
Christoph Oelckers
ecdc92e6b9
- copied some changes to kill count management from DukeGDX.
2020-07-27 20:53:31 +02:00
Christoph Oelckers
218a9c84fd
- removed the last remaining Blood helpers from the file system, also deleted a few short files whose contents could be moved.
2020-07-27 19:38:41 +02:00
Christoph Oelckers
aea6467d00
- call D_ProcessEvents in Blood's main loop.
2020-07-27 19:12:49 +02:00