Kolja Strohm преди 4 години
родител
ревизия
3c252c7cd9
променени са 1 файла, в които са добавени 2 реда и са изтрити 20 реда
  1. 2 20
      StickmanWorldOnline/Geschoss.cpp

+ 2 - 20
StickmanWorldOnline/Geschoss.cpp

@@ -5,33 +5,15 @@
 Geschoss::Geschoss( int id, float speed, GeschossTyp typ, Richtung r, int x, int y, Spieler *besitzer )
     : GameObject( GESCHOSS, x, y, 15, 15 )
 {
-    if( typ == GESCHOSS_PFEIL )
-    {
-        if( r == OBEN || r == UNTEN )
-        {
-            setWidth( 7 );
-            setHeight( 30 );
-        }
-        else
-        {
-            setWidth( 30 );
-            setHeight( 7 );
-        }
-    }
-    else if( typ == FEUERBALL )
-    {
-        setWidth( 20 );
-        setHeight( 20 );
-    }
     this->speed = speed;
     this->richtung = richtung;
     this->besitzer = besitzer;
-    this->typ = typ;
     tunnelBenutzt = 0;
     umgelenkt = 0;
     geschosseGetroffen = 0;
     schalter = 0;
     this->id = id;
+    setTyp( typ );
 }
 
 Geschoss::~Geschoss()
@@ -96,7 +78,7 @@ void Geschoss::setTyp( GeschossTyp typ )
             setHeight( 7 );
         }
     }
-    else if( typ == FEUERBALL )
+    else if( typ == GESCHOSS_FEUERBALL )
     {
         setWidth( 20 );
         setHeight( 20 );