diff --git a/Projectiles/ChaosBombProjectile.cs b/Projectiles/ChaosBombProjectile.cs index cd8e156..e4b0dae 100644 --- a/Projectiles/ChaosBombProjectile.cs +++ b/Projectiles/ChaosBombProjectile.cs @@ -62,7 +62,7 @@ public override void AI() { if( link.DetectCollision(rect) != 0 ) { proj.Kill(); if( rand == 0 ) { - link.ApplyChaosHit(); + link.ApplyChaosHit( mymod ); return; } } @@ -72,10 +72,8 @@ public override void AI() { if( modplayer.MyPortal != null && !modplayer.MyPortal.IsClosed ) { if( modplayer.MyPortal.DetectCollision(rect) != 0 ) { proj.Kill(); - if( rand == 0 ) { - modplayer.MyPortal.Close(); // Town portals only close; never re-randomize (for the current version) - return; - } + modplayer.MyPortal.Close(); // Town portals only close; never re-randomize (for the current version) + return; } } } diff --git a/Wormholes/WormholeLink.cs b/Wormholes/WormholeLink.cs index 9ffdc03..c90815c 100644 --- a/Wormholes/WormholeLink.cs +++ b/Wormholes/WormholeLink.cs @@ -353,8 +353,13 @@ public int DetectCollision( Rectangle rect ) { return on_portal; } - public void ApplyChaosHit() { - WormholesNetProtocol.SendWormholeRerollRequestViaClient( this.MyMod, this.ID ); + public void ApplyChaosHit( WormholesMod mymod ) { + if( Main.netMode == 0 ) { // Single + var mngr = mymod.GetModWorld().Wormholes; + mngr.Reroll( this ); + } else { // Non-single + WormholesNetProtocol.SendWormholeRerollRequestViaClient( this.MyMod, this.ID ); + } } //////////////// diff --git a/build.txt b/build.txt index 1c28979..0a2b0c0 100644 --- a/build.txt +++ b/build.txt @@ -1,5 +1,5 @@ author = hamstar -version = 1.6.4.2 +version = 1.6.4.3 displayName = Wormholes modReferences = HamstarHelpers buildIgnore = *.csproj, *.user, obj\*, bin\*, .vs\*