Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into deathmatch-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jlillis committed Sep 1, 2024
2 parents 940e5c1 + e558c84 commit 86882e4
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 31 deletions.
3 changes: 0 additions & 3 deletions [editor]/edf/properties_client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,6 @@ propertySetters = {
end,
breakable = function(element, breakable)
return setObjectBreakable(element, breakable == "true")
end,
collisions = function(element, state)
return setElementCollisionsEnabled(element, state == "true")
end
},
ped = {
Expand Down
12 changes: 10 additions & 2 deletions [editor]/editor_gui/client/test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function quickTest()
if tutorialVars.blockQuickTest then return end
if lastTestGamemode == "<None>" then lastTestGamemode = false end
editor_main.dropElement()
triggerServerEvent ( "testResource",localPlayer, text )
triggerServerEvent ( "testResource",localPlayer, lastTestGamemode )
unbindControl ( "toggle_test", "down", quickTest )
if tutorialVars.test then tutorialNext() end
end
Expand Down Expand Up @@ -142,7 +142,7 @@ function disableColPatchInTesting()

-- Disable
guiCheckBoxSetSelected(dialog.enableColPatch.GUI.checkbox, false)
confirmSettings()
doActions()
end

function enableColPatchAfterTesting()
Expand Down Expand Up @@ -251,3 +251,11 @@ end
function noDamageInBasicTest()
cancelEvent()
end

addEventHandler ( "saveloadtest_return", root,
function ( command )
if command == "new" or command == "open" then
lastTestGamemode = nil
end
end
)
13 changes: 12 additions & 1 deletion [editor]/editor_main/server/saveloadtest_server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ addEventHandler("newResource", root,

actionList = {}
currentActionIndex = 0

lastTestGamemodeName = nil
end
)

Expand Down Expand Up @@ -154,6 +156,8 @@ function handleOpenResource()
actionList = {}
currentActionIndex = 0

lastTestGamemodeName = nil

triggerEvent("onMapOpened", mapContainer, openingResource)
flattenTreeRuns = 0
triggerClientEvent(root, "saveLoadProgressBar", root, true)
Expand Down Expand Up @@ -753,7 +757,11 @@ function beginTest(client,gamemodeName)
resetMapInfo()
setupMapSettings()
disablePickups(false)
gamemodeName = gamemodeName or lastTestGamemodeName

if gamemodeName == nil then
gamemodeName = lastTestGamemodeName
end

if ( gamemodeName ) then
lastTestGamemodeName = gamemodeName
set ( "*freeroam.spawnmapondeath", "false" )
Expand Down Expand Up @@ -785,6 +793,9 @@ function beginTest(client,gamemodeName)
end
g_in_test = "gamemode"
else
if gamemodeName == false then
lastTestGamemodeName = gamemodeName
end
if getResourceState(freeroamRes) ~= "running" and not startResource ( freeroamRes, true ) then
restoreSettings()
triggerClientEvent ( root, "saveloadtest_return", client, "test", false, false,
Expand Down
26 changes: 2 additions & 24 deletions [gameplay]/freeroam/fr_client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ if not (g_PlayerData) then
g_PlayerData = {}
end

-- Variables for time freeze
local freezeTimeHour = false
local freezeTimeMinute = false
local freezeTimeWeather = false

-- Settings are stored in meta.xml
function freeroamSettings(settings)
if settings then
Expand Down Expand Up @@ -1853,7 +1848,6 @@ function applyTime()
local hours, minutes = getControlNumbers(wndTime, { 'hours', 'minutes' })
setTime(hours, minutes)
closeWindow(wndTime)
freezeTimeHour, freezeTimeMinute = hours, minutes
end

wndTime = {
Expand Down Expand Up @@ -1905,26 +1899,11 @@ addCommandHandler('st', setTimeCommand)

function toggleFreezeTime()
local state = guiCheckBoxGetSelected(getControl(wndMain, 'freezetime'))
guiCheckBoxSetSelected(getControl(wndMain, 'freezetime'), not state)
freezeTimeHour, freezeTimeMinute = getTime()
freezeTimeWeather = getWeather()
setTimeFrozen(state)
end

function setTimeFrozen(state)
guiCheckBoxSetSelected(getControl(wndMain, 'freezetime'), state)

if state then
if not g_TimeFreezeTimer then
g_TimeFreezeTimer = setTimer(function() setTime(freezeTimeHour, freezeTimeMinute) setWeather(freezeTimeWeather) end, 5000, 0)
setMinuteDuration(9001)
end
setTimeFrozen(true)
else
if g_TimeFreezeTimer then
killTimer(g_TimeFreezeTimer)
g_TimeFreezeTimer = nil
end
setMinuteDuration(1000)
setTimeFrozen(false)
end
end

Expand All @@ -1940,7 +1919,6 @@ function applyWeather(leaf)
end
setWeather(leaf.id)
closeWindow(wndWeather)
freezeTimeWeather = leaf.id
end

wndWeather = {
Expand Down
2 changes: 1 addition & 1 deletion [gameplay]/freeroam/meta.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<oop>true</oop>
<info name="Freeroam GUI" author="arc_" version="1.5.7" />
<min_mta_version server="1.5.5-9.13846" client="1.5.6-9.16362"></min_mta_version>
<min_mta_version server="1.5.5-9.13846" client="1.6.0-9.22676"></min_mta_version>
<include resource="playerblips" />

<script src="util_server.lua" type="server" />
Expand Down

0 comments on commit 86882e4

Please sign in to comment.