commit
b862baa220
3 changed files with 8 additions and 1 deletions
|
|
@ -5434,7 +5434,7 @@ namespace TShockAPI
|
||||||
type = 170;
|
type = 170;
|
||||||
}
|
}
|
||||||
var ply = players[0];
|
var ply = players[0];
|
||||||
int p = Projectile.NewProjectile(ply.TPlayer.position.X, ply.TPlayer.position.Y - 64f, 0f, -8f, type, 0, (float)0);
|
int p = Projectile.NewProjectile(Projectile.GetNoneSource(), ply.TPlayer.position.X, ply.TPlayer.position.Y - 64f, 0f, -8f, type, 0, (float)0);
|
||||||
Main.projectile[p].Kill();
|
Main.projectile[p].Kill();
|
||||||
args.Player.SendSuccessMessage("Launched Firework on {0}.", ply.Name);
|
args.Player.SendSuccessMessage("Launched Firework on {0}.", ply.Name);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2699,6 +2699,7 @@ namespace TShockAPI
|
||||||
float[] ai = new float[Projectile.maxAI];
|
float[] ai = new float[Projectile.maxAI];
|
||||||
for (int i = 0; i < Projectile.maxAI; ++i)
|
for (int i = 0; i < Projectile.maxAI; ++i)
|
||||||
ai[i] = !bits.AI[i] ? 0.0f : args.Data.ReadSingle();
|
ai[i] = !bits.AI[i] ? 0.0f : args.Data.ReadSingle();
|
||||||
|
ushort bannerId = bits.HasBannerIdToRespondTo ? args.Data.ReadUInt16() : (ushort)0;
|
||||||
short dmg = bits.HasDamage ? args.Data.ReadInt16() : (short)0;
|
short dmg = bits.HasDamage ? args.Data.ReadInt16() : (short)0;
|
||||||
float knockback = bits.HasKnockback ? args.Data.ReadSingle() : 0.0f;
|
float knockback = bits.HasKnockback ? args.Data.ReadSingle() : 0.0f;
|
||||||
short origDmg = bits.HasOriginalDamage ? args.Data.ReadInt16() : (short)0;
|
short origDmg = bits.HasOriginalDamage ? args.Data.ReadInt16() : (short)0;
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,12 @@ namespace TShockAPI.Models.Projectiles
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool HasBannerIdToRespondTo
|
||||||
|
{
|
||||||
|
get => bitsbyte[3];
|
||||||
|
set => bitsbyte[3] = value;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets the Damage flag on the backing field
|
/// Gets or Sets the Damage flag on the backing field
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue