diff --git a/OpenTESArena/src/Items/ArenaItemUtils.h b/OpenTESArena/src/Items/ArenaItemUtils.h index 67c908e8b..7a7e6061b 100644 --- a/OpenTESArena/src/Items/ArenaItemUtils.h +++ b/OpenTESArena/src/Items/ArenaItemUtils.h @@ -6,6 +6,7 @@ namespace ArenaItemUtils // Converts Arena weight units to kilograms. constexpr double KilogramsDivisor = 256.0; + constexpr int FistsWeaponID = -1; constexpr int RangedWeaponIDs[] = { 16, 17 }; } diff --git a/OpenTESArena/src/Player/Player.cpp b/OpenTESArena/src/Player/Player.cpp index 2b86b1c01..64457053e 100644 --- a/OpenTESArena/src/Player/Player.cpp +++ b/OpenTESArena/src/Player/Player.cpp @@ -15,6 +15,7 @@ #include "../Game/Game.h" #include "../Game/GameState.h" #include "../Game/Options.h" +#include "../Items/ArenaItemUtils.h" #include "../Items/ItemLibrary.h" #include "../Math/Constants.h" #include "../Math/Quaternion.h" @@ -126,8 +127,7 @@ namespace weapons.set(i, charClassDef.getAllowedWeapon(i)); } - // Fists. - weapons.set(allowedWeaponCount, -1); + weapons.set(allowedWeaponCount, ArenaItemUtils::FistsWeaponID); const int randIndex = random.next(weapons.getCount()); return weapons.get(randIndex);