Skip to content

Commit dbeb964

Browse files
committed
Patch AI_067_FreakingPirates_HitIntention to add owner check
1 parent 1a128b8 commit dbeb964

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
Copyright (C) 2020 DeathCradle
3+
4+
This file is part of Open Terraria API v3 (OTAPI)
5+
6+
This program is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License as published by
8+
the Free Software Foundation, either version 3 of the License, or
9+
(at your option) any later version.
10+
11+
This program is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU General Public License for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
*/
19+
#pragma warning disable CS0108 // Member hides inherited member; missing new keyword
20+
#pragma warning disable CS0626 // Method, operator, or accessor is marked external and has no attributes on it
21+
22+
#if TerrariaServer_1450_OrAbove || Terraria__1450_OrAbove || tModLoader_1450_OrAbove
23+
using Microsoft.Xna.Framework;
24+
using Terraria;
25+
26+
namespace Terraria
27+
{
28+
partial class patch_Projectile : Terraria.Projectile
29+
{
30+
private extern void orig_AI_067_FreakingPirates_HitIntention(Vector2 idealPosition);
31+
32+
private void AI_067_FreakingPirates_HitIntention(Vector2 idealPosition)
33+
{
34+
if (this.owner != Main.myPlayer) return;
35+
orig_AI_067_FreakingPirates_HitIntention(idealPosition);
36+
}
37+
}
38+
}
39+
#endif

0 commit comments

Comments
 (0)