Fix shooterID/ownerID not getting remapped

This commit is contained in:
Thinkofdeath 2013-12-08 17:36:29 +00:00
parent 17fc120e07
commit 4537055caa

View File

@ -71,8 +71,7 @@ public class EntityMap
{
packet.setInt( packetIdLength + 4, serverEntityId );
}
}
if ( packetId == 0x13 )
} else if ( packetId == 0x13 )
{
int count = packet.getByte( packetIdLength );
for ( int i = 0; i < count; i++ )
@ -86,6 +85,24 @@ public class EntityMap
packet.setInt( packetIdLength + 1 + i * 4, serverEntityId );
}
}
} else if ( packetId == 0x0E )
{
DefinedPacket.readVarInt( packet );
int idLength = packet.readerIndex() - readerIndex - packetIdLength;
int type = packet.getByte( idLength );
if ( type == 60 || type == 90 )
{
int readId = packet.getInt( packetIdLength + idLength + 15 );
if ( readId == serverEntityId )
{
packet.setInt( packetIdLength + idLength + 15, clientEntityId );
} else if ( readId == clientEntityId )
{
packet.setInt( packetIdLength + idLength + 15, serverEntityId );
}
}
}
packet.readerIndex( readerIndex );
}