commit
b862baa220
3 changed files with 8 additions and 1 deletions
|
|
@ -5434,7 +5434,7 @@ namespace TShockAPI
|
|||
type = 170;
|
||||
}
|
||||
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();
|
||||
args.Player.SendSuccessMessage("Launched Firework on {0}.", ply.Name);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2699,6 +2699,7 @@ namespace TShockAPI
|
|||
float[] ai = new float[Projectile.maxAI];
|
||||
for (int i = 0; i < Projectile.maxAI; ++i)
|
||||
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;
|
||||
float knockback = bits.HasKnockback ? args.Data.ReadSingle() : 0.0f;
|
||||
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>
|
||||
/// Gets or Sets the Damage flag on the backing field
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue