From e24adb9ea12d68f743b5936d6b04899dcef83dfc Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 26 Feb 2019 13:38:03 +0000 Subject: [PATCH] mantis 6569: restore full health on invulnerable set to true; combat module is outdated and needs work. By then the proposal on this mantis should be reviewed --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index cfb1be4f98..f3e217906c 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -523,7 +523,12 @@ namespace OpenSim.Region.Framework.Scenes public bool Invulnerable { - set { m_invulnerable = value; } + set + { + m_invulnerable = value; + if(value && Health != 100.0f) + Health = 100.0f; + } get { return m_invulnerable; } }