Fixed Parallax not moving players serverside
This commit is contained in:
@@ -29,4 +29,15 @@ abstract class PhysicsComp implements Velc, Hitboxc, Flyingc{
|
|||||||
void impulse(Vec2 v){
|
void impulse(Vec2 v){
|
||||||
impulse(v.x, v.y);
|
impulse(v.x, v.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void impulseNet(Vec2 v){
|
||||||
|
impulse(v.x, v.y);
|
||||||
|
|
||||||
|
//manually move units to simulate velocity for remote players
|
||||||
|
if(isRemote()){
|
||||||
|
float mass = mass();
|
||||||
|
move(v.x / mass, v.y / mass);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
|
|||||||
float scl = 5f;
|
float scl = 5f;
|
||||||
float waterOffset = 0.07f;
|
float waterOffset = 0.07f;
|
||||||
|
|
||||||
//TODO fix sand near snow (sector 173)
|
|
||||||
Block[][] arr =
|
Block[][] arr =
|
||||||
{
|
{
|
||||||
{Blocks.water, Blocks.darksandWater, Blocks.darksand, Blocks.darksand, Blocks.darksand, Blocks.darksand, Blocks.sand, Blocks.sand, Blocks.sand, Blocks.sand, Blocks.darksandTaintedWater, Blocks.stone, Blocks.stone},
|
{Blocks.water, Blocks.darksandWater, Blocks.darksand, Blocks.darksand, Blocks.darksand, Blocks.darksand, Blocks.sand, Blocks.sand, Blocks.sand, Blocks.sand, Blocks.darksandTaintedWater, Blocks.stone, Blocks.stone},
|
||||||
@@ -55,7 +54,6 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
|
|||||||
|
|
||||||
float water = 2f / arr[0].length;
|
float water = 2f / arr[0].length;
|
||||||
|
|
||||||
|
|
||||||
float rawHeight(Vec3 position){
|
float rawHeight(Vec3 position){
|
||||||
position = Tmp.v33.set(position).scl(scl);
|
position = Tmp.v33.set(position).scl(scl);
|
||||||
return (Mathf.pow((float)noise.octaveNoise3D(7, 0.5f, 1f/3f, position.x, position.y, position.z), 2.3f) + waterOffset) / (1f + waterOffset);
|
return (Mathf.pow((float)noise.octaveNoise3D(7, 0.5f, 1f/3f, position.x, position.y, position.z), 2.3f) + waterOffset) / (1f + waterOffset);
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ public class TractorBeamTurret extends BaseTurret{
|
|||||||
}
|
}
|
||||||
|
|
||||||
any = true;
|
any = true;
|
||||||
target.impulse(Tmp.v1.set(this).sub(target).limit((force + (1f - target.dst(this) / range) * scaledForce) * efficiency() * timeScale));
|
target.impulseNet(Tmp.v1.set(this).sub(target).limit((force + (1f - target.dst(this) / range) * scaledForce) * efficiency() * timeScale));
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
strength = Mathf.lerpDelta(strength, 0, 0.1f);
|
strength = Mathf.lerpDelta(strength, 0, 0.1f);
|
||||||
|
|||||||
Reference in New Issue
Block a user