Commit graph

13936 commits

Author SHA1 Message Date
Mitchell Richters
791504b5eb - Remove some pointless weapon functions. 2023-03-24 19:38:10 +11:00
Mitchell Richters
7fe6befef8 - Exhumed: Split out player actions code. 2023-03-24 19:36:43 +11:00
Mitchell Richters
a6cec3d4f1 - Exhumed: Just use pPlayer->nAction in player code, don't store on the stack. 2023-03-24 15:14:07 +11:00
Mitchell Richters
0842ea3c14 - Exhumed: Clean out some stale goto calls that were commented out.
* Only two remaining gotos to handle now.
2023-03-24 15:11:32 +11:00
Mitchell Richters
611d7bae98 - Exhumed: Bring player neartag() call to branch where it's needed. 2023-03-24 15:11:32 +11:00
Mitchell Richters
ed2c557297 - Exhumed: Remove ClearSpaceBar() and just directly clear the input bit.
* Also fix issue where `SB_OPEN` bit never seemed to be cleared properly.
* Also just directly test/use the player's input actions to minimise stack variables during this cleanup process.
2023-03-24 15:11:32 +11:00
Mitchell Richters
7293a1f5d1 - Exhumed: Pass player pointer through to updatePlayerTarget(). 2023-03-24 11:59:34 +11:00
Mitchell Richters
cdffb61cc7 - Exhumed: Remove prototype POSIX targets didn't like. 2023-03-23 21:25:49 +11:00
Mitchell Richters
f80b98fe92 - Fix CMakeLists.txt.
* Didn't know these were in there... 🤦‍♂️.
2023-03-23 21:16:04 +11:00
Mitchell Richters
5d6744836f - Exhumed: Have feebtag() return an actor pointer instead. 2023-03-23 21:00:35 +11:00
Mitchell Richters
22e135afeb - Exhumed: Rename pickup actor in pickup code. 2023-03-23 20:52:04 +11:00
Mitchell Richters
757d7b3660 - Exhumed: Split out player pickup code to separate file.
* Want to work on this in isolation.
* Can likely optimise this out to a lookup array of function pointers.
2023-03-23 20:50:08 +11:00
Mitchell Richters
f68c168ae4 - Blood: Delete empty file that got missed. 2023-03-23 20:36:37 +11:00
Mitchell Richters
764ec032c1 - Exhumed: Split out player current item code. 2023-03-23 19:48:27 +11:00
Mitchell Richters
f7433234b2 - Exhumed: Split out player quake code. 2023-03-23 19:48:26 +11:00
Mitchell Richters
04ab6f4640 - Exhumed: Split out player invincibility code. 2023-03-23 19:47:41 +11:00
Mitchell Richters
1a8dcda5b6 - Exhumed: Split out player invisibility code. 2023-03-23 19:47:11 +11:00
Mitchell Richters
374f0bb295 - Exhumed: Split out player double code. 2023-03-23 19:46:45 +11:00
Mitchell Richters
b51623b415 - Exhumed: Split out player torch code. 2023-03-23 19:46:18 +11:00
Mitchell Richters
8f21a89abc - Exhumed: Remove some duplicated code already covered in InitPlayers(). 2023-03-23 19:14:57 +11:00
Mitchell Richters
27144c0bc3 - Exhumed: Store the player's index within the player's struct. 2023-03-23 19:14:26 +11:00
Mitchell Richters
645d75ba0b - Exhumed: Use pointers to access player in AIPlayer::Tick(). 2023-03-23 18:50:30 +11:00
Mitchell Richters
75de294560 - Exhumed: Clean out the rest of input.cpp. 2023-03-23 17:41:01 +11:00
Mitchell Richters
fb9ff7d105 - Exhumed: Increase quake precision in SetQuake(). 2023-03-23 17:38:18 +11:00
Mitchell Richters
bd30e31b8d - Exhumed: Move nQuake[] array into Player struct. 2023-03-23 17:38:18 +11:00
Mitchell Richters
05fd2911a4 - Exhumed: Move dVertPan[] array into Player struct. 2023-03-23 17:38:18 +11:00
Mitchell Richters
095b33fa67 - Exhumed: Clean out the rest of enginesubs.cpp. 2023-03-23 17:38:16 +11:00
Mitchell Richters
e85162df97 - Removed unused lastTic global. 2023-03-23 17:38:01 +11:00
Mitchell Richters
e5f3f5f149 - Make setForcedSyncInput() require a player index.
* This should only ever apply to the console player.
2023-03-23 17:09:02 +11:00
Mitchell Richters
7da3b097fb - Remove the extern status for gamesetinput.
* We don't need to save this variable, we reset it at the start of every tic anyway.
2023-03-23 17:03:43 +11:00
Mitchell Richters
183ad0c61c - Adjust a few setForcedSyncInput() calls. 2023-03-23 16:34:33 +11:00
Mitchell Richters
fa5490b834 - Exhumed: Just move analyzesprites() into gi->processSprites(). 2023-03-23 15:55:00 +11:00
Mitchell Richters
0ac7af6cd7 - Exhumed: Avoid unnecessarily iterating through tsprites twice. 2023-03-23 15:54:59 +11:00
Mitchell Richters
10ebc00853 - Exhumed: Attempt to make player pTarget updating MP friendly.
* This probably works better than using the temporary view pos vector of the console player, anyway.
* Might assist with #626 as well.
2023-03-23 15:54:59 +11:00
Mitchell Richters
3b889d5c36 - Exhumed: Make main loop player index aware. 2023-03-23 15:54:59 +11:00
Mitchell Richters
c486940b2c - Exhumed: Ensure playsim runs with PlayClock at 0 for first tic. 2023-03-23 15:54:59 +11:00
Mitchell Richters
eed1d14b9d - Exhumed: Split out velocity updating to static function. 2023-03-23 15:54:59 +11:00
Mitchell Richters
187710e9e2 - Exhumed: Set nFreeze input locking in right spot. 2023-03-23 15:54:58 +11:00
Mitchell Richters
895304ccee - Exhumed: Split out weapon updating to static function. 2023-03-23 15:54:58 +11:00
Mitchell Richters
e9e36fedb2 - Exhumed: Split out inventory updating to static function. 2023-03-23 15:54:58 +11:00
Mitchell Richters
4d6419732a - Duke: Add CVAR to allow disabling pitch reset with pitch input.
* Need to add this to the menu to address #853.
2023-03-23 15:54:58 +11:00
Mitchell Richters
88e6a6e894 - Rework ff652f454c slightly to accept an InputPacket pointer. 2023-03-22 20:08:53 +11:00
Mitchell Richters
2b22e49a9b - Duke: Temporary workaround for last commit so the player returns to centre on level load. 2023-03-22 18:26:23 +11:00
Mitchell Richters
ff652f454c - Tidy up how games reapply needed bits at start of tic. 2023-03-22 18:17:50 +11:00
Mitchell Richters
e5bad9af2c - Duke/RR: Re-arrange the playsim angle calls.
* Make them precisely where they were originally called from.
2023-03-21 21:37:25 +11:00
Mitchell Richters
181f88b028 - Duke/RR: Remove the confusing VEH_HEELTOE bit. 2023-03-21 10:41:55 +11:00
Mitchell Richters
2918c34d42 - Duke/RR: Fix two typos. 2023-03-21 10:39:24 +11:00
Mitchell Richters
64a3141f6f - Duke/RR: Add VEH_TURNING flag instead of testing left/right in places. 2023-03-21 10:21:30 +11:00
Mitchell Richters
f240b6c623 - Duke/RR: Fix bad flag test that needed to confirm two flags set, not any one of the two. 2023-03-21 10:12:38 +11:00
Mitchell Richters
19ddc1ee51 - Duke/RR: Repair angle test when adjusting velocity.
* Initially figured I could just use the sign of the angle adjustment, but the vehicle code makes left/right reversals that necessitate using the flags for this.
2023-03-21 09:39:36 +11:00
Mitchell Richters
a24b8499fc - Duke/RR: Swap out all 5-6 bools for a bitfield. 2023-03-21 09:39:35 +11:00
Mitchell Richters
a3a150558b - Duke/RR: Consolidate (mostly) identical vehicle throttle code. 2023-03-20 21:54:47 +11:00
Mitchell Richters
c8238d9646 - Duke/RR: Consolidate (mostly) identical vehicle sound code. 2023-03-20 21:46:18 +11:00
Mitchell Richters
cc977d510a - Duke/RR: Consolidate identical vehicle drinking code. 2023-03-20 21:46:16 +11:00
Mitchell Richters
07b1ec518b - Duke/RR: Consolidate identical vehicle bumping code. 2023-03-20 21:07:52 +11:00
Mitchell Richters
d5bc7718d1 - Duke/RR: Tidy up angle changes/accesses in vehicle ticker code.
* Already have an actor pointer on the stack we can use.
* Other tidy-ups.
2023-03-20 21:07:52 +11:00
Mitchell Richters
134b635966 - Duke/RR: Ensure braking sync bit is always cleared in onBoat(). 2023-03-20 21:07:50 +11:00
CandiceJoy
9c65d2cde1 Fixed Mac default wad/grp search paths. 2023-03-19 20:41:46 +01:00
Mitchell Richters
c6f6cf5933 - Duke/RR: Fix vehicle controller sign that got lost along the way.
* Issue from 9d74a5c60b.
2023-03-19 22:45:02 +11:00
Mitchell Richters
ebd8ab985e - Duke/RR: Don't archive off MotoSpeed for reuse at end of vehicle functions.
* Kept the workflow identical to the old setup in the other commits, but does not seem necessary and all it does is make the speed one tic behind where it would be otherwise.
2023-03-19 21:58:30 +11:00
Mitchell Richters
ba8f1069ab - Duke/RR: Fix an issue with reversing.
* Got the position of the bools wrong here when removing something unsafe from the input handler.
2023-03-19 21:35:39 +11:00
Mitchell Richters
a9e606ca68 - Duke/RR: Shorten a long ternary. 2023-03-19 21:08:43 +11:00
Mitchell Richters
81650036e6 - Duke/RR: Remove vehForward/Reverse variables from player struct.
* Back in 2020, I was trying to tidy stuff up and had no idea about network awareness, etc.
* The original game misused network bits here, however I don't see why the player's angle can't just be tested for signedness. Again, something I didn't see way back when...
2023-03-19 20:55:39 +11:00
Mitchell Richters
37e9cfed45 - Duke/RR: Remove vehBraking variable from player struct.
* Back in 2020, I was trying to tidy stuff up and had no idea about network awareness, etc.
* We must continue the misuse of network bits like the original game did to make sure the RRRA vehicles are network aware.
2023-03-19 20:54:43 +11:00
Mitchell Richters
31f8de3854 - Duke/RR: Remove vehTurn variables from player struct.
* Back in 2020, I was trying to tidy stuff up and had no idea about network awareness, etc.
* The original game misused network bits here, however I don't see why the player's angle can't just be tested for signedness. Something I didn't see way back when...
2023-03-19 20:54:19 +11:00
Mitchell Richters
76e6efd204 - Duke/RR: Fix oversight in previous commit.
* Unknowingly had forced synchronised input on!
2023-03-19 20:09:14 +11:00
Mitchell Richters
d380e73cfd - Duke: Consolidate boat/moto turn functions into one. 2023-03-19 14:59:35 +11:00
Mitchell Richters
c13c244dca - Simplify moto velocity sign determination. 2023-03-19 14:35:02 +11:00
Mitchell Richters
9d74a5c60b - Duke: Consolidate vehicle turning code between boat/moto. 2023-03-19 14:35:00 +11:00
Mitchell Richters
56b95a46f7 - Duke: Consolidate vehicle tilting code between boat/moto. 2023-03-19 13:31:47 +11:00
Mitchell Richters
4153c38bd3 - Clean up GameInterface struct a bit.
* Make everything that's overridden abstract.
* Remove defunct/deleted methods.
2023-03-19 11:27:07 +11:00
Mitchell Richters
de5b73c60f - SW: Fix strafing issue due to missing bool negation. 2023-03-19 11:14:04 +11:00
Mitchell Richters
056330863c - Duke: Eliminate GetActor() calls in playerisdead(). 2023-03-19 09:10:14 +11:00
Mitchell Richters
a7d829d539 - Duke: Change where centering view locks the input. 2023-03-19 09:08:24 +11:00
Christoph Oelckers
9b751d6469 use GAMENAMELOWERCASE for defining GAME_DIR.
This was handled inconsistently in different parts of the Mac backend.
2023-03-18 12:31:32 +01:00
Mitchell Richters
3ad50d5045 - Duke: Don't reset synchronised input flag if centering view.
* The way the playsim works, because the horizon functions come after the yaw ones, yaw was not being applied while pitch was locked.
2023-03-18 22:21:38 +11:00
Mitchell Richters
5b382ac2c6 - Duke: Remove everyothertime global, we can just use PlayClock. 2023-03-18 22:21:38 +11:00
Christoph Oelckers
792f977d46 - fixed STAT_ACTORS must handle actors where scale.X is 0 as 'deleted' and destroy them. 2023-03-18 12:08:53 +01:00
Mitchell Richters
1147030bca - Remove concept of InputOptions, its messy and unnecessary. 2023-03-18 21:16:50 +11:00
Mitchell Richters
366423a09b - Extra const-ness that I'm not sure matters or not. 2023-03-18 20:14:01 +11:00
Mitchell Richters
672c53c35c - Move CCMD pause to gamecontrol.cpp so it can be static. 2023-03-18 19:54:05 +11:00
Mitchell Richters
b3c27a177e - Consolidate each game's gi-GetInput() into a unified function.
* Eliminates a lot of boilerplate.
* Consolidation of input accumulation buffers discretely used in each game.
* Allows privatisation of `PlayerAngles::CameraAngles`.
2023-03-18 19:49:25 +11:00
Mitchell Richters
65ee4b14d6 - Move gi->getConsoleActor() directly into the header. 2023-03-18 19:29:29 +11:00
Mitchell Richters
ee294d7fa0 - Blood: Force synchronised input while dead. 2023-03-18 19:29:29 +11:00
Mitchell Richters
3442290fa2 - Repair bad setup for global input scale uncovered after making Duke better.
* `I_GetInputFrac()` must always be called, even if we don't use it otherwise the value grows too large.
2023-03-18 19:29:29 +11:00
Mitchell Richters
4355a44721 - Duke: Rework input blocking setup.
* Takes the duplicated conditions out of the input handler and makes the ticker responsible by forcing synchronised input.
2023-03-18 19:29:29 +11:00
Mitchell Richters
bd3e9b305e - Adjust signatures of input functions slightly for consistency. 2023-03-18 19:29:29 +11:00
Mitchell Richters
b8ba78cf89 - Exhumed: Use array pointers in GameInterface::Ticker() for one's sanity. 2023-03-18 19:29:28 +11:00
Mitchell Richters
42a895d666 - Exhumed: Move dead checks out of the input handler and into the ticker. 2023-03-18 19:29:15 +11:00
Mitchell Richters
1af60fb02b - Exhumed: Clear local input accumulation buffer after copying a packet, just like the other games. 2023-03-18 19:19:22 +11:00
Mitchell Richters
0cf44e42fc - Exhumed: Eliminate initsectp global. 2023-03-18 19:19:22 +11:00
Mitchell Richters
d30ce9691a - Exhumed: Eliminate initpos global. 2023-03-18 19:19:22 +11:00
Mitchell Richters
5fe4b0fdb1 - Exhumed: Eliminate inita global. 2023-03-18 19:19:21 +11:00
Mitchell Richters
401236980c - Duke: Tidy up some unnecessarily deep branches in vehicle input code. 2023-03-18 19:19:21 +11:00
Mitchell Richters
51a20211f3 - Duke: Tidy up some repeated bools in vehicle input code. 2023-03-18 19:19:21 +11:00
Mitchell Richters
37dda1aa0e - Duke: Move input bit pre-processing into hud_input().
* Really, _really_ need to do something about this `crouch_toggle` malarkey...
2023-03-18 19:19:20 +11:00
Mitchell Richters
5a6495956f - Duke: Move Quick_Kick button test into ApplyGlobalInput() as it doesn't seem to share a bit with any other game anymore. 2023-03-18 19:17:30 +11:00
Mitchell Richters
b1888a44c3 - SW: Process weapon bits within the ticker and not the input handler. 2023-03-18 19:17:30 +11:00
Mitchell Richters
a4f0a75a58 - SW: Simplify unsynchronised input setup.
* Had complicated flagging and setup for SO vehicles that never worked and doubt I'd ever get to work.
* Setup now lends itself well to a potential more generic input setup.
2023-03-18 19:17:30 +11:00
Mitchell Richters
292030b59e - Duke: Repair issues with going underwater after taking some stuff out of the global state.
* Really, need to do something about this `crouch_toggle` malarkey...
2023-03-18 19:17:28 +11:00
Mitchell Richters
b07732bae4 - Duke: Remove duplicated call to SetupGameButtons() that's done globally in RunGame(). 2023-03-18 09:15:17 +11:00
Mitchell Richters
a45890e064 - Move some Duke-specific stuff out of ApplyGlobalInput(). 2023-03-18 09:15:15 +11:00
Mitchell Richters
eed9716d86 - Move joyaxes[] array from getHidInput() directly into ControlInfo. 2023-03-17 20:58:38 +11:00
Mitchell Richters
08d22f49f4 - Negate ControlInfo::dpitch to match data out of backend. 2023-03-17 20:58:13 +11:00
Mitchell Richters
fc069feac6 - Negate ControlInfo::dyaw to match data out of backend. 2023-03-17 20:58:13 +11:00
Mitchell Richters
446218dd7b - Get mouse/controller input by pointed variable and not copy on return. 2023-03-17 20:58:11 +11:00
Mitchell Richters
1f97e73501 - Rename ControlInfo joystick variables to names matching backend. 2023-03-17 20:16:58 +11:00
Mitchell Richters
686bec5664 - Duke: Make vehicle input functions work on floats and not doubles and FAngles.
* It's what's natively needed at the end of the day.
2023-03-17 19:40:46 +11:00
Mitchell Richters
7f79ee9801 - Exhumed: Repair missing negation affecting death sequence.
* Pitch negation strike's back!
2023-03-17 19:17:18 +11:00
Mitchell Richters
81caf74721 - Tidy up coord stat to use gi->getConsoleActor() and also print pitch. 2023-03-17 17:28:26 +11:00
Mitchell Richters
3c4b4e4483 - Tidy up warptocoords CCMD since everything is in an actor now.
* Now accepts floating point inputs.
* Restores lost pitch capability.
2023-03-17 17:28:04 +11:00
Mitchell Richters
e6cffbaefb - Duke: Remove unnecessary playrunning() test within a loop. 2023-03-17 14:41:17 +11:00
Mitchell Richters
130c5315e9 - Call PlayerAngles::resetCameraAngles() from within the player loop of each game.
* I was only thinking of the console player initially but since each game can draw the view of other players in network games, each game will need to update and reset the camera angles for all players.
2023-03-17 14:40:18 +11:00
Mitchell Richters
d329328191 - Rename PlayerAngles::RenderAngles to CameraAngles.
* Better conveys what it is and separates it from the already established `getRender*()` methods around the place.
* Sorry Simon!
2023-03-17 14:20:36 +11:00
Mitchell Richters
742a2e5c9a - Exhumed: Ensure automap uses untouched interpolated actor position.
* Using chase cam while the automap was on was drawing the player sprite incorrectly.
2023-03-17 14:11:27 +11:00
Mitchell Richters
0fca5b14a2 - SW: Ensure automap uses untouched interpolated actor position.
* Using chase cam while the automap was on was drawing the player sprite incorrectly.
2023-03-17 13:45:29 +11:00
Mitchell Richters
d6b68dec5e - Duke: Remove player_struct::resurrected flag I added in 2021 and fix issue properly.
* The check for `player_struct::dead_flag` in `FinalizeInput()` was overzealous and is not checked in the original code in this instance.
2023-03-17 12:29:37 +11:00
Christoph Oelckers
d17650f885 - removed the ValidateTarget call from HackSeqCallback.
The original function does not validate its target, it just uses undefined memory instead when this case happens.
2023-03-16 17:49:50 +01:00
Mitchell Richters
c4041affb1 - Duke: Reduce boilerplate from previous commit. 2023-03-16 22:24:34 +11:00
Mitchell Richters
9a17d33579 - Duke: Ensure spawned player actor has view height baked in up until the first getzrange() call.
* The original game spawning the player's sprite/actor would set the sprite's pos with the Z matching the player's, which had a height offset already applied.
* This baked in height offset was carried through up until the `SetActor()` call in `processinput()`, where the original game would then strip off `gs.playerheight`.
* This baked in height offset within the actor is critical on the first tic for pre-activated elevators on level spawn to function right, such as E1L2 and E2L3.
* Properly setting the player actor's Z immediately after the initial `getzrange()` call, but before other functions like `movement()`, etc further down in `processinput()` is the best spot.
* Fixes #870.
2023-03-16 22:15:11 +11:00
Mitchell Richters
8bcbc1b892 - Null the roll angle used for weapon drawing when looking left/right and with Blood's delirium for now.
* Intended to make the look left/right keys better, but doesn't work properly for weapons made up of layered parts of varying sizes.
* Fixes #879.
2023-03-16 16:34:31 +11:00
Mitchell Richters
528eb0ea9a - Blood: Fix state checks when using TNT while diving underwater.
* A mess of bloody proportions...
* Originates from d30c94c709.
* Fixes #878.
2023-03-16 15:50:52 +11:00
Mitchell Richters
cb1e4e7a34 - Exhumed: Ensure Player::items[] is signed.
* Change originates from b71c725e3e.
* Matches PCExhumed and GDX.
* Logic in game requires this variable to be signed.
* Fixes #415.
* Fixes #888.
2023-03-16 13:05:22 +11:00
Mitchell Richters
3d6f1e1a04 - Exhumed: Store dedicated player velocity in Player struct.
* Changes implementation in 67c7dd65f9.
* Cannot rely on the actor's velocity alone as parts of the game modify this, such as getting hit by lava dudes, but game nullifies this at the start of the player's tic.
2023-03-16 12:17:42 +11:00
Mitchell Richters
b42b9de2a2 Revert "- SW: Tune shadow drawing code so that it by default uses the sector's interpolated floorz when possible."
This reverts commit 3271c2011e.

