Edited comments

This commit is contained in:
AquaSG authored and Cameron Ewell committed 2023-04-03 22:28:17 -04:00
1 parent 6431166d8a
commit bcb683bdc3
2 files changed
+4 -6

No files matched your search

+4 -4
View File
@@ -59,7 +59,7 @@ namespace CalamityMod.TileEntities
{
int indexToSet = NPCTargetIndex;
// If a player is already targeted, make sure they still exist and aren't dead.
// If a npc is already targeted, make sure they still exist and aren't dead.
if (indexToSet != -1)
{
NPC npc = Main.npc[NPCTargetIndex];
@@ -69,7 +69,7 @@ namespace CalamityMod.TileEntities
indexToSet = -1;
else
{
// If the existing target player is close enough, return their position. Otherwise unmark them as a target.
// If the existing target npc is close enough, return their position. Otherwise unmark them as a target.
Vector2 npcPos = npc.Center;
float distSQ = Vector2.DistanceSquared(targetingCenter, npcPos);
if (distSQ <= MaxRange * MaxRange)
@@ -79,7 +79,7 @@ namespace CalamityMod.TileEntities
}
}
// No valid target currently exists. Loop through players (efficiently!) to look for the closest new target.
// No valid target currently exists. Loop through npcs (efficiently!) to look for the closest new target.
Vector2 ret = InvalidTarget;
float distSQToBeat = MaxRange * MaxRange;
@@ -98,7 +98,7 @@ namespace CalamityMod.TileEntities
}
}
// Set PlayerTargetIndex now that we're sure what we're targeting. This triggers a netcode sync if the value is different.
// Set NPCTargetIndex now that we're sure what we're targeting. This triggers a netcode sync if the value is different.
NPCTargetIndex = indexToSet;
return ret;
}
-2
View File
@@ -59,8 +59,6 @@ namespace CalamityMod.Tiles.PlayerTurrets
public override void KillMultiTile(int i, int j, int frameX, int frameY)
{
// TODO -- Turrets have no items and can't be picked up and placed by players.
// Instead, drop some raw Draedon materials.
Item.NewItem(new EntitySource_TileBreak(i, j), i * 16, j * 16, 32, 32, ModContent.ItemType<WaterTurret>(), 1);
Tile t = Main.tile[i, j];