Sublimate collision fix
This commit is contained in:
@@ -4382,6 +4382,7 @@ public class Blocks{
|
|||||||
targetInterval = 5f;
|
targetInterval = 5f;
|
||||||
newTargetInterval = 30f;
|
newTargetInterval = 30f;
|
||||||
targetUnderBlocks = false;
|
targetUnderBlocks = false;
|
||||||
|
shootY = 7.5f;
|
||||||
|
|
||||||
float r = range = 130f;
|
float r = range = 130f;
|
||||||
|
|
||||||
|
|||||||
@@ -222,38 +222,38 @@ public class Damage{
|
|||||||
public static float collideLaser(Bullet b, float length, boolean large, boolean laser, int pierceCap){
|
public static float collideLaser(Bullet b, float length, boolean large, boolean laser, int pierceCap){
|
||||||
float resultLength = findPierceLength(b, pierceCap, laser, length);
|
float resultLength = findPierceLength(b, pierceCap, laser, length);
|
||||||
|
|
||||||
collideLine(b, b.team, b.type.hitEffect, b.x, b.y, b.rotation(), resultLength, large, laser, pierceCap);
|
collideLine(b, b.team, b.x, b.y, b.rotation(), resultLength, large, laser, pierceCap);
|
||||||
|
|
||||||
b.fdata = resultLength;
|
b.fdata = resultLength;
|
||||||
|
|
||||||
return resultLength;
|
return resultLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void collideLine(Bullet hitter, Team team, Effect effect, float x, float y, float angle, float length){
|
public static void collideLine(Bullet hitter, Team team, float x, float y, float angle, float length){
|
||||||
collideLine(hitter, team, effect, x, y, angle, length, false);
|
collideLine(hitter, team, x, y, angle, length, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Damages entities in a line.
|
* Damages entities in a line.
|
||||||
* Only enemies of the specified team are damaged.
|
* Only enemies of the specified team are damaged.
|
||||||
*/
|
*/
|
||||||
public static void collideLine(Bullet hitter, Team team, Effect effect, float x, float y, float angle, float length, boolean large){
|
public static void collideLine(Bullet hitter, Team team, float x, float y, float angle, float length, boolean large){
|
||||||
collideLine(hitter, team, effect, x, y, angle, length, large, true);
|
collideLine(hitter, team, x, y, angle, length, large, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Damages entities in a line.
|
* Damages entities in a line.
|
||||||
* Only enemies of the specified team are damaged.
|
* Only enemies of the specified team are damaged.
|
||||||
*/
|
*/
|
||||||
public static void collideLine(Bullet hitter, Team team, Effect effect, float x, float y, float angle, float length, boolean large, boolean laser){
|
public static void collideLine(Bullet hitter, Team team, float x, float y, float angle, float length, boolean large, boolean laser){
|
||||||
collideLine(hitter, team, effect, x, y, angle, length, large, laser, -1);
|
collideLine(hitter, team, x, y, angle, length, large, laser, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Damages entities in a line.
|
* Damages entities in a line.
|
||||||
* Only enemies of the specified team are damaged.
|
* Only enemies of the specified team are damaged.
|
||||||
*/
|
*/
|
||||||
public static void collideLine(Bullet hitter, Team team, Effect effect, float x, float y, float angle, float length, boolean large, boolean laser, int pierceCap){
|
public static void collideLine(Bullet hitter, Team team, float x, float y, float angle, float length, boolean large, boolean laser, int pierceCap){
|
||||||
length = findLength(hitter, length, laser, pierceCap);
|
length = findLength(hitter, length, laser, pierceCap);
|
||||||
hitter.fdata = length;
|
hitter.fdata = length;
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ public class ContinuousBulletType extends BulletType{
|
|||||||
if(timescaleDamage && b.owner instanceof Building build){
|
if(timescaleDamage && b.owner instanceof Building build){
|
||||||
b.damage *= build.timeScale();
|
b.damage *= build.timeScale();
|
||||||
}
|
}
|
||||||
Damage.collideLine(b, b.team, hitEffect, b.x, b.y, b.rotation(), currentLength(b), largeHit, laserAbsorb, pierceCap);
|
Damage.collideLine(b, b.team, b.x, b.y, b.rotation(), currentLength(b), largeHit, laserAbsorb, pierceCap);
|
||||||
b.damage = damage;
|
b.damage = damage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ public class RailBulletType extends BulletType{
|
|||||||
super.init(b);
|
super.init(b);
|
||||||
|
|
||||||
b.fdata = length;
|
b.fdata = length;
|
||||||
Damage.collideLine(b, b.team, b.type.hitEffect, b.x, b.y, b.rotation(), length, false, false, pierceCap);
|
Damage.collideLine(b, b.team, b.x, b.y, b.rotation(), length, false, false, pierceCap);
|
||||||
float resultLen = b.fdata;
|
float resultLen = b.fdata;
|
||||||
|
|
||||||
Vec2 nor = Tmp.v1.trns(b.rotation(), 1f).nor();
|
Vec2 nor = Tmp.v1.trns(b.rotation(), 1f).nor();
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ public class MapIO{
|
|||||||
for(Tile tile : tiles){
|
for(Tile tile : tiles){
|
||||||
//while synthetic blocks are possible, most of their data is lost, so in order to avoid questions like
|
//while synthetic blocks are possible, most of their data is lost, so in order to avoid questions like
|
||||||
//"why is there air under my drill" and "why are all my conveyors facing right", they are disabled
|
//"why is there air under my drill" and "why are all my conveyors facing right", they are disabled
|
||||||
int color = tile.block().hasColor && !tile.block().synthetic() ? tile.block().mapColor.rgba() : tile.floor().mapColor.rgba();
|
int color = tile.block().hasColor && !tile.block().hasBuilding() ? tile.block().mapColor.rgba() : tile.floor().mapColor.rgba();
|
||||||
pix.set(tile.x, tiles.height - 1 - tile.y, color);
|
pix.set(tile.x, tiles.height - 1 - tile.y, color);
|
||||||
}
|
}
|
||||||
return pix;
|
return pix;
|
||||||
@@ -183,6 +183,9 @@ public class MapIO{
|
|||||||
int color = pixmap.get(tile.x, pixmap.height - 1 - tile.y);
|
int color = pixmap.get(tile.x, pixmap.height - 1 - tile.y);
|
||||||
Block block = ColorMapper.get(color);
|
Block block = ColorMapper.get(color);
|
||||||
|
|
||||||
|
//ignore buildings; reading images is only intended for environment tiles
|
||||||
|
if(block.hasBuilding()) continue;
|
||||||
|
|
||||||
if(block.isOverlay()){
|
if(block.isOverlay()){
|
||||||
tile.setOverlay(block.asFloor());
|
tile.setOverlay(block.asFloor());
|
||||||
}else if(block.isFloor()){
|
}else if(block.isFloor()){
|
||||||
@@ -194,7 +197,6 @@ public class MapIO{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//guess at floors by grabbing a random adjacent floor
|
|
||||||
for(Tile tile : tiles){
|
for(Tile tile : tiles){
|
||||||
//default to stone floor
|
//default to stone floor
|
||||||
if(tile.floor() == Blocks.air){
|
if(tile.floor() == Blocks.air){
|
||||||
|
|||||||
+1
-1
@@ -26,4 +26,4 @@ org.gradle.caching=true
|
|||||||
org.gradle.internal.http.socketTimeout=100000
|
org.gradle.internal.http.socketTimeout=100000
|
||||||
org.gradle.internal.http.connectionTimeout=100000
|
org.gradle.internal.http.connectionTimeout=100000
|
||||||
android.enableR8.fullMode=false
|
android.enableR8.fullMode=false
|
||||||
archash=8abaedb419
|
archash=79c4cf021d
|
||||||
|
|||||||
Reference in New Issue
Block a user