Skip to content

Commit

Permalink
1.1.2.1 Possible MP fix
Browse files Browse the repository at this point in the history
  • Loading branch information
direwolf420 committed Aug 9, 2021
1 parent fa4e46b commit df118f3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ Credits:

Changelog:

v1.1.2.1: Possibly fix rare bug with mouseovering a pet in multiplayer

v1.1.2: Add a config + setting for disabling the chat autofill feature

v1.1.1.2: Fix rare bug with mouseovering a pet in multiplayer
Expand Down
9 changes: 8 additions & 1 deletion UI/MouseoverUI/MouseoverUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ internal class MouseoverUI : UIState
private string GetPetName()
{
string ret = string.Empty;
Player player;
PRPlayer petPlayer;
string petName;
Rectangle mouse = new Rectangle((int)Main.MouseWorld.X, (int)Main.MouseWorld.Y, 1, 1);
Expand All @@ -25,7 +26,13 @@ private string GetPetName()
Projectile proj = Main.projectile[k];
if (proj.active && proj.owner < Main.maxPlayers)
{
petPlayer = Main.player[proj.owner].GetModPlayer<PRPlayer>();
player = Main.player[proj.owner];
if (!player.active)
{
continue;
}

petPlayer = player.GetModPlayer<PRPlayer>();
if (proj.type == petPlayer.petTypeLight)
{
petName = petPlayer.petNameLight;
Expand Down
2 changes: 1 addition & 1 deletion build.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
author = direwolf420
version = 1.1.2
version = 1.1.2.1
displayName = PetRenamer
homepage = https://forums.terraria.org/index.php?threads/pet-renamer-allows-you-to-name-your-pets.79293/
hideCode = true
Expand Down
2 changes: 2 additions & 0 deletions description.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ For instructions on both, visit the homepage

Changelog:

v1.1.2.1: Possibly fix rare bug with mouseovering a pet in multiplayer

v1.1.2: Add a config + setting for disabling the chat autofill feature

v1.1.1.2: Fix rare bug with mouseovering a pet in multiplayer
Expand Down

0 comments on commit df118f3

Please sign in to comment.