Explorar o código

Tastaturereignis Parameter korrigiert

Kolja Strohm %!s(int64=6) %!d(string=hai) anos
pai
achega
c9a27d711f
Modificáronse 1 ficheiros con 2 adicións e 4 borrados
  1. 2 4
      StickmanWorldOnline/Spiel.cpp

+ 2 - 4
StickmanWorldOnline/Spiel.cpp

@@ -358,8 +358,7 @@ void Spiel::nachricht( int accountId, int len, char *bytes )
                     break;
                 }
                 Ereignis *e = new Ereignis( SPIELER_KEY_PRESSED );
-                char buff[] = { *bytes, 0 };
-                e->addParameter( "Betroffene Taste", new String( buff ) );
+                e->addParameter( "Betroffene Taste", new Integer( *bytes, 1 ) );
                 e->addParameter( "Ausführender Spieler", tmp->getThis() );
                 throwEvent( e );
                 for( int j = 0; j < spieler.getEintragAnzahl(); j++ )
@@ -386,8 +385,7 @@ void Spiel::nachricht( int accountId, int len, char *bytes )
                     break;
                 }
                 Ereignis *e = new Ereignis( SPIELER_KEY_RELEASED );
-                char buff[] = { *bytes, 0 };
-                e->addParameter( "Betroffene Taste", new String( buff ) );
+                e->addParameter( "Betroffene Taste", new Integer( *bytes, 1 ) );
                 e->addParameter( "Ausführender Spieler", tmp->getThis() );
                 throwEvent( e );
                 for( int j = 0; j < spieler.getEintragAnzahl(); j++ )