Skip to content

Commit

Permalink
v1.6.4.1
Browse files Browse the repository at this point in the history
* Fixed Chaos Bomb non-wormhole issues.
  • Loading branch information
hamstar committed Jul 3, 2017
1 parent bd37e57 commit 7c83eae
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions Projectiles/ChaosBombProjectile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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; }
Expand All @@ -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 );
Expand Down
4 changes: 2 additions & 2 deletions Wormholes/WormholePortal.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion build.txt
Original file line number Diff line number Diff line change
@@ -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\*
Expand Down

0 comments on commit 7c83eae

Please sign in to comment.