* Fixes #884
* Fixes #892
2023-03-16 11:23:05 +11:00
Mitchell Richters
0d62e6befe - Exhumed: Optimise UnlinkIgnitedAnim() from fb97e3c6ca a bit.
* Bad cherry pick caused a stat iteration over the wrong stat number.
* Cleaned up commentary to reflect that we have actors and not so much sprites or an anim array anymore.
2023-03-15 22:52:14 +11:00
Mitchell Richters
07a82508fa - Blood: Fix palette of actor sprite on 2D automap.
* Fixes #846.
2023-03-15 22:22:52 +11:00
Mitchell Richters
e8f2f98473 - Repair voxel 2D vector adjustment.
* Originates from a6fb831894.
* Division taken off, probably mixing up x/yrepeat and x/yoffset.
* Fixes #869.
2023-03-15 20:42:24 +11:00
Mitchell Richters
a4bca328bc - SW: Remove Player::siang since we have the same data in 2023-03-15 19:57:45 +11:00
Mitchell Richters
7da3c62ea8 - Blood: Repair velocity scaling in ConcussSprite().
* Issue originates back from 645c606e39.
* During initial floatification, the velocity addition was changed a mulscale of 16 to 12, quadrupling the amplification.
* A lot's changed since then, but we can restore the size of the velocity by simply dividing the size value by 4x.
* Turned into a reciprocal as well to avoid division.
* Fixes #860.
2023-03-15 19:42:33 +11:00
Mitchell Richters
39624da390 - SW: Remove getViewHeightDiff() call in player sprite draw code.
* I added this when removing the player's pos vector in lieu of the sprite vector to further smooth out the sprite's Z in chase cam mode, but it just doesn't look good.
2023-03-15 19:42:33 +11:00
sirlemonhead
fb97e3c6ca PCExhumed: Fixed Ignited sprite anim issue that could cause invalid array access.
* Fixes #638.
2023-03-15 17:20:29 +11:00
Mitchell Richters
0dba1af7c0 - Move canslopetilt test for PlayerAngles::doViewPitch(). 2023-03-15 16:36:56 +11:00
Mitchell Richters
2162e51424 - Blood: Amend how QAVs process when game is paused.
* Repair of initial implementation in ebdc9c31f2.
* Fixes #883.
2023-03-14 21:45:47 +11:00
Mitchell Richters
016016b7ab - Blood: Fix max weapons slot test preventing slot 12 from being called.
* Fixes #891.
2023-03-14 21:45:46 +11:00
Mitchell Richters
a90665732c - Clean up other PlayerAngles interfaces for consistency. 2023-03-14 21:45:38 +11:00
Mitchell Richters
62561d863e - Tidy up PlayerAngles::doPitchKeys() interface by passing the whole sync packet through. 2023-03-14 21:45:37 +11:00
Mitchell Richters
9ffc65fa48 - Exhumed: Eliminate PlayerInput struct in favour of InputPacket object PlayerList::input. 2023-03-14 21:45:37 +11:00
Mitchell Richters
67c7dd65f9 - Exhumed: Remove PlayerInput::vel in favour of just using actor's velocity. 2023-03-14 21:45:37 +11:00
Mitchell Richters
73acffac2c - Exhumed: Move PlayerInput::nItem to Player struct as Player::nCurrentItem. 2023-03-14 21:45:37 +11:00
Mitchell Richters
f77b1007be - Exhumed: Remove unused PlayerInput::buttons 2023-03-14 21:45:37 +11:00
Mitchell Richters
c73ee5f848 - Exhumed: Move PlayerInput::pTarget to Player struct. 2023-03-14 21:45:37 +11:00
Mitchell Richters
c1f52b1137 - Adjust PlayerAngles::doViewPitch() so that view pitch always resets to 0 upon enabling mouse aiming. 2023-03-14 21:45:36 +11:00
Mitchell Richters
18ef460a99 - Tidy up interface for PlayerAngles::doViewPitch() since we have internal access to the player's actor. 2023-03-14 21:45:36 +11:00
alexey.lysiuk
41d7118099 - fixed compilation error
source\core\razefont.cpp(60,3): error C2181: illegal else without matching if
2023-02-21 10:30:44 +02:00
Christoph Oelckers
07d87940f2 - completed all of Blood's and Duke's fonts. 2023-02-20 16:52:51 +01:00
Christoph Oelckers
b645929035 - fixed some message mappings. 2023-02-19 13:01:20 +01:00
Christoph Oelckers
6729c342af - undid bad code from a broken GZDoom PR. 2023-02-11 19:49:49 +01:00
Christoph Oelckers
09c8430e4e - removed bad include. 2023-02-11 12:36:31 +01:00
Christoph Oelckers
8c99d7b034 - Backend update from GZDoom
* scriptable CVARs.
* GLES update
* various ZScript improvements.
2023-02-11 12:06:58 +01:00
Christoph Oelckers
fd04cda324 - added a font option to have lower case for Latin only.
This is meant for SW's SmallFont to avoid creating lowercase Greek or Cyrillic letters. The font is too small to render them adequately.
2023-02-11 10:43:59 +01:00
Christoph Oelckers
29de90beb6 - Duke: disable the 1.5 BigFont for languages using the Cyrillic or Greek alphabet
This font is incomplete, unlike the 1.3 variant, so for these languages use the font that can render them.
2023-02-11 10:43:09 +01:00
Rachael Alexanderson
3c4ab95664 - reflect https://github.com/ZDoom/gzdoom/pull/1983 2023-02-09 18:30:55 -05:00
Christoph Oelckers
6c77d1c39e - Duke: fixed setup of purely scripted enemies,
Some band-aid is still needed for the time being.
2023-02-09 17:34:59 +01:00
Mitchell Richters
17392fe400 - Change viewport aspect calculation from 6aa94a9b8e to be a reciprocal multiplication. 2023-02-06 19:58:08 +11:00
Mitchell Richters
f8035bb4ba - Re-calculate the sector for each eye if it has a shift factor applied. 2023-02-06 19:55:46 +11:00
Mitchell Richters
2020860ffe - For I_GetInputFrac(), just have the caller check if input is synchronised. 2023-02-05 08:40:25 +11:00
Mitchell Richters
9961a66a1f - Remove inputScale global and make static in mainloop.cpp. 2023-02-05 08:37:37 +11:00
Mitchell Richters
1938efabe6 - Fix bad return in scaletozero() from 924b601199. 2023-02-05 08:27:44 +11:00
Mitchell Richters
924b601199 - Change scaletozero() to return true when back at 0 to save callers having to test angle's signum again. 2023-02-04 19:01:01 +11:00
Mitchell Richters
cbcc4f7729 - SW: Repair pitch setup for all weapons not accounting for the player's view pitch offset.
* Long-standing omission from back in 0e3604ac9e.
2023-02-04 17:18:47 +11:00
Simon
e28088380f Fix crash in Shadow Warrior when player dies 2023-02-04 17:05:20 +11:00
Mitchell Richters
5fd4fbfde5 - Remove some leftover debug code. 2023-02-04 17:05:20 +11:00
Mitchell Richters
ca4b9c5044 - Slight tidy-up in vectors.h. 2023-02-04 17:05:20 +11:00
Mitchell Richters
30de9c1922 - Factor in view pitch when clamping player's actor pitch. 2023-02-04 17:05:19 +11:00
Mitchell Richters
991ef5c27f - Minor input tidy-up. 2023-02-04 17:05:18 +11:00
Christoph Oelckers
8052bc7e46 - fixed bad vector addition to incorrect variable. 2023-01-29 09:05:35 +01:00
Christoph Oelckers
4328016963 - move the remaining parts of spawninitdefault to DukeActor::Initialize.
This ensures proper execution of all code - spawninitdefault was designed to be the fallback for actors without a special case in spawninit.
2023-01-28 16:33:35 +01:00
Christoph Oelckers
38b278b12d - fixed enemy setup.
All enemies now run a native init function to reduce script-induced problems.

