|
@@ -73,21 +73,15 @@ void Klient::sendeStart( int spielZeit )
|
|
|
delete[] bytes;
|
|
|
}
|
|
|
|
|
|
-void Klient::sendeTastaturStatus( int spielerId, TastaturStatus ts, bool aktiv, int spielZeit, Vertex pos, Vertex speed, float rot, float rotS )
|
|
|
+void Klient::sendeTastaturStatus( int spielerId, TastaturStatus ts, bool aktiv, int spielZeit )
|
|
|
{
|
|
|
if( !klient )
|
|
|
return;
|
|
|
- short len = 33;
|
|
|
+ short len = 9;
|
|
|
char *bytes = new char[ len ];
|
|
|
*(int*)bytes = spielZeit;
|
|
|
*(char*)( bytes + 4 ) = (char)( (char)ts * 2 + (char)!aktiv );
|
|
|
*(int*)( bytes + 5 ) = spielerId;
|
|
|
- *(float*)( bytes + 9 ) = pos.x;
|
|
|
- *(float*)( bytes + 13 ) = pos.y;
|
|
|
- *(float*)( bytes + 17 ) = speed.x;
|
|
|
- *(float*)( bytes + 21 ) = speed.y;
|
|
|
- *(float*)( bytes + 25 ) = rot;
|
|
|
- *(float*)( bytes + 29 ) = rotS;
|
|
|
klient->spielNachricht( len, bytes );
|
|
|
delete[] bytes;
|
|
|
}
|