7 BaseGameMode gamemode = BaseGameMode.Cast(item);
11 SCR_GameModeHealthSettings gameModeHealthSettings = SCR_GameModeHealthSettings.Cast(gamemode.FindComponent(SCR_GameModeHealthSettings));
12 if (!gameModeHealthSettings)
18 override void WriteVariable(Managed item,
SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager,
int playerID)
23 BaseGameMode gamemode = BaseGameMode.Cast(item);
27 SCR_GameModeHealthSettings gameModeHealthSettings = SCR_GameModeHealthSettings.Cast(gamemode.FindComponent(SCR_GameModeHealthSettings));
28 if (!gameModeHealthSettings)
31 bool value = var.GetBool();
34 if (item && value != gameModeHealthSettings.IsUnconsciousnessPermitted())
37 SCR_NotificationsComponent.SendToEveryone(
ENotification.EDITOR_ATTRIBUTES_UNCONSCIOUSNESS_ENABLED, playerID);
39 SCR_NotificationsComponent.SendToEveryone(
ENotification.EDITOR_ATTRIBUTES_UNCONSCIOUSNESS_DISABLED, playerID);
42 gameModeHealthSettings.SetUnconsciousnessPermitted(value);
52 foreach (SCR_ChimeraCharacter character: characters)
55 if (!characterDamageManager)
58 CharacterControllerComponent controller = CharacterControllerComponent.Cast(character.GetCharacterController());
66 if (!characterDamageManager.IsDamageHandlingEnabled())
70 characterDamageManager.Kill(
Instigator.CreateInstigator(
null));