this required adding a NOGRAVITY flag so that the recon can use the same code as well which was the only enemy relying on custom code.
2023-01-28 16:33:15 +01:00
Christoph Oelckers
0db441accb - scriptified the native parts of the powder keg.
This was the last remaining actor with its own native ticking part.
2023-01-28 16:31:46 +01:00
Christoph Oelckers
9f01c87ccb - scriptified the native part of FireflyFlyingEffect. 2023-01-28 16:31:45 +01:00
Christoph Oelckers
9783b8c402 - scriptified World Tour's flamethrowerflame.
The first of 3 mixed native/CON items which are the last things remaining in the main thinker loops.
2023-01-28 16:31:45 +01:00
Christoph Oelckers
dce0afe499 - Blood: fixed application of push velocity. 2023-01-28 12:43:46 +01:00
Christoph Oelckers
432021b8e7 - Exhumed: avoid shade hacks with palette emulation on.
This code only makes sense with true color rendering.
2023-01-28 11:44:05 +01:00
Christoph Oelckers
fc547f5ada - Blood: fixed bad array resize. 2023-01-28 10:59:27 +01:00
Christoph Oelckers
3b8956c728 - Blood: make sure that tracking condition data is always properly initialized. 2023-01-28 10:11:34 +01:00
Christoph Oelckers
acac74715f partially Revert "- pass shade values to sky renderer"
This reverts commit 380864d6fb.

