homogenize player controller packet interface
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
This commit is contained in:
parent
27fa045a2e
commit
65e3c0703b
@ -25,6 +25,7 @@ import electrosphere.net.parser.net.message.EntityMessage;
|
||||
import electrosphere.net.parser.net.message.EntityMessage.EntityMessageType;
|
||||
import electrosphere.net.synchronization.transport.StateCollection;
|
||||
import electrosphere.net.template.ClientProtocolTemplate;
|
||||
import electrosphere.server.datacell.utils.EntityLookupUtils;
|
||||
import electrosphere.util.Utilities;
|
||||
|
||||
/**
|
||||
@ -53,6 +54,10 @@ public class EntityProtocol implements ClientProtocolTemplate<EntityMessage> {
|
||||
LoggerInterface.loggerNetworking.WARNING("Client received packet for entity that is not in the client scene!");
|
||||
Globals.clientSceneWrapper.dumpTranslationLayerStatus();
|
||||
Globals.clientSceneWrapper.dumpIdData(message.getentityID());
|
||||
Entity serverEntity = EntityLookupUtils.getEntityById(message.getentityID());
|
||||
LoggerInterface.loggerNetworking.WARNING("Entity type: " + CommonEntityUtils.getEntityType(serverEntity));
|
||||
LoggerInterface.loggerNetworking.WARNING("Entity subtype: " + CommonEntityUtils.getEntitySubtype(serverEntity));
|
||||
LoggerInterface.loggerNetworking.WARNING("Message type: " + message.getMessageSubtype());
|
||||
}
|
||||
|
||||
switch(message.getMessageSubtype()){
|
||||
|
||||
@ -2,8 +2,7 @@ package electrosphere.net.server.player;
|
||||
|
||||
import electrosphere.engine.Globals;
|
||||
import electrosphere.entity.Entity;
|
||||
import electrosphere.entity.types.creature.CreatureUtils;
|
||||
import electrosphere.net.parser.net.message.EntityMessage;
|
||||
import electrosphere.net.NetUtils;
|
||||
import electrosphere.net.parser.net.message.NetworkMessage;
|
||||
import electrosphere.net.server.ServerConnectionHandler;
|
||||
|
||||
@ -162,7 +161,7 @@ public class Player {
|
||||
}
|
||||
this.playerEntity = playerEntity;
|
||||
if(isReplacing){
|
||||
this.addMessage(EntityMessage.constructsetPropertyMessage(playerEntity.getId(), System.currentTimeMillis(), 0, CreatureUtils.getControllerPlayerId(playerEntity)));
|
||||
this.addMessage(NetUtils.createSetCreatureControllerIdEntityMessage(playerEntity));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user