summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-08-31 20:15:04 +0200
committerSergeanur <s.anureev@yandex.ua>2020-08-31 20:15:04 +0200
commit024f0a5027829fb7af962b59e996553ed3e78eb6 (patch)
treeed5b79dd22d6ac34f77c6ece1ca3c5786efedb2a
parentStinger done (diff)
downloadre3-024f0a5027829fb7af962b59e996553ed3e78eb6.tar
re3-024f0a5027829fb7af962b59e996553ed3e78eb6.tar.gz
re3-024f0a5027829fb7af962b59e996553ed3e78eb6.tar.bz2
re3-024f0a5027829fb7af962b59e996553ed3e78eb6.tar.lz
re3-024f0a5027829fb7af962b59e996553ed3e78eb6.tar.xz
re3-024f0a5027829fb7af962b59e996553ed3e78eb6.tar.zst
re3-024f0a5027829fb7af962b59e996553ed3e78eb6.zip
Diffstat (limited to '')
-rw-r--r--src/objects/Stinger.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/objects/Stinger.cpp b/src/objects/Stinger.cpp
index 86b44b57..7a84edac 100644
--- a/src/objects/Stinger.cpp
+++ b/src/objects/Stinger.cpp
@@ -54,10 +54,7 @@ CStinger::Init(CPed *pPed)
m_fMax_Z = Atan2(-pPed->GetForward().x, pPed->GetForward().y) + HALFPI;
for (i = 0; i < NUM_STINGER_SEGMENTS; i++) {
- // shouldn't this be some inlined method? guh...
- CVector pos = pSpikes[i]->GetPosition();
- pSpikes[i]->GetMatrix().SetRotate(0.0f, 0.0f, Atan2(-pPed->GetForward().x, pPed->GetForward().y));
- pSpikes[i]->GetMatrix().Translate(pos);
+ pSpikes[i]->SetOrientation(0.0f, 0.0f, Atan2(-pPed->GetForward().x, pPed->GetForward().y));
pSpikes[i]->SetPosition(m_vPos);
}
@@ -216,15 +213,11 @@ CStinger::Process()
pos2d = CVector2D(0.0f, 0.0f);
if (spike % 2 == 0) {
- CVector pos = pSpikes[spike]->GetPosition();
- pSpikes[spike]->GetMatrix().SetRotate(0.0f, 0.0f, angle1);
- pSpikes[spike]->GetMatrix().Translate(pos);
+ pSpikes[spike]->SetOrientation(0.0f, 0.0f, angle1);
pos3d.x += pos2d.x;
pos3d.y += pos2d.y;
} else {
- CVector pos = pSpikes[spike]->GetPosition();
- pSpikes[spike]->GetMatrix().SetRotate(0.0f, 0.0f, angle2);
- pSpikes[spike]->GetMatrix().Translate(pos);
+ pSpikes[spike]->SetOrientation(0.0f, 0.0f, angle2);
}
pSpikes[spike]->SetPosition(pos3d);
}