Browse Source

Einiege kleinere Fehler behoben

Kolja Strohm 4 years ago
parent
commit
7ec54adf0e

+ 1 - 1
StickmanWorldOnline/Bariere.cpp

@@ -89,7 +89,7 @@ void Bariere::setTeam( Team *team )
     if( this->textur )
         this->textur->release();
     if( w > h )
-        this->textur = resources->zResource( R_BARIERE, team ? team->getFarbe() : 0 )->getImages();
+        this->textur = resources->zResource( R_BARIERE, team ? team->getFarbe() : 0 )->getImage( 0 );
     else
     {
         Bild *r = resources->zResource( R_BARIERE, team ? team->getFarbe() : 0 )->getImages();

+ 1 - 1
StickmanWorldOnline/Geschoss.cpp

@@ -6,7 +6,7 @@ Geschoss::Geschoss( ResourceRegistry *zResources, int id, float speed, GeschossT
     : GameObject( GESCHOSS, x, y, 15, 15 )
 {
     this->speed = speed;
-    this->richtung = richtung;
+    this->richtung = r;
     this->besitzer = besitzer;
     resources = zResources->getThis();
     tunnelBenutzt = 0;

+ 2 - 2
StickmanWorldOnline/Spiel.cpp

@@ -754,9 +754,9 @@ void Spiel::stknVerarbeitung()
             break;
         case 7: // chat nachricht
         {
-            unsigned char len = ( unsigned char ) * ( msg + 1 );
+            unsigned char len = ( unsigned char ) *msg;
             char *buf = new char[ len + 1 ];
-            memcpy( buf, msg + 2, len );
+            memcpy( buf, msg + 1, len );
             buf[ len ] = 0;
             chat->addNachricht( buf );
             delete[] buf;

+ 0 - 2
StickmanWorldOnline/Spieler.cpp

@@ -224,8 +224,6 @@ Spieler::Spieler( ResourceRegistry *zResources, int id, Team *team, int spawnX,
     texturScale = 1;
     resources = zResources->getThis();
     current = zResources->getResource( R_SPIELER, farbe );
-    if( !current )
-        throw "error";
     textur = current->getImages()->getThis();
     heilungR = zResources->getResource( R_HEILUNG, 0 );
     schadenR = zResources->getResource( R_SCHADEN, 0 );

+ 1 - 1
StickmanWorldOnline/Umlenkung.cpp

@@ -6,13 +6,13 @@ Umlenkung::Umlenkung( ResourceRegistry *zResources, int id, int x, int y, int br
     : GameObject( UMLENKUNG, x, y, breite, height )
 {
     this->id = id;
-    this->richtung = richtung;
     this->maxAbklingzeit = maxAbklingzeit;
     this->drehend = drehend;
     this->aktiv = aktiv;
     benutzt = 0;
     abklingzeitVerbleibend = 0;
     this->resources = zResources->getThis();
+    setRichtung( richtung );
 }
 
 Umlenkung::~Umlenkung()