Bone Getters Part 2/3, plus fixed warnings for MSVC
* add getters for frame poses * fix missing joint in GetJointPose * clean up models_iqm.cpp * clean up usage of I_GetTimeFrac, split out matrix calculation into its own function * clean up SetModelBoneRotationInternal * clean up a few float <-> double and unsigned <-> signed warnings * fix more warnings * further clean up warnings * split mode ObjectToWorldMatrix stuff * initial work on bone getters, matrix hell (the matrix/vec3 multiplications are probably wrong af, just gotta add more stuff 'till i can test it) * clean up matrix math * GetBone/TransformByBone * fix GetBoneFramePose * fix ObjectToWorldMatrix * fix missing array resize * raw matrix getters (for use with gutamatics/etc) * reverse matrix mult order * replace GetBoneLength/GetBoneDir with GetBoneBaseTRS * fix GetBonePosition, remove GetBoneWorldMatrix as it's useless * GetBonePosition * deduplicate code * rename GetBonePosition to GetBoneBasePosition to avoid confusion * GetBoneBaseRotation * GetBonePosition helper function * forgot include_offsets
This commit is contained in:
parent
db8bdab669
commit
d5f5c71d67
33 changed files with 1065 additions and 220 deletions
|
|
@ -123,7 +123,12 @@ void DNetworkBuffer::AddDouble(double msg)
|
|||
|
||||
void DNetworkBuffer::AddString(const FString& msg)
|
||||
{
|
||||
_size += msg.Len() + 1u;
|
||||
if(msg.Len() >= UINT_MAX)
|
||||
{
|
||||
I_Error("network buffer string too large");
|
||||
}
|
||||
|
||||
_size += ((unsigned int)msg.Len()) + 1u;
|
||||
_buffer.Push({ NET_STRING, msg });
|
||||
}
|
||||
|
||||
|
|
@ -427,8 +432,14 @@ bool EventManager::SendNetworkCommand(const FName& cmd, VMVa_List& args)
|
|||
{
|
||||
++bytes; // Strings will always consume at least one byte.
|
||||
const FString* str = ListGetString(args);
|
||||
|
||||
if(str->Len() >= UINT_MAX || (bytes + (unsigned int)str->Len()) >= UINT_MAX)
|
||||
{
|
||||
I_Error("network buffer string too large");
|
||||
}
|
||||
|
||||
if (str != nullptr)
|
||||
bytes += str->Len();
|
||||
bytes += (unsigned int)str->Len();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue