summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 48fa53d)
raw | patch | inline | side by side (parent: 48fa53d)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Thu, 7 Sep 2017 00:54:30 +0000 (03:54 +0300) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Thu, 7 Sep 2017 00:55:22 +0000 (03:55 +0300) |
src/game/g_game.pas | patch | blob | history | |
src/game/g_menu.pas | patch | blob | history | |
src/game/g_netmsg.pas | patch | blob | history |
diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index 7f77a41a3194d89279f537bdd2d656cc92030b85..5f56a7439ce5199130240b02ffa0e188c3f2e7ee 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
g_Player_ResetTeams();
- if Pos(':\', Map) > 0 then
+ if isWadPath(Map) then
begin
NewWAD := g_ExtractWadName(Map);
ResName := g_ExtractFileName(Map);
time: Integer;
}
begin
- a := Pos('.wad:\', gMapToDelete);
+ a := Pos('.wad:\', toLowerCase1251(gMapToDelete));
+ if (a = 0) then a := Pos('.wad:/', toLowerCase1251(gMapToDelete));
if a = 0 then
Exit;
if gNextMap = '' then
gNextMap := g_Game_GetNextMap();
// Ïðîâåðÿåì, íå çàäàí ëè WAD ôàéë ðåñóðñíîé ñòðîêîé
- if Pos(':\', gNextMap) = 0 then
+ if not isWadPath(gNextMap) then
s := gGameSettings.WAD + ':\' + gNextMap
else
s := gNextMap;
s := Find_Param_Value(pars, '-exec');
if s <> '' then
begin
- if Pos(':\', s) = 0 then
+ if not isWadPath(s) then
s := GameDir + '/' + s;
{$I-}
diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas
index a84251949474de22ad1a163b41c767f5eb2d52e0..aca1dbf59939c6b399c083399728e2396f1f7daf 100644 (file)
--- a/src/game/g_menu.pas
+++ b/src/game/g_menu.pas
e_log, SysUtils, CONFIG, g_playermodel, DateUtils,
MAPDEF, wadreader, Math, g_saveload,
e_texture, GL, GLExt, g_language,
- g_net, g_netmsg, g_netmaster, g_items, e_input;
+ g_net, g_netmsg, g_netmaster, g_items, e_input,
+ utils;
type TYNCallback = procedure (yes:Boolean);
Map := TGUILabel(GetControl('lbMap')).Text;
if Map = '' then
Exit;
- if Pos(':\', Map) = 0 then
+ if not isWadPath(Map) then
Exit;
GameMode := TGUISwitch(GetControl('swGameMode')).ItemIndex+1;
Map := TGUILabel(GetControl('lbMap')).Text;
if Map = '' then
Exit;
- if Pos(':\', Map) = 0 then
+ if not isWadPath(Map) then
Exit;
GameMode := TGUISwitch(GetControl('swGameMode')).ItemIndex+1;
diff --git a/src/game/g_netmsg.pas b/src/game/g_netmsg.pas
index 88764ed9a2bd913b481a581d55c0d65450d6c3f8..822ae9bec9edd7f83cd947bcd02f5865e786773e 100644 (file)
--- a/src/game/g_netmsg.pas
+++ b/src/game/g_netmsg.pas
NetOut.Write(EvStr);
NetOut.Write(Byte(gLastMap));
NetOut.Write(gTime);
- if (EvType = NET_EV_MAPSTART) and (Pos(':\', EvStr) > 0) then
+ if (EvType = NET_EV_MAPSTART) and isWadPath(EvStr) then
begin
NetOut.Write(Byte(1));
NetOut.Write(gWADHash);
gWADHash := EvHash;
if not g_Game_StartMap(EvStr, True) then
begin
- if Pos(':\', EvStr) = 0 then
+ if not isWadPath(EvStr) then
g_FatalError(Format(_lc[I_GAME_ERROR_MAP_LOAD], [gGameSettings.WAD + ':\' + EvStr]))
else
g_FatalError(Format(_lc[I_GAME_ERROR_MAP_LOAD], [EvStr]));