1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-25 09:44:02 +00:00

fix old fixme, remove unused code

This commit is contained in:
fgenesis 2024-11-16 06:00:00 +01:00
parent 5516c89576
commit 0ae1250146

View file

@ -100,18 +100,9 @@ protected:
wp.y = core->center.y + h2; wp.y = core->center.y + h2;
Vector move = wp - getWorldPosition(); Vector move = wp - getWorldPosition();
// FIXME: This is a quick HACK to get the current world map // If we don't scale the move vector properly, the dots overshoot at high zoom or don't go far
// scale factor so we can set the position properly, without // enough at low zoom and we can end up with a weird "disco" effect -- see icculus bug 4542.
// having to play with multiple levels of parent pointers or position += move / parent->getRealScale().x;
// anything like that. (If we don't scale the move vector
// properly, the dots overshoot at high zoom or don't go far
// enough at low zoom and we can end up with a weird "disco"
// effect -- see icculus bug 4542.)
const float x0 = getWorldPosition().x;
position.x += 1;
const float x1 = getWorldPosition().x;
position.x -= 1;
position += move / (x1-x0);
} }
}; };
@ -144,28 +135,6 @@ public:
protected: protected:
BeaconData *beaconData; BeaconData *beaconData;
void setProperPosition()
{
Vector wp = parent->getWorldCollidePosition(truePosition);
Vector diff = wp - core->center;
float w2 = core->getVirtualWidth()/2;
float h2 = core->getVirtualHeight()/2;
if (diff.x < -w2)
wp.x = core->center.x - w2;
if (diff.x > w2)
wp.x = core->center.x + w2;
if (diff.y < -h2)
wp.y = core->center.y - h2;
if (diff.y > h2)
wp.y = core->center.y + h2;
Vector move = wp - getWorldPosition();
position += move;
}
void onUpdate(float dt) void onUpdate(float dt)
{ {
Quad::onUpdate(dt); Quad::onUpdate(dt);