Skip to content

Commit

Permalink
clang format
Browse files Browse the repository at this point in the history
  • Loading branch information
DakkJaniels committed Jan 10, 2023
1 parent 6b021d6 commit 49852a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions Source/monster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1042,8 +1042,6 @@ void StartMonsterDeath(int i, int pnum, bool sendmsg)
auto &monster = Monsters[i];
assert(monster.MType != nullptr);



if (pnum >= 0)
monster.mWhoHit |= 1 << pnum;
if (pnum < MAX_PLRS && i >= MAX_PLRS) /// BUGFIX: i >= MAX_PLRS (fixed)
Expand Down
4 changes: 2 additions & 2 deletions Source/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2759,12 +2759,12 @@ void AddPlrExperience(int pnum, int lvl, int exp)
uint32_t clampedExp = std::max(static_cast<int>(exp * (1 + (lvl - player._pLevel) / 10.0)), 0);

// Prevent power leveling for low level characters
if (gbIsMultiplayer) {
if (gbIsMultiplayer) {
const uint32_t clampedPlayerLevel = clamp(static_cast<int>(player._pLevel), 1, MAXCHARLEVEL);

// for low level characters experience gain is capped to 1/20 of current levels xp
// REMOVED - for high level characters experience gain is capped to 200 * current level - this is a smaller value than 1/20 of the exp needed for the next level after level 5.
clampedExp = std::min({ clampedExp, /* level 0-5: */ ExpLvlsTbl[clampedPlayerLevel] / 20U});
clampedExp = std::min({ clampedExp, /* level 0-5: */ ExpLvlsTbl[clampedPlayerLevel] / 20U });
}

constexpr uint32_t MaxExperience = 2000000000U;
Expand Down

0 comments on commit 49852a4

Please sign in to comment.