Skip to content

Commit

Permalink
debug CTD
Browse files Browse the repository at this point in the history
  • Loading branch information
AndbGame committed Feb 20, 2024
1 parent 2df7709 commit 0128263
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions src/NodeHider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,16 @@ bool DeviousDevices::NodeHider::ShouldHideWeapons(RE::Actor* a_actor) const
bool DeviousDevices::NodeHider::AddHideNode(RE::Actor* a_actor, std::string a_nodename)
{
if (a_actor == nullptr) return false;

RE::NiNode* loc_thirdpersonNode = a_actor->Get3D(false)->AsNode();

if (!a_actor->Is3DLoaded()) {
WARN("NodeHider::RemoveHideNode() - Is3DLoaded() false!!!")
}
auto _3d = a_actor->Get3D(false);
if (_3d == nullptr) {
WARN("NodeHider::RemoveHideNode() - _3d is nullptr!!!")
}

RE::NiNode* loc_thirdpersonNode = _3d->AsNode(); // a_actor->Get3D(false)->AsNode();

if (loc_thirdpersonNode == nullptr) return false;

Expand All @@ -259,8 +267,16 @@ bool DeviousDevices::NodeHider::AddHideNode(RE::Actor* a_actor, std::string a_no
bool DeviousDevices::NodeHider::RemoveHideNode(RE::Actor* a_actor, std::string a_nodename)
{
if (a_actor == nullptr) return false;

if (!a_actor->Is3DLoaded()) {
WARN("NodeHider::RemoveHideNode() - Is3DLoaded() false!!!")
}
auto _3d = a_actor->Get3D(false);
if (_3d == nullptr) {
WARN("NodeHider::RemoveHideNode() - _3d is nullptr!!!")
}

RE::NiNode* loc_thirdpersonNode = a_actor->Get3D(false)->AsNode();
RE::NiNode* loc_thirdpersonNode = _3d->AsNode(); // a_actor->Get3D(false)->AsNode();

if (loc_thirdpersonNode == nullptr) return false;

Expand Down

0 comments on commit 0128263

Please sign in to comment.