Move the projectile refresh to Bouncer.
Bouncer now has an OnSecondUpdate(). Move projectile created tracking to GetDataHandler from Bouncer.
This commit is contained in:
parent
9209ac0b73
commit
b73088306d
3 changed files with 33 additions and 27 deletions
|
|
@ -2322,6 +2322,18 @@ namespace TShockAPI
|
|||
if (OnNewProjectile(args.Data, ident, pos, vel, knockback, dmg, owner, type, index, args.Player))
|
||||
return true;
|
||||
|
||||
if (projectileCreatesLiquid.ContainsKey(type))
|
||||
{
|
||||
lock (args.Player.RecentlyCreatedProjectiles)
|
||||
{
|
||||
args.Player.RecentlyCreatedProjectiles.Add(new ProjectileStruct()
|
||||
{
|
||||
Index = ident,
|
||||
CreatedAt = DateTime.Now
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue