Skip to content

Commit

Permalink
fix (#33)
Browse files Browse the repository at this point in the history
* fixed: looking for ammo (bolts and arrows) works now again
  • Loading branch information
mlthelama authored Apr 2, 2023
2 parents 9744b09 + 348cb54 commit df5f7fd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.20)

set(NAME "LamasTinyHUD")
set(VERSION 1.4.0.0)
set(VERSION 1.4.1.0)

# ---- Options ----

Expand Down
8 changes: 6 additions & 2 deletions src/processing/set_setting_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "setting/custom_setting.h"
#include "setting/mcm_setting.h"
#include "setting_execute.h"
#include "util/constant.h"
#include "util/helper.h"
#include "util/player/player.h"
#include "util/string_util.h"
Expand Down Expand Up @@ -482,8 +483,11 @@ namespace processing {
const auto& [num_items, entry] = inv_data;
const auto ammo = item->As<RE::TESAmmo>();

if (ammo->IsBoundObject() || !ammo->GetPlayable() ||
ammo->GetRuntimeData().data.flags.any(RE::AMMO_DATA::Flag::kNonPlayable)) {
if (!ammo->GetPlayable() || ammo->GetRuntimeData().data.flags.any(RE::AMMO_DATA::Flag::kNonPlayable)) {
continue;
}

if (ammo->formID == util::bound_arrow) {
continue;
}

Expand Down
2 changes: 2 additions & 0 deletions src/util/constant.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ namespace util {
0x0003EADE },
{ RE::ActorValue::kStamina, 0x00039BE8 },
{ RE::ActorValue::kMagicka, 0x0003EAE1 } };

constexpr RE::FormID bound_arrow = 0x0010b0a7;
}
2 changes: 1 addition & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lamastinyhud",
"version-string": "1.4.0",
"version-string": "1.4.1",
"description": "hud element for skyrim",
"homepage": "https://github.com/mlthelama/LamasTinyHUD",
"license": "GPL-2.0-or-later",
Expand Down

0 comments on commit df5f7fd

Please sign in to comment.