mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-09 20:24:16 +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:
@@ -13,13 +13,13 @@ public:
|
||||
bUsedMouse = false;
|
||||
fCasterLatency = 0.0f;
|
||||
iCastType = 0;
|
||||
lastClickedPosit = NiPoint3::ZERO;
|
||||
lastClickedPosit = NiPoint3Constant::ZERO;
|
||||
optionalTargetID = LWOOBJID_EMPTY;
|
||||
originatorRot = NiQuaternion::IDENTITY;
|
||||
originatorRot = NiQuaternionConstant::IDENTITY;
|
||||
uiSkillHandle = 0;
|
||||
}
|
||||
|
||||
EchoStartSkill(LWOOBJID _optionalOriginatorID, std::string _sBitStream, TSkillID _skillID, bool _bUsedMouse = false, float _fCasterLatency = 0.0f, int32_t _iCastType = 0, NiPoint3 _lastClickedPosit = NiPoint3::ZERO, LWOOBJID _optionalTargetID = LWOOBJID_EMPTY, NiQuaternion _originatorRot = NiQuaternion::IDENTITY, uint32_t _uiSkillHandle = 0) {
|
||||
EchoStartSkill(LWOOBJID _optionalOriginatorID, std::string _sBitStream, TSkillID _skillID, bool _bUsedMouse = false, float _fCasterLatency = 0.0f, int32_t _iCastType = 0, NiPoint3 _lastClickedPosit = NiPoint3Constant::ZERO, LWOOBJID _optionalTargetID = LWOOBJID_EMPTY, NiQuaternion _originatorRot = NiQuaternionConstant::IDENTITY, uint32_t _uiSkillHandle = 0) {
|
||||
bUsedMouse = _bUsedMouse;
|
||||
fCasterLatency = _fCasterLatency;
|
||||
iCastType = _iCastType;
|
||||
@@ -50,16 +50,16 @@ public:
|
||||
stream->Write(iCastType != 0);
|
||||
if (iCastType != 0) stream->Write(iCastType);
|
||||
|
||||
stream->Write(lastClickedPosit != NiPoint3::ZERO);
|
||||
if (lastClickedPosit != NiPoint3::ZERO) stream->Write(lastClickedPosit);
|
||||
stream->Write(lastClickedPosit != NiPoint3Constant::ZERO);
|
||||
if (lastClickedPosit != NiPoint3Constant::ZERO) stream->Write(lastClickedPosit);
|
||||
|
||||
stream->Write(optionalOriginatorID);
|
||||
|
||||
stream->Write(optionalTargetID != LWOOBJID_EMPTY);
|
||||
if (optionalTargetID != LWOOBJID_EMPTY) stream->Write(optionalTargetID);
|
||||
|
||||
stream->Write(originatorRot != NiQuaternion::IDENTITY);
|
||||
if (originatorRot != NiQuaternion::IDENTITY) stream->Write(originatorRot);
|
||||
stream->Write(originatorRot != NiQuaternionConstant::IDENTITY);
|
||||
if (originatorRot != NiQuaternionConstant::IDENTITY) stream->Write(originatorRot);
|
||||
|
||||
uint32_t sBitStreamLength = sBitStream.length();
|
||||
stream->Write(sBitStreamLength);
|
||||
|
Reference in New Issue
Block a user