Skip to content

Commit

Permalink
- Remove some pointless weapon functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjr4077au committed Mar 24, 2023
1 parent 7fe6bef commit 791504b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 24 deletions.
2 changes: 0 additions & 2 deletions source/games/exhumed/src/aistuff.h
Expand Up @@ -138,8 +138,6 @@ void SetNewWeapon(int nPlayer, int nWeapon);
void SetNewWeaponImmediate(int nPlayer, int nWeapon);
void SetNewWeaponIfBetter(int nPlayer, int nWeapon);
void SelectNewWeapon(int nPlayer);
void StopFiringWeapon(int nPlayer);
void FireWeapon(int nPlayer);
void CheckClip(int nPlayer);
void MoveWeapons(int nPlayer);
void DrawWeapons(double interpfrac);
Expand Down
12 changes: 0 additions & 12 deletions source/games/exhumed/src/gun.cpp
Expand Up @@ -248,18 +248,6 @@ void SelectNewWeapon(int nPlayer)
//
//---------------------------------------------------------------------------

void StopFiringWeapon(int nPlayer)
{
PlayerList[nPlayer].bIsFiring = false;
}

void FireWeapon(int nPlayer)
{
if (!PlayerList[nPlayer].bIsFiring) {
PlayerList[nPlayer].bIsFiring = true;
}
}

void SetWeaponStatus(int nPlayer)
{
}
Expand Down
12 changes: 2 additions & 10 deletions source/games/exhumed/src/player.cpp
Expand Up @@ -444,7 +444,7 @@ void StartDeathSeq(int nPlayer, int nVal)
}
}

StopFiringWeapon(nPlayer);
PlayerList[nPlayer].bIsFiring = false;

PlayerList[nPlayer].pActor->PrevAngles.Pitch = PlayerList[nPlayer].pActor->spr.Angles.Pitch = nullAngle;
pActor->oviewzoffset = pActor->viewzoffset = -55;
Expand Down Expand Up @@ -1520,15 +1520,7 @@ void AIPlayer::Tick(RunListEvent* ev)
}
}

// was int var_38 = buttons & 0x8
if (pPlayer->input.actions & SB_FIRE)
{
FireWeapon(pPlayer->nPlayer);
}
else
{
StopFiringWeapon(pPlayer->nPlayer);
}
pPlayer->bIsFiring = !!(pPlayer->input.actions & SB_FIRE);
}

updatePlayerAction(pPlayer);
Expand Down

0 comments on commit 791504b

Please sign in to comment.