From 0cd8c03bcd42171c6ceffb41e3e0bfdb1f5b32ec Mon Sep 17 00:00:00 2001 From: Benau Date: Tue, 18 Sep 2018 10:03:46 +0800 Subject: [PATCH] Fix uninitialized value --- src/items/item.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/items/item.cpp b/src/items/item.cpp index 7775d2cfc..d3b2e4559 100644 --- a/src/items/item.cpp +++ b/src/items/item.cpp @@ -116,6 +116,7 @@ Item::Item(ItemType type, const Vec3& xyz, const Vec3& normal, { assert(type != ITEM_TRIGGER); // use other constructor for that + m_was_available_previously = true; m_distance_2 = 1.2f; m_is_predicted = is_predicted; initItem(type, xyz); @@ -178,6 +179,7 @@ Item::Item(const Vec3& xyz, float distance, TriggerItemListener* trigger) m_original_lowmesh = NULL; m_node = NULL; m_listener = trigger; + m_was_available_previously = true; } // Item(xyz, distance, trigger) //-----------------------------------------------------------------------------