]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Prevent clients from setting their species to whatever they want (#25535)
authorDebug <49997488+DebugOk@users.noreply.github.com>
Sun, 25 Feb 2024 03:00:28 +0000 (04:00 +0100)
committerGitHub <noreply@github.com>
Sun, 25 Feb 2024 03:00:28 +0000 (22:00 -0500)
Prevent epic hack

Content.Shared/Preferences/HumanoidCharacterProfile.cs

index 22c37dcfe9ed7db66ced5979eb83d0eaf4f2c312..92c5b083dcb265825b61d22d487556c2cf18cde9 100644 (file)
@@ -375,7 +375,7 @@ namespace Content.Shared.Preferences
         {
             var prototypeManager = IoCManager.Resolve<IPrototypeManager>();
 
-            if (!prototypeManager.TryIndex<SpeciesPrototype>(Species, out var speciesPrototype))
+            if (!prototypeManager.TryIndex<SpeciesPrototype>(Species, out var speciesPrototype) || speciesPrototype.RoundStart == false)
             {
                 Species = SharedHumanoidAppearanceSystem.DefaultSpecies;
                 speciesPrototype = prototypeManager.Index<SpeciesPrototype>(Species);