From b3bb34974fddfae6cea9ca59d71f95e32621793d Mon Sep 17 00:00:00 2001 From: Daniel O'Brien Date: Sat, 16 Nov 2013 22:17:46 +1100 Subject: updated plugin again... --- source/Entities/Player.cpp | 8 ++++---- source/Entities/Player.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'source') diff --git a/source/Entities/Player.cpp b/source/Entities/Player.cpp index bdcf0aae9..38b41fb19 100644 --- a/source/Entities/Player.cpp +++ b/source/Entities/Player.cpp @@ -336,15 +336,15 @@ float cPlayer::GetXpPercentage() -bool cPlayer::SetCurrentExperience(short int a_XpTotal) +bool cPlayer::SetCurrentExperience(short int a_CurrentXp) { - if(!(a_XpTotal >= 0) || (a_XpTotal > (SHRT_MAX - m_LifetimeTotalXp))) + if(!(a_CurrentXp >= 0) || (a_CurrentXp > (SHRT_MAX - m_LifetimeTotalXp))) { - LOGWARNING("Tried to update experiece with an invalid Xp value: %d", a_XpTotal); + LOGWARNING("Tried to update experiece with an invalid Xp value: %d", a_CurrentXp); return false; //oops, they gave us a dodgey number } - m_CurrentXp = a_XpTotal; + m_CurrentXp = a_CurrentXp; // Set experience to be updated m_bDirtyExperience = true; diff --git a/source/Entities/Player.h b/source/Entities/Player.h index 463a6d8dc..5abca9899 100644 --- a/source/Entities/Player.h +++ b/source/Entities/Player.h @@ -429,7 +429,7 @@ protected: static short XpForLevel(short int a_Level); /// inverse of XpAtLevel, ref: http://minecraft.gamepedia.com/XP values are as per this with pre-calculations - static short CalcLevelFromXp(short int a_XpCurrent); + static short CalcLevelFromXp(short int a_CurrentXp); bool m_IsChargingBow; int m_BowCharge; -- cgit v1.2.3