DEADSOFTWARE

Game: Use proper syntax of sets for game options instead of raw bitwise operations
[d2df-sdl.git] / src / game / g_triggers.pas
index 8c11a474ff3928ea8466b19897f375993a360b49..3a1bec2ccbf37a95c84c49de76b6da6bc45c10c0 100644 (file)
@@ -2349,14 +2349,14 @@ begin
 
   // Íå ñîçäàâàòü âûõîä, åñëè èãðà áåç âûõîäà
   if (aTrigger.TriggerType = TRIGGER_EXIT) and
-     (not LongBool(gGameSettings.Options and GAME_OPTION_ALLOWEXIT)) then
+     (not (TGameOption.ALLOW_EXIT in gGameSettings.Options)) then
   begin
     aTrigger.TriggerType := TRIGGER_NONE;
   end;
 
   // Åñëè ìîíñòðû çàïðåùåíû, îòìåíÿåì òðèããåð
   if (aTrigger.TriggerType = TRIGGER_SPAWNMONSTER) and
-     (not LongBool(gGameSettings.Options and GAME_OPTION_MONSTERS)) and
+     (not (TGameOption.MONSTERS in gGameSettings.Options)) and
      (gGameSettings.GameType <> GT_SINGLE) then
   begin
     aTrigger.TriggerType := TRIGGER_NONE;