Fixed more unit warp

This commit is contained in:
Anuken
2020-09-04 11:07:01 -04:00
parent af47e7662f
commit c7522ff89f
8 changed files with 57 additions and 43 deletions

View File

@@ -179,6 +179,11 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra
if(unit != Nulls.unit){
unit.team(team);
unit.controller(this);
//this player just became remote, snap the interpolation so it doesn't go wild
if(unit.isRemote()){
unit.snapInterpolation();
}
}
Events.fire(new UnitChangeEvent(base(), unit));

View File

@@ -13,6 +13,7 @@ abstract class SyncComp implements Entityc{
//all these method bodies are internally generated
void snapSync(){}
void snapInterpolation(){}
void readSync(Reads read){}
void writeSync(Writes write){}
void readSyncManual(FloatBuffer buffer){}