Skip to content

Commit

Permalink
Snap muzzle graphics rotation for invisible weapons
Browse files Browse the repository at this point in the history
Invisible weapons don't need rotation interpolation. Just snap rotation directly so the muzzle graphic on bunkers appears where it should the first time.
  • Loading branch information
KJeff01 committed Jun 26, 2024
1 parent a1c4bb8 commit 4aa7547
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/display3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2774,6 +2774,7 @@ static void renderStructureTurrets(STRUCTURE *psStructure, iIMDShape *strImd, PI
// draw Weapon/ECM/Sensor for structure
if (flashImd[i] != nullptr)
{
rot = psStructure->asWeaps[i].rot; // Snap rotation so the muzzle graphic appears where it should, see aiUpdateStructure().
iIMDShape *pFlashDisplayIMD = flashImd[i]->displayModel();
glm::mat4 matrix(1.f);
// horrendous hack
Expand Down

0 comments on commit 4aa7547

Please sign in to comment.