Multiplayer bugfixes

This commit is contained in:
Anuken
2020-07-09 13:13:57 -04:00
parent 29e9d064df
commit 2584197a02
24 changed files with 139 additions and 70 deletions

View File

@@ -22,8 +22,19 @@ abstract class SyncComp implements Entityc{
@Override
public void update(){
if(Vars.net.client() && !isLocal()){
//interpolate the player if:
//- this is a client and the entity is everything except the local player
//- this is a server and the entity is a remote player
if((Vars.net.client() && !isLocal()) || isRemote()){
interpolate();
}
}
@Override
public void remove(){
//notify client of removal
if(Vars.net.client()){
Vars.netClient.addRemovedEntity(id());
}
}
}