From 7c83eae9ec2cc5593d99e0ec64df8ca75f1b1289 Mon Sep 17 00:00:00 2001 From: hamstar Date: Mon, 3 Jul 2017 11:39:50 -0700 Subject: [PATCH] v1.6.4.1 * Fixed Chaos Bomb non-wormhole issues. --- Projectiles/ChaosBombProjectile.cs | 18 +++++++++--------- Wormholes/WormholePortal.cs | 4 ++-- build.txt | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Projectiles/ChaosBombProjectile.cs b/Projectiles/ChaosBombProjectile.cs index 6d92e08..cd8e156 100644 --- a/Projectiles/ChaosBombProjectile.cs +++ b/Projectiles/ChaosBombProjectile.cs @@ -11,6 +11,9 @@ namespace Wormholes.Projectiles { public class ChaosBombProjectile : ModProjectile { public override void SetStaticDefaults() { this.DisplayName.SetDefault( "Chaos Bomb" ); + + this.drawOriginOffsetX = 0; + this.drawOriginOffsetY = -8; } public override void SetDefaults() { @@ -147,7 +150,7 @@ public void ScatterTiles( int tile_x, int tile_y, int radius, int scatter_radius fro_tile = Main.tile[i, j]; if( fro_tile == null ) { continue; } - if( TileHelpers.IsSolid( fro_tile, true, true ) ) { continue; } + if( !TileHelpers.IsSolid( fro_tile, true, true ) ) { continue; } if( TileHelpers.IsWire( fro_tile ) ) { continue; } if( fro_tile.lava() ) { continue; } if( TileHelpers.IsNotBombable(i, j) ) { continue; } @@ -164,17 +167,14 @@ public void ScatterTiles( int tile_x, int tile_y, int radius, int scatter_radius } catch( Exception _ ) { style = 0; } - + + int old_type = fro_tile.type; WorldGen.KillTile( i, j, false, false, true ); - WorldGen.PlaceTile( to_x, to_y, fro_tile.type, true, true, this.projectile.owner, style ); + WorldGen.PlaceTile( to_x, to_y, old_type, true, true, this.projectile.owner, style ); if( Main.netMode != 0 ) { - if( !Main.tile[i, j].active() ) { - NetMessage.SendData( MessageID.TileChange, -1, -1, null, 0, (float)i, (float)j, 0f, 0, 0, 0 ); - } - if( !Main.tile[to_x, to_y].active() ) { - NetMessage.SendData( MessageID.TileChange, -1, -1, null, 0, (float)to_x, (float)to_y, 0f, 0, 0, 0 ); - } + NetMessage.SendData( MessageID.TileChange, -1, -1, null, 0, (float)i, (float)j, 0f, 0, 0, 0 ); + NetMessage.SendData( MessageID.TileChange, -1, -1, null, 0, (float)to_x, (float)to_y, 0f, 0, 0, 0 ); } Dust.NewDust( new Vector2(i*16, j*16), 0, 0, 15, 0, 0, 150, Color.Cyan, 1f ); diff --git a/Wormholes/WormholePortal.cs b/Wormholes/WormholePortal.cs index ee93356..3a4d031 100644 --- a/Wormholes/WormholePortal.cs +++ b/Wormholes/WormholePortal.cs @@ -1,11 +1,11 @@ -using HamstarHelpers.MiscHelpers; -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; using Wormholes.Utils; + namespace Wormholes { public class WormholePortal { private static Texture2D Tex; diff --git a/build.txt b/build.txt index 7739352..be1a910 100644 --- a/build.txt +++ b/build.txt @@ -1,5 +1,5 @@ author = hamstar -version = 1.6.4 +version = 1.6.4.1 displayName = Wormholes modReferences = HamstarHelpers buildIgnore = *.csproj, *.user, obj\*, bin\*, .vs\*