Fixed random collision deaths

This commit is contained in:
Anuken
2018-03-30 19:18:33 -04:00
parent 84548187f5
commit ed276ac79e
3 changed files with 6 additions and 14 deletions

View File

@@ -25,7 +25,7 @@ allprojects {
appName = 'Mindustry' appName = 'Mindustry'
gdxVersion = '1.9.8' gdxVersion = '1.9.8'
aiVersion = '1.8.1' aiVersion = '1.8.1'
uCoreVersion = '1d4cc71' uCoreVersion = 'd7c7094'
getVersionString = { getVersionString = {
String buildVersion = getBuildVersion() String buildVersion = getBuildVersion()

View File

@@ -1,7 +1,7 @@
#Autogenerated file. Do not modify. #Autogenerated file. Do not modify.
#Fri Mar 30 18:03:34 EDT 2018 #Fri Mar 30 19:18:12 EDT 2018
version=release version=release
androidBuildCode=478 androidBuildCode=482
name=Mindustry name=Mindustry
code=3.5 code=3.5
build=custom build build=custom build

View File

@@ -42,7 +42,6 @@ public class Player extends SyncEntity{
public Mech mech = Mech.standard; public Mech mech = Mech.standard;
public float targetAngle = 0f; public float targetAngle = 0f;
public float stucktime = 0f;
public boolean dashing = false; public boolean dashing = false;
public int clientid = -1; public int clientid = -1;
@@ -54,7 +53,7 @@ public class Player extends SyncEntity{
public Player(){ public Player(){
hitbox.setSize(5); hitbox.setSize(5);
hitboxTile.setSize(5f); hitboxTile.setSize(4f);
maxhealth = 200; maxhealth = 200;
heal(); heal();
@@ -161,15 +160,8 @@ public class Player extends SyncEntity{
Tile tile = world.tileWorld(x, y); Tile tile = world.tileWorld(x, y);
//if player is in solid block //if player is in solid block
if(tile != null && ((tile.floor().liquid && tile.block() == Blocks.air) || tile.solid())){ if(tile != null && ((tile.floor().liquid && tile.block() == Blocks.air) || tile.solid())) {
stucktime += Timers.delta(); damage(health + 1); //die instantly
}else{
stucktime = 0f;
}
if(stucktime > 15f){
damage(health+1); //die instantly
stucktime = 0f;
} }
if(ui.chatfrag.chatOpen()) return; if(ui.chatfrag.chatOpen()) return;