# HG changeset patch # User Mitchell Kember # Date 1354733118 18000 # Node ID d2207f22c5f21016497e100502c6711d9c4f563e # Parent a41d84553ae841c73fd49990cbb60d34629ea70d# Parent 8cc5dc7f7ef9cdc05315091813eec8e78d24f09a Merge diff -r a41d84553ae8 -r d2207f22c5f2 hedgewars/hwengine.pas --- a/hedgewars/hwengine.pas Tue Dec 04 17:57:18 2012 -0500 +++ b/hedgewars/hwengine.pas Wed Dec 05 13:45:18 2012 -0500 @@ -32,7 +32,7 @@ uses SDLh, uMisc, uConsole, uGame, uConsts, uLand, uAmmos, uVisualGears, uGears, uStore, uWorld, uInputHandler , uSound, uScript, uTeams, uStats, uIO, uLocale, uChat, uAI, uAIMisc, uAILandMarks, uLandTexture, uCollisions , SysUtils, uTypes, uVariables, uCommands, uUtils, uCaptions, uDebug, uCommandHandlers, uLandPainted - , uPhysFSLayer + , uPhysFSLayer, uCursor {$IFDEF USE_VIDEO_RECORDING}, uVideoRec {$ENDIF} {$IFDEF USE_TOUCH_INTERFACE}, uTouch {$ENDIF} {$IFDEF ANDROID}, GLUnit{$ENDIF} @@ -217,7 +217,13 @@ ProcessKey(event.key); SDL_MOUSEBUTTONDOWN: - ProcessMouse(event.button, true); + if GameState = gsConfirm then + begin + resetPosition(); + ParseCommand('quit', true); + end + else + ProcessMouse(event.button, true); SDL_MOUSEBUTTONUP: ProcessMouse(event.button, false); diff -r a41d84553ae8 -r d2207f22c5f2 hedgewars/uCursor.pas --- a/hedgewars/uCursor.pas Tue Dec 04 17:57:18 2012 -0500 +++ b/hedgewars/uCursor.pas Wed Dec 05 13:45:18 2012 -0500 @@ -3,6 +3,7 @@ interface procedure init; +procedure resetPosition; procedure updatePosition; implementation @@ -11,6 +12,11 @@ procedure init; begin + resetPosition(); +end; + +procedure resetPosition; +begin SDL_WarpMouse(cScreenWidth div 2, cScreenHeight div 2); end; diff -r a41d84553ae8 -r d2207f22c5f2 hedgewars/uScript.pas --- a/hedgewars/uScript.pas Tue Dec 04 17:57:18 2012 -0500 +++ b/hedgewars/uScript.pas Wed Dec 05 13:45:18 2012 -0500 @@ -690,7 +690,7 @@ else begin gear := GearByUID(lua_tointeger(L, 1)); - if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then + if (gear <> nil) and ((gear^.Kind = gtHedgehog) or (gear^.Kind = gtGrave)) and (gear^.Hedgehog <> nil) then lua_pushinteger(L, gear^.Hedgehog^.BotLevel) else lua_pushnil(L); @@ -723,7 +723,7 @@ else begin gear:= GearByUID(lua_tointeger(L, 1)); - if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then + if (gear <> nil) and ((gear^.Kind = gtHedgehog) or (gear^.Kind = gtGrave)) and (gear^.Hedgehog <> nil) then begin lua_pushinteger(L, gear^.Hedgehog^.Team^.Clan^.ClanIndex) end @@ -805,7 +805,7 @@ else begin gear:= GearByUID(lua_tointeger(L, 1)); - if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then + if (gear <> nil) and ((gear^.Kind = gtHedgehog) or (gear^.Kind = gtGrave)) and (gear^.Hedgehog <> nil) then begin lua_pushstring(L, str2pchar(gear^.Hedgehog^.Team^.TeamName)) end @@ -826,7 +826,7 @@ else begin gear:= GearByUID(lua_tointeger(L, 1)); - if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then + if (gear <> nil) and ((gear^.Kind = gtHedgehog) or (gear^.Kind = gtGrave)) and (gear^.Hedgehog <> nil) then begin lua_pushstring(L, str2pchar(gear^.Hedgehog^.Name)) end @@ -1648,7 +1648,7 @@ LuaError('Lua: Wrong number of parameters passed to GetHogHat!') else begin gear := GearByUID(lua_tointeger(L, 1)); - if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then + if (gear <> nil) and ((gear^.Kind = gtHedgehog) or (gear^.Kind = gtGrave)) and (gear^.Hedgehog <> nil) then lua_pushstring(L, str2pchar(gear^.Hedgehog^.Hat)) else lua_pushnil(L); diff -r a41d84553ae8 -r d2207f22c5f2 share/hedgewars/Data/Locale/en.txt --- a/share/hedgewars/Data/Locale/en.txt Tue Dec 04 17:57:18 2012 -0500 +++ b/share/hedgewars/Data/Locale/en.txt Wed Dec 05 13:45:18 2012 -0500 @@ -64,7 +64,7 @@ 01:02=%1 wins! 01:03=Volume %1% 01:04=Paused -01:05=Really quit (Y/Esc)? +01:05=Really quit? (Y/Esc) (Click to resume) 01:06=Sudden Death! 01:07=%1 remaining 01:08=Fuel