Commit graph

6241 commits

Author SHA1 Message Date
Mitchell Richters
bf0f0345b3 - SW: Remove most PLAYER::posSet() calls. 2022-12-11 18:41:49 +01:00
Mitchell Richters
0917434888 - SW: Remove PLAYER::posXY(). 2022-12-11 18:41:49 +01:00
Mitchell Richters
ff75fa513a - SW: Remove PLAYER::posZadd(). 2022-12-11 18:41:48 +01:00
Mitchell Richters
3b961ccae9 - SW: Remove PLAYER::posZget().
- SW: Remove `PLAYER::posZget()`.
2022-12-11 18:41:48 +01:00
Mitchell Richters
fe795e6cfb - SW: Remove PLAYER::posZset() in favour of new utilities. 2022-12-11 18:41:48 +01:00
Mitchell Richters
f18512e270 - SW: Ladder fixes where centering of player was effectively occurring twice. 2022-12-11 18:41:48 +01:00
Mitchell Richters
7624f8b77d - SW: Death sequence fixes. 2022-12-11 18:41:48 +01:00
Mitchell Richters
88bace9dd7 - SW: Slightly increase the range check in DoPlayerDeathHoriz(). 2022-12-11 18:41:48 +01:00
Mitchell Richters
61086d7a8b - SW: Don't bob the actual sprite's Z since we apply it as an offset in the draw code. 2022-12-11 18:41:48 +01:00
Mitchell Richters
e6044bc0fd - SW: Repair player height issues. 2022-12-11 18:41:48 +01:00
Mitchell Richters
6d736aea19 - SW: Swap out the internals of the player's pos methods and get the game going again.
* Leave `PLAYER::PlayerOldPosition` for now.
2022-12-11 18:41:47 +01:00
Mitchell Richters
c14d1587f0 - SW: Move PLAYER struct underneath include for swactor.h.
* Needed by the next commit since the forward declaration isn't working.
2022-12-11 18:41:47 +01:00
Mitchell Richters
97a07cd83c - SW: Wrap remaining calls to PLAYER::PlayerOldPosition. 2022-12-11 18:41:47 +01:00
Mitchell Richters
9ab5fd0801 - SW: Wrap calls to PLAYER::PlayerOldPosition.XY(). 2022-12-11 18:41:47 +01:00
Mitchell Richters
f711355f2f - SW: Wrap calls that get PLAYER::PlayerPrevPosition. 2022-12-11 18:41:47 +01:00
Mitchell Richters
ad7a626b92 - SW: Wrap calls that set PLAYER::PlayerPrevPosition. 2022-12-11 18:41:47 +01:00
Mitchell Richters
2d351b2c28 - SW: Wrap calls that set PLAYER::PlayerPrevPosition.Z. 2022-12-11 18:41:47 +01:00
Mitchell Richters
bf833fcfa3 - SW: Wrap calls to PLAYER::PlayerPrevPosition.XY(). 2022-12-11 18:41:47 +01:00
Mitchell Richters
82e0e25b7e - SW: Manual fixes to last commit I wanted to keep separate. 2022-12-11 18:41:46 +01:00
Mitchell Richters
a54d0f7639 - SW: Wrap calls that get PLAYER::PlayerNowPosition. 2022-12-11 18:41:46 +01:00
Mitchell Richters
964557ab6b - SW: Wrap calls that add to PLAYER::PlayerNowPosition. 2022-12-11 18:41:46 +01:00
Mitchell Richters
11f9d82239 - SW: Wrap calls that set PLAYER::PlayerNowPosition. 2022-12-11 18:41:46 +01:00
Mitchell Richters
4bf202bee4 - SW: Wrap calls that get PLAYER::PlayerNowPosition.Z. 2022-12-11 18:41:46 +01:00
Mitchell Richters
4e0aa1add1 - SW: Wrap calls that add/subtract PLAYER::PlayerNowPosition.Z. 2022-12-11 18:41:46 +01:00
Mitchell Richters
6226d302f5 - SW: Wrap calls that set PLAYER::PlayerNowPosition.Z. 2022-12-11 18:41:46 +01:00
Mitchell Richters
7757288d33 - SW: Tidy up one vector equality test. 2022-12-11 18:41:45 +01:00
Mitchell Richters
7d0b2fba69 - SW: Wrap calls to PLAYER::PlayerNowPosition.XY(). 2022-12-11 18:41:45 +01:00
Mitchell Richters
f0074a913e - SW: Rename Player::oldpos to Player::PlayerOldPosition to make it easier to search upon. 2022-12-11 18:41:45 +01:00
Mitchell Richters
bf10d9816f - SW: Rename Player::opos to Player::PlayerPrevPosition to make it easier to search upon. 2022-12-11 18:41:45 +01:00
Mitchell Richters
cf25884675 - SW: Rename Player::pos to Player::PlayerNowPosition to make it easier to search upon. 2022-12-11 18:41:45 +01:00
Mitchell Richters
e55412f240 - Remove DCoreActor::ZeroVelocity(). 2022-12-11 18:41:45 +01:00
Mitchell Richters
39d1a758ed - Remove DCoreActor::ZeroVelocityXY(). 2022-12-11 18:41:44 +01:00
Mitchell Richters
4de1b8ad86 - Create DCoreActor::getRenderPos() and use within Duke. 2022-12-11 18:41:44 +01:00
Mitchell Richters
d1c5f9516f - Duke: Remove player_struct::posoldAdd() and player_struct::posoldGet(). 2022-12-11 18:41:44 +01:00
Mitchell Richters
f10f1b9154 - Duke: Remove player_struct::posoldZset() and player_struct::posoldZget(). 2022-12-11 18:41:44 +01:00
Mitchell Richters
66a08a26e8 - Duke: Remove player_struct::posoldX(), player_struct::posoldY(), and player_struct::posoldXY(). 2022-12-11 18:41:44 +01:00
Mitchell Richters
4551274e7d - Duke: Remove player_struct::posSet(). 2022-12-11 18:41:44 +01:00
Mitchell Richters
a1e68f88a5 - Duke: Remove player_struct::posAdd(). 2022-12-11 18:41:44 +01:00
Mitchell Richters
27be72c7ec - Duke: Remove player_struct::posGet(). 2022-12-11 18:41:43 +01:00
Mitchell Richters
b42672dcf9 - Duke: Remove player_struct::posZget(). 2022-12-11 18:41:43 +01:00
Mitchell Richters
bd8a6dd956 - Duke: Remove player_struct::posZadd(). 2022-12-11 18:41:43 +01:00
Mitchell Richters
78b04649f1 - Duke: Remove player_struct::posZset(). 2022-12-11 18:41:43 +01:00
Mitchell Richters
92dd6c9795 - Duke: Remove player_struct::posXY(). 2022-12-11 18:41:43 +01:00
Mitchell Richters
6f102e1171 - Duke: Remove player_struct::posX() and player_struct::posY(). 2022-12-11 18:41:43 +01:00
Mitchell Richters
b1bd59db41 - Duke: Clean up all player position calls referencing gs.playerheight that don't need it when using the sprite height. 2022-12-11 18:41:42 +01:00
Mitchell Richters
29f2212d8f - Duke: Remove player_struct::backupz() in lieu of actor variant. 2022-12-11 18:41:42 +01:00
Mitchell Richters
a8c923f05c - Duke: Remove player_struct::backupxy() in lieu of actor variant. 2022-12-11 18:41:42 +01:00
Mitchell Richters
6eeedbd38a - Duke: Move player_struct::restorexyz() to DCoreActor::restorepos(). 2022-12-11 18:41:42 +01:00
Mitchell Richters
a78d976352 - Duke: Remove player_struct::backupxyz() in lieu of actor variant. 2022-12-11 18:41:42 +01:00
Mitchell Richters
4e4e457cfe - Duke: Fix doanimations() following position change to sprite. 2022-12-11 18:41:42 +01:00
Mitchell Richters
6d1370dcab - Duke: Fix a few more sector effector after position change to sprite. 2022-12-11 18:41:42 +01:00
Mitchell Richters
4a9775fde7 - Duke: Fix SE17 elevators after change to player position internals. 2022-12-11 18:41:41 +01:00
Christoph Oelckers
bfa7fddcea - always set the sound listener position to something valid.
Otherwise OpenAL throws lots of warning messages.
2022-12-11 18:41:41 +01:00
Mitchell Richters
dd5834444e - Duke: Swap out the internals of the player's pos methods and get the game going again. 2022-12-11 18:41:41 +01:00
Mitchell Richters
202137ed69 - Duke: Fix interpolation issues with player's XY coordinates while drawing using the sprite. 2022-12-11 18:41:41 +01:00
Mitchell Richters
9972c65842 - Duke: Back up all sprites as soon as possible.
* The player's input is processed before the sprites were backed up, causing interpolation issues with the player's Z.
2022-12-11 18:41:41 +01:00
Mitchell Richters
abd6275f17 - Add new double DCoreActor::viewzoffset set in spawning code during level loads.
* Interpolated backup copy isn't needed for Duke, but will be for SW.
2022-12-11 18:41:41 +01:00
Mitchell Richters
b0c95f69c5 - Duke: Wrap calls that get player_struct::PlayerOldPosition. 2022-12-11 18:41:41 +01:00
Mitchell Richters
1962d85f99 - Duke: Wrap calls that subtract from player_struct::PlayerOldPosition. 2022-12-11 18:41:40 +01:00
Mitchell Richters
fffc1915a9 - Duke: Wrap calls that add to player_struct::PlayerOldPosition. 2022-12-11 18:41:40 +01:00
Mitchell Richters
e4dd69f5b0 - Duke: Wrap calls that get player_struct::PlayerOldPosition.Z. 2022-12-11 18:41:40 +01:00
Mitchell Richters
830480b8b9 - Duke: Wrap calls that set player_struct::PlayerOldPosition.Z. 2022-12-11 18:41:40 +01:00
Mitchell Richters
4027f7256d - Duke: Wrap calls to player_struct::PlayerOldPosition.Y. 2022-12-11 18:41:40 +01:00
Mitchell Richters
823c5a7a47 - Duke: Wrap calls to player_struct::PlayerOldPosition.X. 2022-12-11 18:41:40 +01:00
Mitchell Richters
fa16d5d344 - Duke: Wrap calls to player_struct::PlayerOldPosition.XY(). 2022-12-11 18:41:40 +01:00
Mitchell Richters
a3b1ab10fe - Duke: Wrap calls that get player_struct::PlayerNowPosition. 2022-12-11 18:41:39 +01:00
Mitchell Richters
e9dcffc5ec - Duke: Route all clipmove()/pushmove() calls through a new interface that accepts a separated Z coordinate. 2022-12-11 18:41:39 +01:00
Mitchell Richters
a6a4cefa6c - Duke: Wrap calls that add to player_struct::PlayerNowPosition.
* The only adds were from DVector2 objects.
2022-12-11 18:41:39 +01:00
Mitchell Richters
58381c6eca - Duke: Wrap calls that set player_struct::PlayerNowPosition. 2022-12-11 18:41:39 +01:00
Mitchell Richters
25e6c4ecf8 - Duke: Wrap calls that get player_struct::PlayerNowPosition.Z. 2022-12-11 18:41:39 +01:00
Mitchell Richters
adc78c81c6 - Duke: Wrap calls that subtract from player_struct::PlayerNowPosition.Z. 2022-12-11 18:41:39 +01:00
Mitchell Richters
44166ae9e6 - Duke: Wrap calls that add to player_struct::PlayerNowPosition.Z. 2022-12-11 18:41:39 +01:00
Mitchell Richters
93189037c3 - Duke: Wrap calls that set player_struct::PlayerNowPosition.Z. 2022-12-11 18:41:38 +01:00
Mitchell Richters
008c05710b - Duke: Wrap calls to player_struct::PlayerNowPosition.Y. 2022-12-11 18:41:38 +01:00
Mitchell Richters
3a07c05af7 - Duke: Wrap calls to player_struct::PlayerNowPosition.X. 2022-12-11 18:41:38 +01:00
Mitchell Richters
5d3878eb55 - Duke: Wrap calls to player_struct::PlayerNowPosition.XY(). 2022-12-11 18:41:38 +01:00
Mitchell Richters
4b7d2fcfcc - Duke: Rename player's opos to something identifiable. 2022-12-11 18:41:38 +01:00
Mitchell Richters
4aa63b5446 - Duke: Rename player's pos to something identifiable. 2022-12-11 18:41:38 +01:00
Mitchell Richters
17914db418 - SW: Utilise new weapon drawing offsets from the backend. 2022-12-11 18:41:38 +01:00
Mitchell Richters
f524abdf47 - Blood: Utilise new weapon drawing offsets from the backend. 2022-12-11 18:41:37 +01:00
Kevin Caccamo
b1c0614d93 Attempt to fix #647
I'm guessing the `nWalls < -1` is a typo, and it should have been `nWalls <= -1` all along. I decided to write `nWalls < 0` instead.

