- SW: Comment out all boat code, it's actually not used within the game at all and was very confusing...

This commit is contained in:
Mitchell Richters 2020-09-08 21:40:20 +10:00
parent cb7e797842
commit 8625ac573d
6 changed files with 26 additions and 8 deletions

View File

@ -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)

View File

@ -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));

View File

@ -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;

View File

@ -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),

View File

@ -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;

View File

@ -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
}
}