added filter to ingnore custom projectiles made by the client
This commit is contained in:
parent
04cdd56d13
commit
ec116a6b4c
2 changed files with 13 additions and 1 deletions
|
|
@ -525,6 +525,18 @@ namespace TShockAPI
|
||||||
else
|
else
|
||||||
return TShock.Utils.HandleExplosivesUser(args.Player, TShock.Config.ExplosiveAbuseReason);
|
return TShock.Utils.HandleExplosivesUser(args.Player, TShock.Config.ExplosiveAbuseReason);
|
||||||
}
|
}
|
||||||
|
if (args.Player.Index != owner)//ignores projectiles whose senders aren't the same as their owners
|
||||||
|
{
|
||||||
|
TShock.Players[args.Player.Index].SendData(PacketTypes.ProjectileNew, "", ident);//update projectile on senders end so he knows it didnt get created
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
Projectile proj = new Projectile();
|
||||||
|
proj.SetDefaults(type);
|
||||||
|
if (proj.hostile)//ignores all hostile projectiles from the client they shouldn't be sending them anyways
|
||||||
|
{
|
||||||
|
TShock.Players[args.Player.Index].SendData(PacketTypes.ProjectileNew, "", ident);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -184,7 +184,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
<VisualStudio>
|
<VisualStudio>
|
||||||
<UserProperties BuildVersion_IncrementBeforeBuild="False" BuildVersion_StartDate="2011/6/17" BuildVersion_BuildVersioningStyle="None.None.None.MonthAndDayStamp" BuildVersion_BuildAction="Both" BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" />
|
<UserProperties BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" BuildVersion_BuildAction="Both" BuildVersion_BuildVersioningStyle="None.None.None.MonthAndDayStamp" BuildVersion_StartDate="2011/6/17" BuildVersion_IncrementBeforeBuild="False" />
|
||||||
</VisualStudio>
|
</VisualStudio>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue