Skip to content

Commit

Permalink
Remove unused player property _pISplDur
Browse files Browse the repository at this point in the history
  • Loading branch information
AJenbo committed Jun 28, 2023
1 parent c281408 commit 8e7c29e
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 12 deletions.
8 changes: 4 additions & 4 deletions Source/loadsave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,9 +516,9 @@ void LoadPlayer(LoadHelper &file, Player &player)
player._pIFlags = static_cast<ItemSpecialEffect>(file.NextLE<int32_t>());
player._pIGetHit = file.NextLE<int32_t>();
player._pISplLvlAdd = file.NextLE<int8_t>();
file.Skip(1); // Unused
file.Skip(2); // Alignment
player._pISplDur = file.NextLE<int32_t>();
file.Skip(1); // Unused
file.Skip(2); // Alignment
file.Skip<int32_t>(); // _pISplDur
player._pIEnAc = file.NextLE<int32_t>();
player._pIFMinDam = file.NextLE<int32_t>();
player._pIFMaxDam = file.NextLE<int32_t>();
Expand Down Expand Up @@ -1330,7 +1330,7 @@ void SavePlayer(SaveHelper &file, const Player &player)
file.WriteLE<int8_t>(player._pISplLvlAdd);
file.Skip<uint8_t>(); // Skip _pISplCost
file.Skip(2); // Alignment
file.WriteLE<int32_t>(player._pISplDur);
file.Skip<int32_t>(); // _pISplDur
file.WriteLE<int32_t>(player._pIEnAc);
file.WriteLE<int32_t>(player._pIFMinDam);
file.WriteLE<int32_t>(player._pIFMaxDam);
Expand Down
5 changes: 0 additions & 5 deletions Source/missiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1869,8 +1869,6 @@ void AddFireWall(Missile &missile, AddMissileParameter &parameter)
missile._mirange *= i + 1;
if (missile._micaster == TARGET_PLAYERS || missile._misource < 0)
missile._mirange += currlevel;
else
missile._mirange += (Players[missile._misource]._pISplDur * missile._mirange) / 128;
missile._mirange *= 16;
missile.var1 = missile._mirange - missile._miAnimLen;
}
Expand Down Expand Up @@ -2122,7 +2120,6 @@ void AddGuardian(Missile &missile, AddMissileParameter &parameter)

missile._mlid = AddLight(missile.position.tile, 1);
missile._mirange = missile._mispllvl + (player._pLevel / 2);
missile._mirange += (missile._mirange * player._pISplDur) / 128;

if (missile._mirange > 30)
missile._mirange = 30;
Expand Down Expand Up @@ -2313,7 +2310,6 @@ void AddStoneCurse(Missile &missile, AddMissileParameter &parameter)
missile.position.tile = *targetMonsterPosition;
missile.position.start = missile.position.tile;
missile._mirange = missile._mispllvl + 6;
missile._mirange += (missile._mirange * player._pISplDur) / 128;

if (missile._mirange > 15)
missile._mirange = 15;
Expand Down Expand Up @@ -2455,7 +2451,6 @@ void AddInfravision(Missile &missile, AddMissileParameter & /*parameter*/)
Player &player = Players[missile._misource];

missile._mirange = ScaleSpellEffect(1584, missile._mispllvl);
missile._mirange += missile._mirange * player._pISplDur / 128;
}

void AddFlameWaveControl(Missile &missile, AddMissileParameter &parameter)
Expand Down
1 change: 0 additions & 1 deletion Source/player.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@ struct Player {
int _pIBonusAC;
int _pIBonusDamMod;
int _pIGetHit;
int _pISplDur;
int _pIEnAc;
int _pIFMinDam;
int _pIFMaxDam;
Expand Down
1 change: 0 additions & 1 deletion test/player_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ static void AssertPlayer(Player &player)
ASSERT_EQ(player._pIFlags, ItemSpecialEffect::None);
ASSERT_EQ(player._pIGetHit, 0);
ASSERT_EQ(player._pISplLvlAdd, 0);
ASSERT_EQ(player._pISplDur, 0);
ASSERT_EQ(player._pIEnAc, 0);
ASSERT_EQ(player._pIFMinDam, 0);
ASSERT_EQ(player._pIFMaxDam, 0);
Expand Down
1 change: 0 additions & 1 deletion test/writehero_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,6 @@ void AssertPlayer(Player &player)
ASSERT_EQ(player._pIFlags, ItemSpecialEffect::None);
ASSERT_EQ(player._pIGetHit, 0);
ASSERT_EQ(player._pISplLvlAdd, 0);
ASSERT_EQ(player._pISplDur, 0);
ASSERT_EQ(player._pIEnAc, 0);
ASSERT_EQ(player._pIFMinDam, 0);
ASSERT_EQ(player._pIFMaxDam, 0);
Expand Down

0 comments on commit 8e7c29e

Please sign in to comment.