Skip to content

Commit a7b1a95

Browse files
committed
Fix 3D bullets crashing with ESR everything gun
I guess the everything gun kinda just farts now.
1 parent 59dd182 commit a7b1a95

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

mod.hjson

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
"author": "MEEP of Faith (And a bunch of contributors. Load the game with Meepscillanious Concepts enabled to view them!)",
88
"java": true,
99
"main": "progressed.ProgMats",
10-
"repo": MEEPofFaith/prog-mats-java
10+
"repo": "MEEPofFaith/prog-mats-java"
1111
}

src/progressed/entities/bullet/pseudo3d/ArcBulletType.java

+7-2
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,9 @@ public void init(Bullet b){
8585
ArcBulletData a = (ArcBulletData)b.data;
8686
a.updateLifetime(b);
8787
arcBulletDataInit(b);
88-
}else{
89-
b.remove(); //Invalid data
88+
}else{ //Invalid data, remove
89+
b.data = new ArcBulletData(); //Prevent crash
90+
b.remove();
9091
}
9192

9293
super.init(b);
@@ -439,6 +440,10 @@ public ArcBulletData(float z, float zVel){
439440
this(z, zVel, 1f);
440441
}
441442

443+
public ArcBulletData(){
444+
this(0, 0);
445+
}
446+
442447
public void backMove(Bullet b){
443448
b.vel.sub(xAccel * Time.delta, yAccel * Time.delta);
444449
z -= zVel * Time.delta;

0 commit comments

Comments
 (0)