The report this was supposed to address was bogus.
2023-01-28 09:21:53 +01:00
Rachael Alexanderson
2778ee72cd - fix commit 532a726ae3 - i_pauseinbackground is not supposed to bypass menu/console pause 2023-01-27 03:02:13 -05:00
Christoph Oelckers
5ebce5afba - fix last commit 2023-01-21 15:08:47 +01:00
Christoph Oelckers
dbef2f74d1 - print an error when a sound file cannot be found. 2023-01-21 14:51:43 +01:00
Christoph Oelckers
33f0d229fa - Exhumed: fixed bad return values for two HUD functions. 2023-01-21 14:37:57 +01:00
Christoph Oelckers
19a58ddeb0 - Blood: fixed velocity for ejected shell casings. 2023-01-21 14:33:42 +01:00
Christoph Oelckers
9cc7f90410 - Blood: reverted GetSpriteExtents to integer math.
The change in precision was enough to make the game misbehave.
2023-01-21 13:56:14 +01:00
Christoph Oelckers
f92d20afc0 - fixed bad slope sprite offset in clipmove. 2023-01-21 13:39:16 +01:00
Christoph Oelckers
2198782ecb - SW: make player sounds always follow the source.
Let's hope this fixes the issues with weapon sounds.
2023-01-21 12:01:32 +01:00
Christoph Oelckers
81f6899e72 - C++20 constant fixes.
Use of enums is deprecated in floating point calculations.
2023-01-21 10:34:44 +01:00
Christoph Oelckers
9379e873b3 - error out when encountering an unknown $ token in SNSINFO.
No need to preserve this insanity from old ZDoom times.
2023-01-21 09:34:25 +01:00
Christoph Oelckers
8e5e52f80e - enable Spanish for Duke and related games.
Nam/WW2GI was completed by machine translated texts, this was all simple stuff like item names.
2023-01-20 17:13:18 +01:00
Christoph Oelckers
a570e77509 - clear menuDelegate in case of an error in MENUDEF parsing. 2023-01-20 17:10:25 +01:00
Christoph Oelckers
acfca3fbdc - fixed SNDINFO parser to actually read new sound definitions. 2023-01-18 06:58:37 +01:00
Christoph Oelckers
f6ff02c51e - Blood: fixed incorrect defaults for relative sound volume in two places 2023-01-18 06:58:37 +01:00
Christoph Oelckers
3ab1ae5f7a - allow setting Blood's relative volume hack value via SNDINFO. 2023-01-15 16:18:48 +01:00
Christoph Oelckers
bb7f00988a - give Blood's sounds well defined names so they can be defined via SNDINFO. 2023-01-15 16:15:28 +01:00
Christoph Oelckers
841402a776 - allow setting loop points for WAV sounds or other simple formats. 2023-01-15 15:19:21 +01:00
Christoph Oelckers
57695a3e07 - cleaned up the pitch management in the sound backend. 2023-01-15 14:06:01 +01:00
Christoph Oelckers
f1c3a6548f - use backend pitch features for Duke instead of replicating them on the game side. 2023-01-15 13:18:54 +01:00
Christoph Oelckers
8859712a7b - copied $pitchset SNDINFO command from GZDoom. 2023-01-15 12:22:07 +01:00
Christoph Oelckers
8de7aa5975 - corrected error messages. 2023-01-15 12:14:47 +01:00
Christoph Oelckers
ad0bff921b - allow setting Duke's relevant sound properties through SNDINFO. 2023-01-15 11:54:24 +01:00
Christoph Oelckers
fca0bdf379 - Backend update from GZDoom. 2023-01-15 09:30:01 +01:00
Christoph Oelckers
8001c4041f - Duke: fixed hitscan vector for pistol's aim check. 2023-01-14 16:48:28 +01:00
Christoph Oelckers
1bfccbcb6e - explicitly destroy the AltHUD when exiting.
This is to avoid problems with the GC on shutdown.
2023-01-14 14:09:25 +01:00
Christoph Oelckers
6c3d03cd48 - fixed incorrect sector in a few sprites of World Tour E5L1. 2023-01-14 13:18:53 +01:00
Christoph Oelckers
97f14c0e0e - Duke: fixed projectile offsetting for BOSS2 and BOSS3 2023-01-14 11:53:13 +01:00
Mitchell Richters
62c6131901 - Duke: Make screen backdrop setup the same as the other games. 2023-01-13 11:06:42 +11:00
Mitchell Richters
7f1add4786 - Exhumed: Remove unused local variable left over from 087aa7b2ee. 2023-01-13 10:34:31 +11:00
Mitchell Richters
c7d2a64af0 - Blood: Use nullAngle in one place. 2023-01-13 09:03:02 +11:00
Mitchell Richters
8ef7e0e4f3 - Duke: Only draw the screen border when the viewport isn't 100%. 2023-01-13 08:56:12 +11:00
Mitchell Richters
087aa7b2ee - Exhumed: Tidy up DrawMap() entrypoint. 2023-01-12 18:59:32 +11:00
Mitchell Richters
c606fc11da - Add call to resetForcedSyncInput() for all games.
* Blood was missing it.
* If it's pre-added to all games, it never needs thinking about.
2023-01-12 18:59:32 +11:00
Christoph Oelckers
b991af2dbc - fixed incomplete statnum setup. 2023-01-09 23:39:20 +01:00
Christoph Oelckers
b7799a5a3c - fix kill counter in Blood (for real this time.) 2023-01-08 20:12:28 +01:00
Christoph Oelckers
d7d4bfe04b - Blood: use a 3D unit vector to set Blood's projectile velocity. 2023-01-08 19:16:58 +01:00
Christoph Oelckers
532f994ccb - RR: stop the bowling pins' tumbling animation when they come to a rest.
Fixes an original RR bug.
2023-01-08 18:46:42 +01:00
Christoph Oelckers
ff33dd7188 - Duke: fixed bad surface check.
Surfaces are not bit flags, they are values.
2023-01-08 18:32:38 +01:00
Christoph Oelckers
deaec2d91d - disabled property-type definition of spritetype members.
As it turned out this is simply too dangerous - these should be left to be loaded from the map data or set manually.
All remaining setups using this feature have either been moved to Initialize or other meta properties that are not affected by map loading.
2023-01-08 16:45:09 +01:00
Mitchell Richters
4f8909db96 - SW: Don't interpolate the player's sprite in InterpSectorSprites(), it's interpolated elsewhere.
* Fixes #845.
2023-01-08 23:25:45 +11:00
Mitchell Richters
3271c2011e - SW: Tune shadow drawing code so that it by default uses the sector's interpolated floorz when possible.
* Partially addresses #845.
2023-01-08 23:03:59 +11:00
Christoph Oelckers
7262184d53 - SW: account for invalid player actors being passed to the sound engine. 2023-01-08 12:41:34 +01:00
Mitchell Richters
1f489d5dbe - SW: Don't back up the actor's Z after changing it in KeepActorOnFloor().
* This seems completely wrong and kills Z interpolation on slopes, vators, etc.
* Thanks Graf 😁
* Fixes #844.
* Partially addresses #845.
2023-01-08 22:24:17 +11:00
Christoph Oelckers
1e3a285534 - Duke: fixed access card activation delay. 2023-01-08 10:34:14 +01:00
Christoph Oelckers
d5b217df2a - Vulkan shader cache from GZDoom. 2023-01-07 19:32:15 +01:00
Christoph Oelckers
905a9bfeae - backend update from GZDoom. 2023-01-07 19:30:49 +01:00
Christoph Oelckers
5952b79af5 - FString fixes. 2023-01-07 19:15:03 +01:00
Christoph Oelckers
262e93db2b - call FullGc twice, because once does not seem to be sufficient anymore when the object system is shut down 2023-01-07 16:01:37 +01:00
Rachael Alexanderson
532a726ae3 - respect i_pauseinbackground setting 2023-01-07 07:18:52 -05:00
Mitchell Richters
165afbbfa9 - SW: Restore lost SetAngleFromChange(actor) call from previous commit. 2023-01-07 22:49:22 +11:00
Christoph Oelckers
ae6af08cf1 - SW: cleaned up SlopeBounce and fixed some bad math. 2023-01-07 12:23:29 +01:00
Christoph Oelckers
2e35d6a6a8 - Exhumed: account for rounding errors in MoveSectorSprites
The formula here left no margin for error and minor rounding errors are inevitable with this code.
2023-01-07 10:45:15 +01:00
Christoph Oelckers
cfef8c8a71 - ignore executable files in a zip's main folder when checking for mod content in a subdirectory. 2023-01-06 18:01:34 +01:00
Christoph Oelckers
7cf13ed158 - fixed bad angle math in cl_showweapon handler. 2023-01-06 17:22:21 +01:00
Mitchell Richters
9a27cf025f - Duke: Fix bad setup for stopping Duke's scream when putting the jetpack on. 2023-01-06 22:17:14 +11:00
Mitchell Richters
5e2991acc7 - Duke: Additional fixes for alterang().
- Initial issue started in 3c1970e9e0.
- Fix in 4f59e8a3d1 was partial and not enough.
- Ensure delta angle is absolute in if statements as required, but don't use absangle as we need to apply the true delta in the last conditional.
- Fix incorrect random angle addition as compared to older source.
- Fixes #735.
2023-01-06 21:39:55 +11:00
Mitchell Richters
1d0e9b369e - Blood: Fix bad spawned actor angle for actFireMissile().
* Originating from a8cc6c1189.
* Fixes #837.
2023-01-06 17:55:40 +11:00
Mitchell Richters
1438bb5e80 - Blood: Ensure actor's XY pos is updated before calling Z slope utils.
* Originates from efc832ca5c.
* Fixes #833.
2023-01-06 17:08:56 +11:00
Mitchell Richters
f69bfe4959 - SW: Remove leftover debug prints from previous commit. 2023-01-06 12:10:19 +11:00
Christoph Oelckers
32ce8a97bf - SW: do not double interpolate sectors that are both part of a sector object but also have a global interpolation attached.
In this case the SO interpolation must be skipped. The only use case for this combination is sine-wave animated water.
2023-01-05 19:26:42 +01:00
Mitchell Richters
179ec32d5f - SW: Fix automap sprite angle which was not right with unsynchronised input. 2023-01-05 21:00:32 +11:00
Mitchell Richters
ba364a1cb6 - Duke: Fix automap sprite angle which was not right with unsynchronised input. 2023-01-05 21:00:31 +11:00
Mitchell Richters
676cdba259 - Blood: Adjust VDoorBusy() setup from e133985fa0.
* Changes to case 3 while visibly different, actually equates to the same algorithm for case 0.
* Revert case 3 back to original condition and send through 0 to `ZTranslateSector()` in `VDoorBusy()` if its 3 and we're not vanilla.
2023-01-05 20:59:14 +11:00
Mitchell Richters
d59208ce74 - Default initialise g_nextskill to -1 so maps loaded directly from the command line load with the game's default skill. 2023-01-05 20:57:14 +11:00
Mitchell Richters
a93342df85 - Duke: Only store one VMValue member on the stack in CallInitialize(). 2023-01-05 20:56:04 +11:00
Christoph Oelckers
220c1f0e76 - make sure the RPG's start spund plays.
This fix is just a temporary workaround due to the incomplete scriptfication
2023-01-04 20:20:10 +01:00
Mitchell Richters
a36cb45421 - Blood: Add VanillaMode() test to previous commit. 2023-01-03 09:01:37 +11:00
Mitchell Richters
e133985fa0 - Blood: Adjust sine wave in GetWaveValue for 4th type to use full curve of the wave.
* Initial setup would cause a very abrupt stop when coming to the top of an elevator, such as the one in E1M5.
* This would continue for an abrupt fall, causing the floor to essentially give out underneath the player or a dude actor.
* Lengthened wave allows the wave to start off softly and finish softly, with the elevator fastest in the middle of motion.
* Fixes #778.
2023-01-02 23:42:37 +11:00
Mitchell Richters
95f05d51c5 - Blood: Increase precision of values used within GetWaveValue(). 2023-01-02 23:26:54 +11:00
Mitchell Richters
30cacb1a70 - Blood: Fix bad cherry pick in bcd2d82bc7. 2023-01-02 19:33:51 +11:00
CandiceJoy
483cec5bdd - Fixed custom height and width not saving.
* Fixes #780.
2023-01-02 19:30:46 +11:00
bcd2d82bc7 - Blood: Allow fire button to be used for tnt/spray throw
Prevent alt fire blocking fire button for tnt/spray can throwing

