[Fix] Targetting bug when labels enabled.
[Fix] Bug also in docking..
This commit is contained in:
parent
222751e772
commit
476fce2911
@ -177,7 +177,7 @@ void Player::DrawHUD(const Frame* cam_frame) {
|
||||
Gui::Screen::EnterOrtho();
|
||||
glColor3f(.7, .7, .7);
|
||||
|
||||
if(L3D::world_view->GetShowLabels()) {
|
||||
{
|
||||
for(std::list<Body*>::iterator i = Space::bodies.begin(); i != Space::bodies.end(); ++i) {
|
||||
if((L3D::GetCamType() != L3D::CAM_EXTERNAL) && (*i == this)) continue;
|
||||
Body* b = *i;
|
||||
@ -188,6 +188,7 @@ void Player::DrawHUD(const Frame* cam_frame) {
|
||||
&_pos.x, &_pos.y, &_pos.z)) {
|
||||
b->SetProjectedPos(_pos);
|
||||
b->SetOnscreen(true);
|
||||
if(L3D::world_view->GetShowLabels()) Gui::Screen::RenderLabel(b->GetLabel(), _pos.x, _pos.y);
|
||||
} else
|
||||
b->SetOnscreen(false);
|
||||
}
|
||||
|
@ -175,12 +175,12 @@ void Ship::SetDockedWith(SpaceStation* s) {
|
||||
Enable();
|
||||
|
||||
m_dockedWith = 0;
|
||||
|
||||
} else {
|
||||
m_dockedWith = s;
|
||||
dockingTimer = 0.0f;
|
||||
SetVelocity(vector3d(0, 0, 0));
|
||||
SetAngVelocity(vector3d(0, 0, 0));
|
||||
Disable();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,6 @@ bool SpaceStation::OnCollision(Body* b, Uint32 flags) {
|
||||
if(b->GetType() == Object::SHIP) {
|
||||
Ship* s = static_cast<Ship*>(b);
|
||||
if((!s->GetDockedWith()) && (s->GetDockingTimer() != 0.0f)) {
|
||||
s->Disable();
|
||||
s->SetDockedWith(this);
|
||||
printf("Docking!\n");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user