mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-11 01:48:07 +00:00
refactor: allow usage of NiPoint3 and NiQuaternion in constexpr context (#1414)
* allow usage of NiPoint3 and NiQuaternion in constexpr context * removed .cpp files entirely * moving circular dependency circumvention stuff to an .inl file * real world usage!!!!! * reverting weird branch cross-pollination * removing more weird branch cross-pollination * remove comment * added inverse header guard to inl file * Update NiPoint3.inl * trying different constructor syntax * reorganize into .inl files for readability * uncomment include * moved non-constexpr definitions to cpp file * moved static definitions back to inl files * testing fix * moved constants into seperate namespace * Undo change in build-and-test.yml * nodiscard
This commit is contained in:
@@ -451,7 +451,7 @@ void Character::LoadXmlRespawnCheckpoints() {
|
||||
auto* r = points->FirstChildElement("r");
|
||||
while (r != nullptr) {
|
||||
int32_t map = 0;
|
||||
NiPoint3 point = NiPoint3::ZERO;
|
||||
NiPoint3 point = NiPoint3Constant::ZERO;
|
||||
|
||||
r->QueryAttribute("w", &map);
|
||||
r->QueryAttribute("x", &point.x);
|
||||
@@ -513,7 +513,7 @@ void Character::SetRespawnPoint(LWOMAPID map, const NiPoint3& point) {
|
||||
const NiPoint3& Character::GetRespawnPoint(LWOMAPID map) const {
|
||||
const auto& pair = m_WorldRespawnCheckpoints.find(map);
|
||||
|
||||
if (pair == m_WorldRespawnCheckpoints.end()) return NiPoint3::ZERO;
|
||||
if (pair == m_WorldRespawnCheckpoints.end()) return NiPoint3Constant::ZERO;
|
||||
|
||||
return pair->second;
|
||||
}
|
||||
|
Reference in New Issue
Block a user