Skip to content

Commit

Permalink
Fixed player weapons having incorrect transforms applied.
Browse files Browse the repository at this point in the history
  • Loading branch information
onnoj committed Apr 21, 2024
1 parent 1f2f6b0 commit 1f33fb5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Source/rendering/hlrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -854,15 +854,14 @@ void HighlevelRenderer::OnDrawMeshEnd(FSceneNode* Frame, AActor* Owner)
return *reinterpret_cast<FCoords*>(baseAddress + 0x4ea08);
}();

bool isPlayerWeapon = (Owner->Owner==Frame->Viewport->Actor);
auto actor = Owner;
auto parent = Owner->Owner;
if (parent != nullptr)
if (parent != nullptr && !isPlayerWeapon)
{
wmCoords = wmCoords * parent->Rotation * SpecialCoords.Inverse();
}



for (auto light = callInfo.LeafLights; light != nullptr; light = light->Next)
{
m_LightManager.AddFrameLight(light->Actor, &light->Location);
Expand Down

0 comments on commit 1f33fb5

Please sign in to comment.