X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_triggers.pas;h=97c135b207d454b9bf6d87af002df3286fbd6f23;hb=5b3da92681d54bd987d55c4a2649da65ebeb70ba;hp=8e8cf44e9a8bbb282b541828fc6ee83517e5bad4;hpb=844441154d1220d6c83f75043300c2851ec87109;p=d2df-sdl.git diff --git a/src/game/g_triggers.pas b/src/game/g_triggers.pas index 8e8cf44..97c135b 100644 --- a/src/game/g_triggers.pas +++ b/src/game/g_triggers.pas @@ -1,3 +1,19 @@ +(* Copyright (C) DooM 2D:Forever Developers + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + *) +{$MODE DELPHI} unit g_triggers; interface @@ -1992,12 +2008,12 @@ begin // Åùå íåò òàêîãî çâóêà: if not g_Sound_Exists(Trigger.Data.SoundName) then begin - g_ProcessResourceStr(Trigger.Data.SoundName, @fn, nil, nil); + fn := g_ExtractWadName(Trigger.Data.SoundName); if fn = '' then begin // Çâóê â ôàéëå ñ êàðòîé - g_ProcessResourceStr(gMapInfo.Map, @mapw, nil, nil); - fn := mapw + Trigger.Data.SoundName; + mapw := g_ExtractWadName(gMapInfo.Map); + fn := mapw+':'+g_ExtractFilePathName(Trigger.Data.SoundName); end else // Çâóê â îòäåëüíîì ôàéëå fn := GameDir + '/wads/' + Trigger.Data.SoundName; @@ -2025,12 +2041,12 @@ begin // Åùå íåò òàêîé ìóçûêè: if not g_Sound_Exists(Trigger.Data.MusicName) then begin - g_ProcessResourceStr(Trigger.Data.MusicName, @fn, nil, nil); + fn := g_ExtractWadName(Trigger.Data.MusicName); if fn = '' then begin // Ìóçûêà â ôàéëå ñ êàðòîé - g_ProcessResourceStr(gMapInfo.Map, @mapw, nil, nil); - fn := mapw + Trigger.Data.MusicName; + mapw := g_ExtractWadName(gMapInfo.Map); + fn := mapw+':'+g_ExtractFilePathName(Trigger.Data.MusicName); end else // Ìóçûêà â ôàéëå ñ êàðòîé fn := GameDir+'/wads/'+Trigger.Data.MusicName;