From 87437881a0483b116d331f61c50e4c266dddbf17 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Mon, 24 Aug 2020 18:42:43 -0400 Subject: [PATCH] CCharAnimTime & CPOINode: Fix operator< --- Runtime/Character/CCharAnimTime.cpp | 10 +++++----- Runtime/Character/CPOINode.cpp | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Runtime/Character/CCharAnimTime.cpp b/Runtime/Character/CCharAnimTime.cpp index 0a6d4f26b..089ea0fe9 100644 --- a/Runtime/Character/CCharAnimTime.cpp +++ b/Runtime/Character/CCharAnimTime.cpp @@ -107,12 +107,12 @@ bool CCharAnimTime::operator<(const CCharAnimTime& other) const { if (other.x4_type == EType::NonZero) return other.x0_time > 0.f; - return other.x0_time < 0.f; - } else { - if (x4_type == EType::Infinity) - return x0_time < 0.f && other.x0_time > 0.f; - return x0_time < other.x0_time; + return other.x0_time > 0.f; // ? } + + if (other.x4_type == EType::Infinity) + return x0_time < 0.f && other.x0_time > 0.f; + return x0_time < 0.f; } CCharAnimTime& CCharAnimTime::operator*=(const CCharAnimTime& other) { diff --git a/Runtime/Character/CPOINode.cpp b/Runtime/Character/CPOINode.cpp index 07beb5ce5..3d1196b51 100644 --- a/Runtime/Character/CPOINode.cpp +++ b/Runtime/Character/CPOINode.cpp @@ -31,9 +31,9 @@ CPOINode::CPOINode(CInputStream& in) , x30_charIdx(in.readInt32Big()) , x34_flags(in.readInt32Big()) {} -bool CPOINode::operator>(const CPOINode& other) const { return x1c_time < other.x1c_time; } +bool CPOINode::operator>(const CPOINode& other) const { return x1c_time > other.x1c_time; } -bool CPOINode::operator<(const CPOINode& other) const { return x1c_time > other.x1c_time; } +bool CPOINode::operator<(const CPOINode& other) const { return x1c_time < other.x1c_time; } template size_t _getPOIList(const CCharAnimTime& time, T* listOut, size_t capacity, size_t iterator, u32 unk1,