Rail bullet fix

This commit is contained in:
Anuken
2021-02-08 16:29:41 -05:00
parent d8177daada
commit ce2750ba60
2 changed files with 10 additions and 2 deletions

View File

@@ -116,7 +116,15 @@ public class Damage{
* 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){
length = findLaserLength(hitter, length);
collideLine(hitter, team, effect, x, y, angle, length, large, true);
}
/**
* Damages entities in a line.
* 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){
if(laser) length = findLaserLength(hitter, length);
collidedBlocks.clear();
tr.trns(angle, length);

View File

@@ -54,7 +54,7 @@ public class RailBulletType extends BulletType{
super.init(b);
b.fdata = length;
Damage.collideLine(b, b.team, b.type.hitEffect, b.x, b.y, b.rotation(), length, false);
Damage.collideLine(b, b.team, b.type.hitEffect, b.x, b.y, b.rotation(), length, false, false);
float resultLen = b.fdata;
Vec2 nor = Tmp.v1.set(b.vel).nor();