* Advised of fix to Raze here: https://github.com/nukeykt/NBlood/pull/654#issuecomment-1253886969
* Fixes #671.
2023-01-02 19:24:38 +11:00
Mitchell Richters
6aa94a9b8e - Ensure the viewport's aspect ratio is factored into the HUD's aspect ratio.
* Fixes #617.
2023-01-02 18:52:19 +11:00
Mitchell Richters
c5f27f28b7 - SW: Tidy up the player sprite pos variable a little. 2023-01-02 17:06:01 +11:00
Mitchell Richters
577099284f - SW: Increment PlayClock at the end of the tic, not at the start. 2023-01-02 16:49:02 +11:00
Mitchell Richters
deef767c5d - Blood: Fix some nullptr issues in checkHit() and checkFloorHit().
* Fixes #834.
2023-01-02 15:02:57 +11:00
Mitchell Richters
b03d674a74 - SW: Fix tank track velocity.
* Originating from 8efe6f638b.
* Velocity was correctly floatified initially but because it was unwrapped, it never got adjusted for Q28.4 later on.
2023-01-02 14:41:43 +11:00
Mitchell Richters
56d9ccfc9c - SW: Fix tank tracks not working.
* Originating from 0c146e7ccb.
2023-01-02 14:39:43 +11:00
Mitchell Richters
7760eff4ba - SW: Fix issue with RC tank in $seabase.
* Originated from 8efe6f638b.
* I'm sure this was meant to be 0.05, but became 0.5 by mistake.
* Use something closer to `12800. / 262144.`.
* Fixes #831.
2023-01-02 14:36:55 +11:00
Mitchell Richters
f431d51c2f - SW: Add inertia correction to PlayerWarpUpdatePos().
* Warping between sectors such as the clouds in $volcano now maintains perfect velocity, etc.
2023-01-02 11:53:10 +11:00
Mitchell Richters
ac13bd81af - Fix bad Z test in WarpPlane().
* Originates from incomplete change in 7eba7aacbd.
* Fixes #832.
2023-01-02 11:00:47 +11:00
Christoph Oelckers
ad0860f4bf - fixed sprite rendering being aborted if a sprite with invalid texture was encountered. 2022-12-29 14:53:21 +01:00
Christoph Oelckers
c72f5e2242 - SW: SECT_WALL_MOVE must consider tilenum 0 as 'no change'. 2022-12-29 14:40:18 +01:00
Christoph Oelckers
d064706f93 - got rid of wallpicnum and overpicnum.
All map geometry npw uses texture IDs and no longer depends on Build's tile system.
(What's missing is a new map format, though, but this was a necessary prerequisite to make that worthwile...)
2022-12-29 14:14:53 +01:00
Christoph Oelckers
f5e9e7d981 - got rid of most remaining references to wallpicnum and overpicnum.
What remains now needs changing the variables to texture IDs first.
2022-12-29 14:14:53 +01:00
Christoph Oelckers
90702ae2f5 - consolidated the animwall code by using texture flags.
This is way too hacky for generalization. For that newly defined control actors are surely a better option.
2022-12-29 14:14:53 +01:00
Christoph Oelckers
bfdfff7a42 - named all of SW's breakable wall textures.
We need this later when these get exported.
2022-12-29 14:14:53 +01:00
Christoph Oelckers
b980789ddf - skip switch animation checks for custom switch actors. 2022-12-29 14:01:39 +01:00
Christoph Oelckers
95a2b85fae - migrated the rest of the switch code to use the external data. 2022-12-29 13:35:21 +01:00
Christoph Oelckers
0c0199fbdc - same procedure for wall switches 2022-12-29 13:33:02 +01:00
Christoph Oelckers
d9122a0482 - split out the sprite switch toggle handler into a common subfunction using the switch definitions. 2022-12-29 13:33:02 +01:00
Christoph Oelckers
4191a9493a - split RRRA's tag10000specialswitch into a subfunction.
Unfortunately I have no idea where this gets used so it's untested for now.
2022-12-29 13:33:02 +01:00
Christoph Oelckers
97a5fc2948 - did a clean reimplementation of resetswitch. 2022-12-29 13:33:02 +01:00
Christoph Oelckers
9bc0a43028 - fixed lookup for tile aliases pointing to non-existent tiles. 2022-12-29 13:33:02 +01:00
Christoph Oelckers
564e9d2905 - use switch types to cut doen the first switch/case block in checkhitswitch 2022-12-29 13:33:01 +01:00
Christoph Oelckers
808fb3c433 - simplified several switch check blocks using the data from the definition files. 2022-12-29 13:32:30 +01:00
Christoph Oelckers
2386ea9930 - implemented the 3 special switches
That's the developer commentary icon in World Tour, the deactivation switch for the chicken processing plant in RR and one shootable alarm bell in RRRA.
2022-12-29 13:32:30 +01:00
Christoph Oelckers
0d9fe83cba - implemented the switch parser and set up the external definitions. 2022-12-29 13:32:29 +01:00
Mitchell Richters
22f5c69b4c - Duke: Fix bad checkaccessswitch_*() calls.
* Fixes #815.
2022-12-29 22:45:36 +11:00
Mitchell Richters
e528c3fbb8 - SW: Repair whoopsie in BunnyCheat(). 2022-12-29 21:50:29 +11:00
Mitchell Richters
1d69ebe9b0 - Duke: Ensure that the expander hitscans when autoaim is "hitscan only".
* Fixes #827.
2022-12-29 21:17:41 +11:00
Mitchell Richters
fbee05e760 - SW: Restore two original cheat codes lost long ago.
* Fixes #810.
2022-12-29 20:59:19 +11:00
Mitchell Richters
9d5bae0c8e - SW: Fix clipmove call within DoPlayerMoveVehicle().
* Originating from 05ad1e38e9.
* Fixes #829.
2022-12-29 20:32:58 +11:00
Mitchell Richters
ca2a427379 - SW: Re-add CVAR_SERVERINFO back to sw_ninjahack but leave commented out, it may be needed later. 2022-12-29 19:41:41 +11:00
Mitchell Richters
6065140f68 - SW: Remove CVAR_SERVERINFO flag from sw_ninjahack and take them out of the global space. 2022-12-29 19:36:18 +11:00
Mitchell Richters
b0b2f1bf1b - SW: Only bring the weapon back up after doing chops if not on a vehicle with a weapon. 2022-12-29 19:25:17 +11:00
Mitchell Richters
c240c8e6ee - SW: Fix two bad calls to pushmove() where a fixed point adjustment was used.
* Came in from 3ac4e7ed2d.
* Fixes #816.
2022-12-29 19:02:56 +11:00
Mitchell Richters
dcd0e62466 - SW: Remove call to doYawKeys() from DoPlayerDeathFollowKiller(). 2022-12-29 14:35:42 +11:00
Mitchell Richters
96e8565ba7 - Blood: Reset player's render angle state only for the console player. 2022-12-29 14:35:42 +11:00
Mitchell Richters
572ec96467 - SW: Reset player's render angle state only for the console player. 2022-12-29 14:35:41 +11:00
Mitchell Richters
7593114fc7 - SW: Tidy up UpdatePlayerSprite() a bit. 2022-12-29 14:35:41 +11:00
Mitchell Richters
774c7795b1 - SW: Apply same fix to DoPlayerClimb(). 2022-12-29 14:35:38 +11:00
Mitchell Richters
7e1e447f98 - SW: Apply same fix to DoPlayerFly(). 2022-12-29 14:27:59 +11:00
Mitchell Richters
09304ef298 - SW: Fix player diving height issues.
* Fixes #822.
2022-12-29 14:27:59 +11:00
Mitchell Richters
6c7797a9f0 - SW: Clean up some noisy commented out calls to DoPlayerHeight(). 2022-12-29 13:50:27 +11:00
Rachael Alexanderson
6b8bdcc449 - fix math error on ARM architectures 2022-12-28 02:07:10 -05:00
Mitchell Richters
adc2396f31 - Duke: Extend fix from previous commit to appropriately resize the VMValue array also. 2022-12-24 15:41:37 +11:00
CandiceJoy
a943652799 Fixed a Mac debug build crash where CallAnimate attempted to pass one too many parameters to the VM. 2022-12-23 10:38:59 +01:00
Mitchell Richters
0b3076d2b4 - SW: Fix PreMapCombineFloors() setup due to player actor not yet being initialised.
* Fixes #804.
2022-12-23 19:18:08 +11:00
Mitchell Richters
4890f1d9dc - SW: Adjustments to the death height code on the back of the last commit. 2022-12-23 19:18:07 +11:00
Mitchell Richters
5f1581be9d - SW: Rework the player's height adjustment to use the pos.Z setter from during the refactor.
* I tried to get smart during the refactor when I should have kept it simple.
* Fixes #813.
2022-12-23 19:18:07 +11:00
Kevin Caccamo
996e0ef6cf Attempt to fix #806
Default-initialize TilesetBuildInfo `info`.
Also, make every function in defparser.cpp static except for loaddefinitionsfile, since that's the only function which is called from other source files.
2022-12-22 22:14:13 +01:00
Christoph Oelckers
c7e25726c1 - use memset to clear 'gs' in loadconst.
MSVC compiled the old assignment to memsetting a local copy and then memcpying it to the destination, but this struct is far too large for that and was causing occasional stack errors when debugging.
2022-12-20 12:44:34 +01:00
Christoph Oelckers
ab97f00cd1 - delete entry for Vulkan's natvis file from project 2022-12-18 19:40:27 +01:00
Christoph Oelckers
ef7c72ce9f - Blood: add all statically stored EventObjects to the GC processor. 2022-12-18 17:54:54 +01:00
Christoph Oelckers
b1e2b2addf - backend cleanup from GZDoom. 2022-12-18 16:31:50 +01:00
Christoph Oelckers
d7da983c5e - removed Vulksn SDK from main source folder.
This is now part of ZVulkan.
2022-12-18 16:27:24 +01:00
Christoph Oelckers
e3d16d254d - fixed: when deactivating the app, pausing the sound system should not depend on the game's internal pause state.
All this tells is that the gameplay was halted. Sound was not stopped when the user either minimized or tabbed away in the in-game menu.

This commit had to be reapplied because it got lost in a backend update.
2022-12-18 15:28:17 +01:00
Christoph Oelckers
21d4aae182 - fixed lookup for tile aliases pointing to non-existent tiles. 2022-12-18 15:19:35 +01:00
Christoph Oelckers
8c41294cb0 - overpicnum lightening.
Especially make sure that it is never set to tile 0. There seems to have been some undefined behavior here treating 0 as 'no texture', but doing so inconsistently.
2022-12-18 15:13:22 +01:00
Christoph Oelckers
837e4d1438 - eliminated many uses of wallpicnum.
The ones left require a bit more work on the data first.
2022-12-18 15:11:08 +01:00
Christoph Oelckers
ffb471666d - moved the access switch handlers out of checkhitswitch_*. 2022-12-18 15:08:27 +01:00
Christoph Oelckers
79c91b2538 - only write special texture properties if they are being defined. 2022-12-18 15:06:20 +01:00
Christoph Oelckers
a9ea2cd5c0 - moved GetReservedScreenSpace function into the scripted status bar where it belongs.
Since this is supposed to return the height of the status bar, keeping it native is a bit pointless as it cannot be modified that way.
2022-12-18 14:47:38 +01:00
Mitchell Richters
b4f6ea6232 - Fix linking errors. 2022-12-18 14:47:32 +01:00
Christoph Oelckers
c41dc29885 - eliminated half of the remaining tileWidth and tileHeight calls. 2022-12-18 14:45:09 +01:00
Christoph Oelckers
e78fd90f67 - adapted sky code for using texture IDs. 2022-12-18 14:42:27 +01:00
Christoph Oelckers
8dfbbc8220 - migrated floorpicnum and ceilingpicnum to FTextures.
The sky code still needs some work.
2022-12-18 14:32:52 +01:00
Christoph Oelckers
4ea252c227 - simplified SW's mirror setup a bit to take advantage of Raze's in-engine mirror handling.
We only need one label texture and no special treatment of the backsector.
2022-12-18 14:06:34 +01:00
Christoph Oelckers
9d62951cf3 - SW: use surface types for detecting water and lava sectors 2022-12-18 14:05:17 +01:00
Christoph Oelckers
32ad16f84d - SW's first texture flag, yay!
Removes two floorpicnum accesses
2022-12-18 14:04:33 +01:00
Christoph Oelckers
622710ede4 - migrated all uses of floorpicnum.
This necessitated a few more surface type definitions.
2022-12-18 14:02:56 +01:00
Christoph Oelckers
4a306a21dc - split several texture flags off into a surface type value.
Using the same field in the TexExtInfo struct as Blood's surfType.
This frees up a lot of flags for later use.
2022-12-18 13:56:54 +01:00
Christoph Oelckers
1a98f9b478 - Duke: change all checks for mirrors to texture IDs 2022-12-18 13:52:10 +01:00
Christoph Oelckers
5b8dd84361 - use setceilingtexture where textures are simply copied around 2022-12-18 13:52:10 +01:00
Christoph Oelckers
ee8b685fe2 - adapted the breakable stuff interface in Duke to Texture IDs. 2022-12-18 13:52:03 +01:00
Christoph Oelckers
f3e652da84 - preparations and annotations for places in SW where textures are stored in tags. 2022-12-18 13:44:36 +01:00
Christoph Oelckers
0ffeb2378a - generalize Duke's purple lava check. 2022-12-18 13:43:26 +01:00
Christoph Oelckers
6848af9b6c - use texture IDs in Duke's texture flag checkers. 2022-12-18 13:42:28 +01:00
Christoph Oelckers
5147826eeb - consolidated precaching code and rewrote the core to work on texture IDs. 2022-12-18 13:37:54 +01:00
Christoph Oelckers
1a6f808fca - refactored all access to the fake picanm[] array.
Also use symbolic names in precache calls in Blood.
2022-12-18 13:26:29 +01:00
Christoph Oelckers
e23a5095cb - moved the other tile info tables of Blood to the texExtInfo array as well.
The two fields are easily reusable for the other games so it's a welcome simplification.
2022-12-18 13:23:59 +01:00
Christoph Oelckers
c34756e5f2 - cleanup of voxel init code.
The voxreserve array was never properly set up so it is gone now.
nextvoxid now gets set right before loading .def files.
2022-12-18 13:18:44 +01:00
Christoph Oelckers
8a789b9015 - voxel management cleanup.
Moving the voxel index into the texExtInfo array and removing most of Blood's and SW's special handling.
2022-12-18 13:18:43 +01:00
Christoph Oelckers
be2112a507 - fixed ESC pressing on Duke's monitors.
This got busted by an update from GZDoom.
2022-12-18 13:06:09 +01:00
Christoph Oelckers
6ff91f8ebc - disable the freelist management for discarded tiles.
This does not work as implemented - may be checked out later, but this is not essential.
2022-12-18 13:06:09 +01:00
Christoph Oelckers
20edd800f9 - big texture system refactor.
Finally that quickly slapped together BuildTiles class is gone and replaced with something that better integrates with the underlying texture manager
2022-12-18 13:05:58 +01:00
Christoph Oelckers
e9acd74157 - added a fallback in shoot_* for incompletely ported items. 2022-12-18 00:34:17 +01:00
Christoph Oelckers
82c30f551f - Blood: relax range check in AlignSlopes.
This now checks the full range of the wall array and if outside just does nothing. E2M6 has a bogus value for this feature that asserted with the old check.
2022-12-17 20:23:54 +01:00
Christoph Oelckers
bfe958abd6 - Blood: do not double-rotate the player.
One of these actions needs to be removed, now that the angles are consolidated.
2022-12-17 20:03:56 +01:00
Christoph Oelckers
521a59fd26 - Blood: fixed blood splats being spawned in the wrong place. 2022-12-17 19:34:35 +01:00
Christoph Oelckers
32071c4460 - Blood: fixed 3 places where 3D distance was used but 2D should have been used. 2022-12-17 18:43:15 +01:00
Mitchell Richters
cf5ba0886a - SW: Properly guard the call to PlayerDeathReset() in TerminateLevel().
* Stems from an oversight in 28b97486cd.
* Fixes #796.
2022-12-17 06:32:03 +11:00
Mitchell Richters
8bbf7f4e00 Revert "- SW: Revert last commit and apply changes directly in pp->setHeightAndZ() so all bases are covered."
This reverts commit a643a74083.

* Fixes #795
2022-12-16 08:44:38 +11:00
alexey.lysiuk
02814eaf1a - updated minimum macOS version in bundle .plist file 2022-12-15 10:26:51 +02:00
Mitchell Richters
a643a74083 - SW: Revert last commit and apply changes directly in pp->setHeightAndZ() so all bases are covered. 2022-12-15 18:16:38 +11:00
Mitchell Richters
b83d321c4b - SW: Don't use pp->setHeightAndZ() when setting PLAYER_CRAWL_HEIGHTF. 2022-12-15 18:06:07 +11:00
Mitchell Richters
6e4e2b04eb - Fix pitch direction for controller input. 2022-12-15 08:42:43 +11:00
Christoph Oelckers
d5414da096 - added a - sign to FindBestSector' default return.
This somehow get lost when the code was moved out of clipmove into a separate utility function.
2022-12-14 11:48:34 +01:00
Christoph Oelckers
9fc17a4bcf - fixed velocity handling in a few enemy swimChase functions.
The one for the gill beast was particularly bad.
2022-12-14 11:32:56 +01:00
Christoph Oelckers
ff09257d47 - Exhumed: allow Anubis to get out of the walking state if he loses his target.
This happened on occasion on the first map
2022-12-14 10:25:01 +01:00
Mitchell Richters
53dfac5327 - Duke: Fix bad sector variable check in floorspace().
* Originated from 1b3f551216.
* Was causing the player to die quite easily when coming out of the transporter at the start of E2L2.
2022-12-14 18:14:06 +11:00
Christoph Oelckers
cd28c818b0 - fixed bad hitradius distance calculation.
Player offset was retrieved from the wrong actor here.
2022-12-13 17:19:04 +01:00