DEADSOFTWARE

put "{$MODE ...}" directive in each source file; removed trailing spaces, and convert...
[d2df-sdl.git] / src / game / g_triggers.pas
index 6748a005098b7874218adc0e15af4fcd3fa5a631..89adae44b57715f36df45b231cb7fc660ceca8da 100644 (file)
@@ -1,3 +1,4 @@
+{$MODE DELPHI}
 unit g_triggers;
 
 interface
@@ -71,7 +72,7 @@ implementation
 uses
   g_player, g_map, Math, g_gfx, g_game, g_textures,
   g_console, g_monsters, g_items, g_phys, g_weapons,
-  WADEDITOR, g_main, SysUtils, e_log, g_language,
+  wadreader, g_main, SysUtils, e_log, g_language,
   g_options, g_net, g_netmsg;
 
 const
@@ -805,7 +806,7 @@ begin
       TRIGGER_PRESS, TRIGGER_ON, TRIGGER_OFF, TRIGGER_ONOFF:
         begin
           PressCount := PressCount + 1;
-          
+
           if PressTime = -1 then
             PressTime := Data.Wait;
 
@@ -1166,7 +1167,7 @@ begin
                 p := g_Player_Get(ActivateUID);
                 if p = nil then
                   Exit;
-                  
+
                 if Data.ResetVel then
                 begin
                   p.GameVelX := 0;
@@ -2330,6 +2331,8 @@ var
   k: Byte;
   p: TPlayer;
 begin
+  Result := nil;
+
   if gTriggers = nil then Exit;
 
   case g_GetUIDType(UID) of
@@ -2345,8 +2348,6 @@ begin
     else k := 0;
   end;
 
-  Result := nil;
-
   for a := 0 to High(gTriggers) do
     if (gTriggers[a].TriggerType <> TRIGGER_NONE) and
        (gTriggers[a].TimeOut = 0) and