Преглед на файлове

Fehler in Sperbeanimation behoben

Kolja Strohm преди 5 години
родител
ревизия
6e6a04bea5
променени са 1 файла, в които са добавени 8 реда и са изтрити 1 реда
  1. 8 1
      Asteroids/Spiel/Spieler/DeadPlayer.cpp

+ 8 - 1
Asteroids/Spiel/Spieler/DeadPlayer.cpp

@@ -50,7 +50,14 @@ bool DeadPlayer::tick( const WeltInfo &info, double zeit )
 
 Rect2< float > DeadPlayer::getBoundingBox() const
 {
-    return Rect2< float >();
+    Rect2< float > r1 = m2a->getBoundingBox();
+    Rect2< float > r2 = m2b->getBoundingBox();
+    Rect2< float > r;
+    r.topLeft.x = min( r1.topLeft.x, r2.topLeft.x );
+    r.topLeft.y = min( r1.topLeft.y, r2.topLeft.y );
+    r.bottomRight.x = max( r1.bottomRight.x, r2.bottomRight.x );
+    r.bottomRight.y = max( r1.bottomRight.y, r2.bottomRight.y );
+    return r;
 }
 
 bool DeadPlayer::isFinished() const