Commit graph

6635 commits

Author SHA1 Message Date
Christoph Oelckers
841402a776 - allow setting loop points for WAV sounds or other simple formats. 2023-01-15 15:19:21 +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
ad0bff921b - allow setting Duke's relevant sound properties through SNDINFO. 2023-01-15 11:54:24 +01:00
Christoph Oelckers
8001c4041f - Duke: fixed hitscan vector for pistol's aim check. 2023-01-14 16:48:28 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Christoph Oelckers
fba882e368 - fixed SE30 moving player twice each step.
With the changes in dd5834444e it was applying movement to the player in both the player and the actor loop.
2022-12-13 16:16:48 +01:00
Christoph Oelckers
f45265352d - added a few class types needed for RR's UFO spawners. 2022-12-13 15:49:09 +01:00
Christoph Oelckers
efd6d2cf07 - fix initialization issues with a few serializer functions. 2022-12-13 14:38:58 +01:00
Kevin Caccamo
4cdb0c3c55 Attempt to fix #787 2022-12-13 14:08:02 +01:00
Christoph Oelckers
4f388c3589 - fixed bad direction setup for vertically moving SE 0.
This also adds missing interpolation for this case.
2022-12-13 13:46:55 +01:00
Christoph Oelckers
5f6cd0da79 - Duke/RR: fixed floor alignment of flames in sloped sectors 2022-12-13 12:01:34 +01:00
Christoph Oelckers
6b0c067d46 - Duke: fixed flames not being floor aligned.
The same code was correct in the RR variant, so it just got copied over.
2022-12-13 11:51:14 +01:00
Christoph Oelckers
13e6718153 - added mapSpawned member to DDukeActor
Duke uses the owner a lot to check if an actor was spawned at map start or in-game, but that depends a lot on stale pointers being maintained, which our garbage collected system does not allow. So this field now serves as a more reliable stand-in for these cases.
No actual changes yet.
2022-12-13 10:36:45 +01:00
Christoph Oelckers
9c1fc93e1c - Exhumed: The ObjectList was not properly garbage collected. 2022-12-13 08:49:56 +01:00
Christoph Oelckers
629dc8e163 - fixed kill counting in Blood. 2022-12-13 08:37:22 +01:00
Christoph Oelckers
87ff99caa1 - fixed typo 2022-12-12 09:26:43 +01:00
Christoph Oelckers
1f7954fc29 - fixed World Tour fallback sound lookup. 2022-12-12 08:25:02 +11:00
Christoph Oelckers
1e249d3536 - fixed bad actor type check. 2022-12-11 20:15:14 +01:00
Mitchell Richters
28b97486cd - SW: For single player games, call PlayerDeathReset() from TerminateLevel() and not DoPlayerDeathCheckKeys().
* This fixes issues where player stats like health, etc are shown onscreen as reset before the entire view reloads.
2022-12-11 19:46:27 +01:00
Mitchell Richters
b8a8164b24 - SW: Don't call DoSpawnTeleporterEffect() upon death.
* This causes an air bubble to spawn above the player for a single tic, even while on land until the level truly restarts.
* Since we're restarting, its better to just not do this.
2022-12-11 19:46:27 +01:00
Mitchell Richters
9b73f46aff - SW: Don't reset player pitch upon death.
* This _somewhat_ addresses #770 by hiding the effects of it.
* Since we re-init `Player::Angles` when a new actor is spawned, this all resets anyway.
2022-12-11 19:46:27 +01:00
Mitchell Richters
7d6eb2bae6 - Remove some pitch/yaw deltaangle additions in lieu of setting the angle directly.
* This deltaangle addition was needed with the old input setup.
2022-12-11 19:46:27 +01:00
Mitchell Richters
c3f276a08a - Tidy up remaining Build angle constants in gamefuncs.h. 2022-12-11 19:46:27 +01:00
Mitchell Richters
de8353f085 - Eliminate BAngToDegree constant. 2022-12-11 19:46:26 +01:00
Mitchell Richters
67b40ee1d5 - Convert angle in hud_drawsprite() to work on true degrees, and in the right direction. 2022-12-11 19:46:26 +01:00
Mitchell Richters
3a1729a9ce - Duke (RR): Final tidy-up of displayweapon_r(). 2022-12-11 19:46:26 +01:00
Mitchell Richters
3eb3a29a7e - Duke: Tidy up animateshrunken(). 2022-12-11 19:46:26 +01:00
Mitchell Richters
c45b755773 - Duke (RR): Tidy up remaining uses of old weapon offset code. 2022-12-11 19:46:26 +01:00
Mitchell Richters
7ec2c1a0fa - Duke (RR): Move displaysaw() lambda to new weapon offsets. 2022-12-11 19:46:26 +01:00
Mitchell Richters
6d9b53af3d - Duke (RR): Move displayblaster() lambda to new weapon offsets. 2022-12-11 19:46:26 +01:00
Mitchell Richters
21fe395c2e - Duke (RR): Move displaytits() lambda to new weapon offsets. 2022-12-11 19:46:25 +01:00
Mitchell Richters
717955d5ab - Duke (RR): Move displaythrowingdynamite() lambda to new weapon offsets. 2022-12-11 19:46:25 +01:00
Mitchell Richters
70d7210462 - Duke (RR): Move displaydynamite() lambda to new weapon offsets. 2022-12-11 19:46:25 +01:00
Mitchell Richters
387e0286ac - Duke (RR): Move displaypistol() lambda to new weapon offsets. 2022-12-11 19:46:25 +01:00
Mitchell Richters
755e2be0a4 - Duke (RR): Move displayrifle() lambda to new weapon offsets. 2022-12-11 19:46:25 +01:00
Mitchell Richters
82e9b96174 - Duke (RR): Move displayshotgun() lambda to new weapon offsets. 2022-12-11 19:46:25 +01:00
Mitchell Richters
c6380bfd7a - Duke (RR): Move displaychicken() lambda to new weapon offsets. 2022-12-11 19:46:25 +01:00
Mitchell Richters
79ae9e1f97 - Duke (RR): Move displaycrossbow() lambda to new weapon offsets. 2022-12-11 19:46:24 +01:00
Mitchell Richters
be439918dc - Duke (RR): Move displaypowderkeg() lambda to new weapon offsets. 2022-12-11 19:46:24 +01:00
Mitchell Richters
40ec46e323 - Duke (RR): Move displaybowlingball() lambda to new weapon offsets. 2022-12-11 19:46:24 +01:00
Mitchell Richters
6193d17dac - Duke (RR): Move displayslingblade() lambda to new weapon offsets. 2022-12-11 19:46:24 +01:00
Mitchell Richters
50c1c5b48d - Duke (RR): Initial hookup of new weapon drawing offsets from the backend, starting with displaycrowbar(). 2022-12-11 19:46:24 +01:00
Mitchell Richters
5d3710d677 - Duke: Always use tsprite pos/angle when used in conjunction with viewvec or viewang.
* This solves the issue of jittery picnum changes when circle-strafing actors at high speeds.
2022-12-11 19:45:38 +01:00
Christoph Oelckers
bea6834f8e - code cleanup. 2022-12-11 19:45:38 +01:00
Christoph Oelckers
97d76a01e4 - SW: do a proper implementation for sprites which do not want texture animations.
Instead of hacking the picanm table it is far more preferable to flag the sprite as non-animating and let the renderer handle it.
2022-12-11 19:45:38 +01:00
Christoph Oelckers
281b102fac - gave all textures that were accessed with their "#0xxxx" name a descriptive names.
Only the fallback fonts were intentionally excluded because these are supposed to get the ART file content.
2022-12-11 19:45:18 +01:00
Christoph Oelckers
58db09969c - moved tileForName out of BuildTiles.
Just pulling one change out of the big upcoming refactor commit.
2022-12-11 19:45:18 +01:00
Christoph Oelckers
e26d9106aa - handle all occurences of tileWidth and tileHeight using spritetypebase::picnum. 2022-12-11 19:44:01 +01:00
Christoph Oelckers
1258ddc551 - cleaned out tileHeight calls in SW's panel.cpp.
Direct access to tile numbers has been significantly reduced.
2022-12-11 19:44:01 +01:00
Christoph Oelckers
f479f995a1 - transitioned all tileLeftOffset and tileTopOffset calls to use the texture manager. 2022-12-11 19:44:01 +01:00
Christoph Oelckers
afa821c2fd - removed redundant voxel/model code in Blood's animatesprites.
This just duplicated the generic handling in the renderer so it is not needed.
2022-12-11 19:44:01 +01:00
Christoph Oelckers
0869497ecb - rewrote the tile pixel cache to work on texture IDs instead of tile IDs.
This allows using the related checking features with other textures as well.
2022-12-11 19:44:00 +01:00
Christoph Oelckers
8b0e86e88b - wrap a few more accesses to picnum variables 2022-12-11 19:44:00 +01:00
Christoph Oelckers
a6db974a62 - refactored Blood's tile property arrays to texture IDs.
The data structure here can be optimized later when the other games get to the same point, but this allows to rid Blood of all references to wallpicnunm, floorpicnum and ceilingpicnum except one place in the precacher.
2022-12-11 19:44:00 +01:00
Christoph Oelckers
483617d3e1 - use the texture wrappers in a few places. 2022-12-11 19:44:00 +01:00
Christoph Oelckers
ffa265ae1d - gave Blood's and SW's mirror/ROR tiles proper names. 2022-12-11 19:44:00 +01:00
Christoph Oelckers
e5225e98e0 - migrated SW's portal setup code to texture IDs. 2022-12-11 19:43:59 +01:00
Christoph Oelckers
fe3a32d692 - SW: fixed camera validation 2022-12-11 19:43:59 +01:00
Christoph Oelckers
f4bda94dad - added tileGetTextureID and tested it with Blood's mirror/portal setup code. 2022-12-11 19:43:59 +01:00
Christoph Oelckers
bfef616981 - let tileDelete create a new null texture instead of using the default one.
This is to ensure that marker textures are still unique.
2022-12-11 19:43:59 +01:00
Christoph Oelckers
49f87e6227 - got rid of gotpic.
Now everything uses the 'seen' flag in the texture which indicates that the texture was actually used for hardware rendering since the last check.
It's also only the 3 places checking this flag which are responsible for clearing it.
2022-12-11 19:43:58 +01:00
Christoph Oelckers
a0722c55ea - removed canvas hack stuff from Buildtiles after cleaning up the mess in SW. 2022-12-11 19:43:58 +01:00
Christoph Oelckers
ede5b017ab - renamed walltype::picnum to wallpicnum for easier searching. 2022-12-11 19:43:58 +01:00
Christoph Oelckers
51ad64f71e - initialize all special tiles to their intended type before starting the game.
This ensures that we have an immutable mapping of tile number to texture ID now.
2022-12-11 19:43:58 +01:00
Christoph Oelckers
6a690849e6 - cleanup on the tile management.
* removed the long defunct EDuke32-based map art system. With our move to named textures this will not work anymore so fixing the existing problems would be pointless.
* moving .def related parsing stuff out of buildtiles.cpp.
* some initial refactoring to make the tile store a static, non-modifyable resource after initial setup.
2022-12-11 19:43:58 +01:00
Christoph Oelckers
a08db47528 - exported all breakable ceilings.
Very simple stuff with instant profit. :)
2022-12-11 19:43:58 +01:00
Christoph Oelckers
a63ee8079a - implemented customizable breakable walls and ported all hard coded variants to use this. 2022-12-11 19:43:57 +01:00
Christoph Oelckers
241636a907 - removed caching of the minifont.
Since this does not get used directly anymore, caching these images is rather pointless.
2022-12-11 19:43:57 +01:00
Christoph Oelckers
0df5be7ad0 - also renamed all RR tile names. 2022-12-11 19:43:57 +01:00
Christoph Oelckers
e9b6e84d47 - renamed all tile constants for Duke to DTILE_*.
We need to be able to find them for the ongoing work
2022-12-11 19:43:57 +01:00
Christoph Oelckers
9e3318a2fb - moved spawnclasses and breakwall definitions from .def to RMAPINFO.
.def is not the right place for this - it needs to run very early in the process, before scripted actors are loaded, so doing this stuff there means that half the initialization has to be postponed and error reporting is sub-par.
These are now part of RMAPINFO which gets parsed as one of the very last things - it is also where GZDoom is doing some of these things.

