Pryaxis / TShock

☕️⚡️TShock provides Terraria servers with server-side characters, anti-cheat, and community management tools.
GNU General Public License v3.0
2.41k stars 377 forks source link

Use same TSPlayer.Active check #2939

Open sgkoishi opened 1 year ago

sgkoishi commented 1 year ago

Currently some use Player.active while some use TSPlayer.Active. They usually behave the same but this inconsistency causes problems when trying to do something related - e.g. hide a player. This PR unify them to use the same TSPlayer.Active.

AgaSpace commented 1 year ago

If some plugin will assign a value to TSPlayer.Active, such as the same Ghost, then we will get a player who can ignore most anti-cheats.

sgkoishi commented 1 year ago

If some plugin will assign a value to TSPlayer.Active, such as the same Ghost, then we will get a player who can ignore most anti-cheats.

Players are always active without plugin. If a player is not TSPlayer.Active or Player.active, it makes sense to reject them - which is the current behaviour (and the PR is not breaking it).