From 8625ac573d316fd75ac93d766e07c9a24f6af927 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Tue, 8 Sep 2020 21:40:20 +1000 Subject: [PATCH] - SW: Comment out all boat code, it's actually not used within the game at all and was very confusing... --- source/sw/src/game.h | 2 +- source/sw/src/input.cpp | 4 +++- source/sw/src/panel.cpp | 2 +- source/sw/src/player.cpp | 22 +++++++++++++++++----- source/sw/src/track.cpp | 2 ++ source/sw/src/weapon.cpp | 2 ++ 6 files changed, 26 insertions(+), 8 deletions(-) diff --git a/source/sw/src/game.h b/source/sw/src/game.h index d4b1714c7..47bdd2c6d 100644 --- a/source/sw/src/game.h +++ b/source/sw/src/game.h @@ -1832,7 +1832,7 @@ struct SECTOR_OBJECTstruct #define SO_TURRET_MGUN 96 // machine gun #define SO_TURRET 97 #define SO_TANK 98 -#define SO_SPEED_BOAT 99 +// #define SO_SPEED_BOAT 99 #define SO_EMPTY(sop) ((sop)->xmid == INT32_MAX) diff --git a/source/sw/src/input.cpp b/source/sw/src/input.cpp index 5df8ea8bc..5b282d7f6 100644 --- a/source/sw/src/input.cpp +++ b/source/sw/src/input.cpp @@ -36,7 +36,7 @@ BEGIN_SW_NS void DoPlayerHorizon(PLAYERp pp, fixed_t const q16horz, double const scaleAdjust); void DoPlayerTurn(PLAYERp pp, fixed_t const q16avel, double const scaleAdjust); -void DoPlayerTurnBoat(PLAYERp pp, fixed_t q16avel); +// void DoPlayerTurnBoat(PLAYERp pp, fixed_t q16avel); void DoPlayerTurnTank(PLAYERp pp, fixed_t q16avel, int z, int floor_dist); void DoPlayerMoveTurret(PLAYERp pp, fixed_t q16avel, fixed_t q16horz, double const scaleAdjust); @@ -289,8 +289,10 @@ static void processMovement(PLAYERp const pp, ControlInfo* const hidInput, bool if (TEST(pp->Flags2, PF2_INPUT_CAN_TURN_GENERAL)) DoPlayerTurn(pp, q16avel, scaleAdjust); +#if 0 if (TEST(pp->Flags2, PF2_INPUT_CAN_TURN_BOAT)) DoPlayerTurnBoat(pp, q16avel); +#endif if (TEST(pp->Flags2, PF2_INPUT_CAN_TURN_TANK)) DoPlayerTurnTank(pp, q16avel, pp->posz + Z(10), labs(pp->posz + Z(10) - pp->sop->floor_loz)); diff --git a/source/sw/src/panel.cpp b/source/sw/src/panel.cpp index 674b053d1..a776caf92 100644 --- a/source/sw/src/panel.cpp +++ b/source/sw/src/panel.cpp @@ -460,7 +460,7 @@ int WeaponOperate(PLAYERp pp) case SO_TANK: case SO_TURRET: case SO_TURRET_MGUN: - case SO_SPEED_BOAT: + // case SO_SPEED_BOAT: if (!TEST(pp->sop->flags, SOBJ_HAS_WEAPON)) break; diff --git a/source/sw/src/player.cpp b/source/sw/src/player.cpp index d3fe01ead..d40de04ac 100644 --- a/source/sw/src/player.cpp +++ b/source/sw/src/player.cpp @@ -163,10 +163,10 @@ void DoPlayerBeginClimb(PLAYERp pp); void DoPlayerClimb(PLAYERp pp); void DoPlayerBeginDie(PLAYERp pp); void DoPlayerDie(PLAYERp pp); -void DoPlayerBeginOperateBoat(PLAYERp pp); +// void DoPlayerBeginOperateBoat(PLAYERp pp); void DoPlayerBeginOperateTank(PLAYERp pp); void DoPlayerBeginOperate(PLAYERp pp); -void DoPlayerOperateBoat(PLAYERp pp); +// void DoPlayerOperateBoat(PLAYERp pp); void DoPlayerOperateTank(PLAYERp pp); void DoPlayerOperateTurret(PLAYERp pp); void DoPlayerBeginDive(PLAYERp pp); @@ -1619,6 +1619,7 @@ DoPlayerTurn(PLAYERp pp, fixed_t const q16avel, double const scaleAdjust) } } +#if 0 void DoPlayerTurnBoat(PLAYERp pp, fixed_t q16avel) { @@ -1638,10 +1639,11 @@ DoPlayerTurnBoat(PLAYERp pp, fixed_t q16avel) if (q16avel != 0) { - pp->q16ang = (pp->q16ang * q16avel) & 0x7FFFFFF; + pp->q16ang = (pp->q16ang + q16avel) & 0x7FFFFFF; sprite[pp->PlayerSprite].ang = FixedToInt(pp->q16ang); } } +#endif void DoPlayerTurnTank(PLAYERp pp, fixed_t q16avel, int z, int floor_dist) @@ -2585,6 +2587,7 @@ void StopSOsound(short sectnum) } } +#if 0 void DoPlayerMoveBoat(PLAYERp pp) { @@ -2668,6 +2671,7 @@ DoPlayerMoveBoat(PLAYERp pp) DoPlayerHorizon(pp, pp->input.q16horz, 1); } } +#endif void DoTankTreads(PLAYERp pp) { @@ -5334,6 +5338,7 @@ DoPlayerWade(PLAYERp pp) } +#if 0 void DoPlayerBeginOperateBoat(PLAYERp pp) { @@ -5353,6 +5358,7 @@ DoPlayerBeginOperateBoat(PLAYERp pp) NewStateGroup(pp->PlayerSprite, u->ActorActionSet->Run); } +#endif void DoPlayerBeginOperateTank(PLAYERp pp) @@ -5534,6 +5540,7 @@ DoPlayerBeginOperate(PLAYERp pp) pp->posz = fz - PLAYER_HEIGHT; DoPlayerBeginOperateTurret(pp); break; +#if 0 case SO_SPEED_BOAT: if (pp->input.fvel|pp->input.svel) PlaySOsound(pp->sop->mid_sector, SO_DRIVE_SOUND); @@ -5542,6 +5549,7 @@ DoPlayerBeginOperate(PLAYERp pp) pp->posz = fz - PLAYER_HEIGHT; DoPlayerBeginOperateBoat(pp); break; +#endif default: return; } @@ -5622,6 +5630,7 @@ DoPlayerBeginRemoteOperate(PLAYERp pp, SECTOR_OBJECTp sop) pp->posz = fz - PLAYER_HEIGHT; DoPlayerBeginOperateTurret(pp); break; +#if 0 case SO_SPEED_BOAT: if (pp->input.fvel|pp->input.svel) PlaySOsound(pp->sop->mid_sector, SO_DRIVE_SOUND); @@ -5630,6 +5639,7 @@ DoPlayerBeginRemoteOperate(PLAYERp pp, SECTOR_OBJECTp sop) pp->posz = fz - PLAYER_HEIGHT; DoPlayerBeginOperateBoat(pp); break; +#endif default: return; } @@ -5777,6 +5787,7 @@ DoPlayerOperateTurret(PLAYERp pp) } +#if 0 void DoPlayerOperateBoat(PLAYERp pp) { @@ -5815,6 +5826,7 @@ DoPlayerOperateBoat(PLAYERp pp) PlayerRemoteReset(pp, save_sectnum); } } +#endif void DoPlayerOperateTank(PLAYERp pp) @@ -7853,10 +7865,10 @@ static saveable_code saveable_player_code[] = SAVE_CODE(DoPlayerClimb), SAVE_CODE(DoPlayerBeginDie), //SAVE_CODE(DoPlayerDie), - SAVE_CODE(DoPlayerBeginOperateBoat), + //SAVE_CODE(DoPlayerBeginOperateBoat), SAVE_CODE(DoPlayerBeginOperateTank), SAVE_CODE(DoPlayerBeginOperate), - SAVE_CODE(DoPlayerOperateBoat), + //SAVE_CODE(DoPlayerOperateBoat), SAVE_CODE(DoPlayerOperateTank), SAVE_CODE(DoPlayerOperateTurret), SAVE_CODE(DoPlayerBeginDive), diff --git a/source/sw/src/track.cpp b/source/sw/src/track.cpp index 4b1570261..f182d8b30 100644 --- a/source/sw/src/track.cpp +++ b/source/sw/src/track.cpp @@ -1394,12 +1394,14 @@ SetupSectorObject(short sectnum, short tag) sop->vel = 0; SET(sop->flags, SOBJ_OPERATIONAL); break; +#if 0 case SO_SPEED_BOAT: sop->vel = 0; sop->bob_amt = Z(2); sop->bob_speed = 4; SET(sop->flags, SOBJ_OPERATIONAL); break; +#endif default: SET(sop->flags, SOBJ_OPERATIONAL); break; diff --git a/source/sw/src/weapon.cpp b/source/sw/src/weapon.cpp index 1250485ab..a70d881a3 100644 --- a/source/sw/src/weapon.cpp +++ b/source/sw/src/weapon.cpp @@ -5985,6 +5985,7 @@ DoDamage(short SpriteNum, short Weapon) } break; +#if 0 case SO_SPEED_BOAT: damage = -100; @@ -6010,6 +6011,7 @@ DoDamage(short SpriteNum, short Weapon) SpawnBlood(SpriteNum, Weapon, 0, 0, 0, 0); break; +#endif } }