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:
parent
5516c89576
commit
0ae1250146
1 changed files with 3 additions and 34 deletions
|
@ -100,18 +100,9 @@ protected:
|
|||
wp.y = core->center.y + h2;
|
||||
|
||||
Vector move = wp - getWorldPosition();
|
||||
// FIXME: This is a quick HACK to get the current world map
|
||||
// scale factor so we can set the position properly, without
|
||||
// having to play with multiple levels of parent pointers or
|
||||
// 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);
|
||||
// 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.
|
||||
position += move / parent->getRealScale().x;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -144,28 +135,6 @@ public:
|
|||
protected:
|
||||
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)
|
||||
{
|
||||
Quad::onUpdate(dt);
|
||||
|
|
Loading…
Reference in a new issue