The better error reporting also allowed fixing some errors in these definitions.
2022-12-11 19:43:57 +01:00
Christoph Oelckers
c1a09196f0 - implemented breakable walls with external definitions.
The scripted case does not work yet due to bad loading order of files.
2022-12-11 19:43:57 +01:00
Christoph Oelckers
8e17f1f0f5 - removed the limit of 64 on-state switches from the init code.
No other place in the engine needs this, it was just the chosen size for a local check array.
2022-12-11 19:43:56 +01:00
Mitchell Richters
2c592405fa - Separate pitch/yaw key input into separate functions and apply from the ticker. 2022-12-11 19:43:56 +01:00
Mitchell Richters
470b4efac8 - Remove PlayerAngles::setYaw() method usage and remaining associated code. 2022-12-11 19:43:56 +01:00
Mitchell Richters
f58e3c58aa - Remove PlayerAngles::setPitch() method usage. 2022-12-11 19:43:56 +01:00
Mitchell Richters
491a42d2bb - Remove PlayerAngles::addYaw() method usage. 2022-12-11 19:43:56 +01:00
Mitchell Richters
7a7758efaa - Remove PlayerAngles::addPitch() method usage. 2022-12-11 19:43:56 +01:00
Mitchell Richters
1944d04014 - Duke: Fix pitch alteration in dokneeattack(). 2022-12-11 19:43:55 +01:00
Mitchell Richters
968d0ae0d2 - Implement new scaled angle change setup and remove enforcement of synchronised input. 2022-12-11 19:43:55 +01:00