From 0e833005481d6abd263a468d14e4637e58be3d6c Mon Sep 17 00:00:00 2001 From: OSP <76648940+osp54@users.noreply.github.com> Date: Fri, 28 Jul 2023 23:42:28 +0300 Subject: [PATCH 1/2] ToxoFlame attack server (#8858) --- servers_v7.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers_v7.json b/servers_v7.json index 1098d5b24d..7327158475 100644 --- a/servers_v7.json +++ b/servers_v7.json @@ -190,7 +190,7 @@ }, { "name": "ToxoFlame", - "address": ["193.233.133.223", "193.233.133.223:6568"] + "address": ["193.233.133.223", "193.233.133.223:6568", "193.233.133.223:6569"] }, { "name": "Meow Island", From 0d8c07d00769f694fcb8f8b4ab9d6b893884ce2b Mon Sep 17 00:00:00 2001 From: MEEPofFaith <54301439+MEEPofFaith@users.noreply.github.com> Date: Fri, 28 Jul 2023 20:55:20 -0700 Subject: [PATCH 2/2] Bullet despawn unit shenanigans (#8859) * Proper despawn unit direction * Despawn unit chance * Merge if statements --- core/src/mindustry/entities/bullet/BulletType.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/entities/bullet/BulletType.java b/core/src/mindustry/entities/bullet/BulletType.java index 2e91d5f421..300e6f9209 100644 --- a/core/src/mindustry/entities/bullet/BulletType.java +++ b/core/src/mindustry/entities/bullet/BulletType.java @@ -194,10 +194,14 @@ public class BulletType extends Content implements Cloneable{ public @Nullable UnitType spawnUnit; /** Unit spawned when this bullet hits something or despawns due to it hitting the end of its lifetime. */ public @Nullable UnitType despawnUnit; + /** The chance for despawn units to spawn. */ + public float despawnUnitChance = 1; /** Amount of units spawned when this bullet despawns. */ public int despawnUnitCount = 1; /** Random offset distance from the original bullet despawn/hit coordinate. */ public float despawnUnitRadius = 0.1f; + /** If true, units spawned when this bullet despawns face away from the bullet instead of the same direction as the bullet. */ + public boolean faceOutwards = false; /** Extra visual parts for this bullet. */ public Seq parts = new Seq<>(); @@ -489,9 +493,11 @@ public class BulletType extends Content implements Cloneable{ } public void createUnits(Bullet b, float x, float y){ - if(despawnUnit != null){ + if(despawnUnit != null && Mathf.chance(despawnUnitChance)){ for(int i = 0; i < despawnUnitCount; i++){ - despawnUnit.spawn(b.team, x + Mathf.range(despawnUnitRadius), y + Mathf.range(despawnUnitRadius)); + Tmp.v1.rnd(Mathf.random(despawnUnitRadius)); + var u = despawnUnit.spawn(b.team, x + Tmp.v1.x, y + Tmp.v1.y); + u.rotation = faceOutwards ? Tmp.v1.angle() : b.rotation(); } } }