I don't know if I broke anything with this commit, but hopefully everything else still works as intended.
2022-12-11 16:26:25 +01:00
Mitchell Richters
64e53ffc7e Revert "- Duke: Invert the horizon offset in displayweapon_d() as it makes more sense."
This reverts commit 2d2f628b95.

This made sense for things such as cracking knuckles on idle as if you're looking up, the Y should drop down, however the setup of other areas such as `animateknee()` depend on the pitch being inverted like this.
2022-12-11 20:01:41 +11:00
Christoph Oelckers
7d82ae28f4 - Duke/RR: fixed: animates array must be cleared on map change.
There was also some undefined behavior when an entry was deleted, this seems to originate from the original code.
2022-12-10 10:20:01 +01:00
Christoph Oelckers
1061e3e2ca - backend update from GZDoom. 2022-12-04 16:51:44 +01:00
Christoph Oelckers
4666c4a4b5 - RR: initialize the bowling lane displays after loading a savegame. 2022-12-02 15:45:19 +01:00
Christoph Oelckers
a0c7be9138 - try to address some occasional crash with chickens on the bowling lane.
Since this frequently swaps out some actors, it may be advisable to delay destruction by one frame to avoid actor chain consistency issues by writing into the just destroyed object.
2022-12-02 12:46:11 +01:00
Mitchell Richters
a580e9d884 - Duke: Increase the precision of the angle in handle_se00(). 2022-12-01 08:56:12 +01:00
Christoph Oelckers
f30abffa82 - uncommented line in savegame code that was disabled for testing and missed afterward. 2022-12-01 08:48:28 +01:00
Mitchell Richters
2d2f628b95 - Duke: Invert the horizon offset in displayweapon_d() as it makes more sense. 2022-11-30 10:03:58 +01:00
Mitchell Richters
a5e6e80c24 - Duke: Fix RPG from excess recoiling. 2022-11-30 10:03:58 +01:00
Mitchell Richters
3233a25e3a - Duke: Move WW2GI pistol aplWeapon*() calls to the stored ones. 2022-11-30 10:03:58 +01:00
Mitchell Richters
73705801e4 - Duke: Move 3x WW2GI aplWeaponTotalTime() calls to the stored one. 2022-11-30 10:03:57 +01:00
Mitchell Richters
7a3e4de913 - Duke: Move WW2GI handbomb aplWeapon*() calls to the stored ones. 2022-11-30 10:03:57 +01:00
Mitchell Richters
c48e95a710 - Duke: Store some repeated aplWeapon*() calls. 2022-11-30 10:03:57 +01:00
Mitchell Richters
59bafd6a37 - Duke: Clean up the addition/subtractions to the offsets vector in displayweapon_d(). 2022-11-30 10:03:57 +01:00
Mitchell Richters
33af8130b1 - Duke: General tidy-up of displayweapon_d(). 2022-11-30 10:03:57 +01:00
Mitchell Richters
4298f5011f - Duke: Clean up interface to animateknee(). 2022-11-30 10:03:57 +01:00
Mitchell Richters
436ed0288b - Duke: Clean up interface to animateaccess(). 2022-11-30 10:03:56 +01:00
Mitchell Richters
21df86d570 - Duke: Clean up interface to animatetip(). 2022-11-30 10:03:56 +01:00
Mitchell Richters
92a063b078 - Duke: Clean up interface to animateknuckles(). 2022-11-30 10:03:56 +01:00
Mitchell Richters
715ed3f279 - Duke: Clean up interface to animatefist(). 2022-11-30 10:03:56 +01:00
Mitchell Richters
81c3afcda0 - Duke: Move displayflamethrower() lambda to new weapon offsets. 2022-11-30 10:03:56 +01:00
Mitchell Richters
14ecd639dc - Duke: Move displayshrinker() lambda to new weapon offsets. 2022-11-30 10:03:56 +01:00
Mitchell Richters
ec3ccc18a5 - Duke: Move displaygrower_ww() lambda to new weapon offsets. 2022-11-30 10:03:56 +01:00
Mitchell Richters
68291bb595 - Duke: Move displayshrinker_ww() lambda to new weapon offsets. 2022-11-30 10:03:55 +01:00
Mitchell Richters
4d3f5fe3a0 - Duke: Move displayfreezer() lambda to new weapon offsets. 2022-11-30 10:03:55 +01:00
Mitchell Richters
99d7b763e4 - Duke: Move displaydevastator() lambda to new weapon offsets. 2022-11-30 10:03:55 +01:00
Mitchell Richters
6f6b52ee5d - Duke: Move displaydevastator_ww() lambda to new weapon offsets. 2022-11-30 10:03:55 +01:00
Mitchell Richters
624e28bf55 - Duke: Move displayhandremote() lambda to new weapon offsets. 2022-11-30 10:03:54 +01:00
Mitchell Richters
c126619d6d - Duke: Move displayhandbomb() lambda to new weapon offsets. 2022-11-30 10:03:54 +01:00
Mitchell Richters
e33ce4b7ac - Duke: Move displaychaingun() lambda to new weapon offsets. 2022-11-30 10:03:54 +01:00
Mitchell Richters
c7274ff5fb - Duke: Move displaychaingun_ww() lambda to new weapon offsets. 2022-11-30 10:03:54 +01:00
Mitchell Richters
35a26a1cb5 - Duke: Move displayshotgun() lambda to new weapon offsets. 2022-11-30 10:03:54 +01:00
Mitchell Richters
2c770706b8 - Duke: Move displayshotgun_ww() lambda to new weapon offsets. 2022-11-30 10:03:53 +01:00
Mitchell Richters
5935f860e4 - Duke: Bring displayrpg() lambda inline with standard look offsets since we're using widescreen assets now. 2022-11-30 10:03:53 +01:00
Mitchell Richters
7b3f8b0caf - Duke: Move displayrpg() lambda to new weapon offsets. 2022-11-30 10:03:53 +01:00
Mitchell Richters
71f5b7d9df - Duke: Move displaytripbomb() lambda to new weapon offsets. 2022-11-30 10:03:53 +01:00
Mitchell Richters
bd6e1d4f89 - Duke: Move displayknee() lambda to new weapon offsets. 2022-11-30 10:03:53 +01:00
Mitchell Richters
a6cfdea480 - Improved weapon drawing, based on the new crosshair drawing offset code, starting with Duke's pistol. 2022-11-30 10:03:52 +01:00
Mitchell Richters
ef52694365 - Improved crosshair drawing that factor's in look_ang better I've had stashed away for a little bit. 2022-11-30 10:03:52 +01:00
Mitchell Richters
a012fd8f94 - SW: Pitch-adjusted velocity for SpawnShell(). 2022-11-30 10:03:52 +01:00
Mitchell Richters
84dbd935d7 - SW: Pitch-adjusted velocity for PlayerInitCaltrops(). 2022-11-30 10:03:52 +01:00
Mitchell Richters
b6665a9855 - SW: Pitch-adjusted velocity for PlayerInitChemBomb(). 2022-11-30 10:03:52 +01:00
Mitchell Richters
8193416e7e - SW: Pitch-adjusted velocity for InitFireball(). 2022-11-30 10:03:52 +01:00
Mitchell Richters
c8f4e8dab2 - SW: Pitch-adjusted velocity for InitMine(). 2022-11-30 10:03:51 +01:00
Mitchell Richters
db2f9b9b13 - SW: Pitch-adjusted velocity for InitGrenade(). 2022-11-30 10:03:51 +01:00
Mitchell Richters
9d0b146470 - SW: Pitch-adjusted velocity for InitSobjMachineGun(). 2022-11-30 10:03:51 +01:00
Mitchell Richters
95a5e51283 - SW: Pitch-adjusted velocity for InitTurretLaser(). 2022-11-30 10:03:51 +01:00
Mitchell Richters
a1791acf97 - SW: Pitch-adjusted velocity for InitTurretRail(). 2022-11-30 10:03:50 +01:00
Mitchell Richters
01e326df9d - SW: Pitch-adjusted velocity for InitTurretFireball(). 2022-11-30 10:03:50 +01:00
Mitchell Richters
462576bc51 - SW: Pitch-adjusted velocity for InitTurretRocket(). 2022-11-30 10:03:50 +01:00
Mitchell Richters
9299e5f813 - SW: Pitch-adjusted velocity for InitTurretMicro(). 2022-11-30 10:03:50 +01:00
Mitchell Richters
86a7f7ca2c - SW: Pitch-adjusted velocity for InitTankShell(). 2022-11-30 10:03:49 +01:00
Mitchell Richters
b99dac1e56 - SW: Pitch-adjusted velocity for InitUzi(). 2022-11-30 10:03:49 +01:00
Mitchell Richters
319c1533b3 - SW: Pitch-adjusted velocity for InitTracerTurret(). 2022-11-30 10:03:49 +01:00
Mitchell Richters
25e0b9a073 - SW: Pitch-adjusted velocity for InitTracerUzi(). 2022-11-30 10:03:49 +01:00
Mitchell Richters
7ae21a27cc - SW: Pitch-adjusted velocity for InitMicro(). 2022-11-30 10:03:48 +01:00
Mitchell Richters
7658d8772d - SW: Pitch-adjusted velocity for InitNuke(). 2022-11-30 10:03:48 +01:00
Mitchell Richters
393553780b - SW: Pitch-adjusted velocity for InitBunnyRocket(). 2022-11-30 10:03:48 +01:00
Mitchell Richters
26460bc6aa - SW: Pitch-adjusted velocity for InitRocket(). 2022-11-30 10:03:48 +01:00
Mitchell Richters
8da5b096c0 - SW: Pitch-adjusted velocity for InitRail(). 2022-11-30 10:03:47 +01:00
Mitchell Richters
283f8d208a - SW: Pitch-adjusted velocity for InitLaser(). 2022-11-30 10:03:47 +01:00
Mitchell Richters
51c0fbcca1 - SW: Pitch-adjusted velocity for InitShotgun(). 2022-11-30 10:03:47 +01:00
Mitchell Richters
3fd397e384 - SW: Pitch-adjusted velocity for InitHeartAttack(). 2022-11-30 10:03:47 +01:00
Mitchell Richters
a27e5a0ed2 - SW: Pitch-adjusted velocity for InitStar(). 2022-11-30 10:03:47 +01:00
Mitchell Richters
bcf09c3037 - SW: Pitch-adjusted velocity for InitFistAttack(). 2022-11-30 10:03:46 +01:00
Mitchell Richters
2577ea21f2 - SW: Pitch-adjusted velocity for InitSwordAttack(). 2022-11-30 10:03:46 +01:00
Mitchell Richters
2b4149b70e - SW: Pitch-adjusted velocity for InitSpellMirv(). 2022-11-30 10:03:46 +01:00
Mitchell Richters
b7a1e699f6 - SW: Pitch-adjusted velocity for InitSpellNapalm(). 2022-11-30 10:03:46 +01:00
Christoph Oelckers
1d39e1edc1 - fixed bouncing of freezer's projectile. 2022-11-30 09:57:27 +01:00