Fixed transformation of subentity bounding boxes.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5659 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
a32d957d20
commit
0f25a6d7eb
@ -5624,15 +5624,15 @@ ShipEntity* doOctreesCollide(ShipEntity* prime, ShipEntity* other)
|
||||
return; // TOO FAR AWAY
|
||||
}
|
||||
|
||||
OOGL(glPushMatrix());
|
||||
|
||||
if ([self status] == STATUS_ACTIVE)
|
||||
{
|
||||
Vector abspos = position; // STATUS_ACTIVE means it is in control of it's own orientation
|
||||
Vector abspos = position; // STATUS_ACTIVE means it is in control of its own orientation
|
||||
Entity *last = nil;
|
||||
Entity *father = [self owner];
|
||||
OOMatrix r_mat;
|
||||
|
||||
OOGL(glPushMatrix());
|
||||
|
||||
while ((father)&&(father != last) &&father != NO_TARGET)
|
||||
{
|
||||
r_mat = [father drawRotationMatrix];
|
||||
@ -5644,22 +5644,15 @@ ShipEntity* doOctreesCollide(ShipEntity* prime, ShipEntity* other)
|
||||
|
||||
GLLoadOOMatrix([UNIVERSE viewMatrix]);
|
||||
GLTranslateOOVector(abspos);
|
||||
GLMultOOMatrix(rotMatrix);
|
||||
[self drawImmediate:immediate translucent:translucent];
|
||||
|
||||
OOGL(glPopMatrix());
|
||||
}
|
||||
else
|
||||
{
|
||||
OOGL(glPushMatrix());
|
||||
|
||||
GLTranslateOOVector(position);
|
||||
GLMultOOMatrix(rotMatrix);
|
||||
[self drawImmediate:immediate translucent:translucent];
|
||||
|
||||
OOGL(glPopMatrix());
|
||||
}
|
||||
|
||||
GLMultOOMatrix(rotMatrix);
|
||||
[self drawImmediate:immediate translucent:translucent];
|
||||
|
||||
#ifndef NDEBUG
|
||||
if (gDebugFlags & DEBUG_BOUNDING_BOXES)
|
||||
{
|
||||
@ -5667,6 +5660,8 @@ ShipEntity* doOctreesCollide(ShipEntity* prime, ShipEntity* other)
|
||||
}
|
||||
#endif
|
||||
|
||||
OOGL(glPopMatrix());
|
||||
|
||||
OOVerifyOpenGLState();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user