Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# gen(stylua): initial formatting of entire codebase
0893975d66c3a6b44248054b49d468f0e51ff0b6

# gen(bar_codemod): bracket-to-dot
2e67e27c76995c5bff47505214de9ad14f9cb922

# gen(bar_codemod): rename-aliases
3a5746e07d7390aa3fd740e217adebd8c8bbdd32

# gen(bar_codemod): detach-bar-modules
1fcca8773dbaa2d2b4cc8fc57b4036ce887905fd

# gen(hand): integration tests return-table shape
1fcca8773dbaa2d2b4cc8fc57b4036ce887905fd

# gen(hand): inline luassert and busted LuaCATS types
1fcca8773dbaa2d2b4cc8fc57b4036ce887905fd

2 changes: 1 addition & 1 deletion luarules/gadgets/api_enemyunitdestroyed.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if not gadgetHandler:IsSyncedCode() then

function gadget:UnitDestroyed(unitID, unitDefID, teamID, attackerID, attackerDefID, attackerTeamID, weaponDefID)
local allyTeam = spGetUnitAllyTeam(unitID)
if (spec and fullview) or (allyTeam and allyTeam ~= myAllyTeamID) then
if (spec and fullView) or (allyTeam and allyTeam ~= myAllyTeamID) then
local losstate = Spring.GetUnitLosState(unitID, myAllyTeamID)
if losstate and losstate.los and Script.LuaUI("EnemyUnitDestroyed") then
Script.LuaUI.EnemyUnitDestroyed(unitID, unitDefID, teamID, attackerID, attackerDefID, attackerTeamID, weaponDefID)
Expand Down
2 changes: 1 addition & 1 deletion luarules/gadgets/raptor_spawner_defense.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,7 @@ if gadgetHandler:IsSyncedCode() then
--if bestBurrowID then
-- DestroyUnit(bestBurrowID, true, false)
--end
return CreateUnit(config.queenName, sx, sy, sz, mRandom(0, 3), raptorTeamID), burrowID
return CreateUnit(config.queenName, sx, sy, sz, mRandom(0, 3), raptorTeamID), bestBurrowID
end

local x, z, y
Expand Down
2 changes: 1 addition & 1 deletion luarules/gadgets/scav_spawner_defense.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,7 @@ if gadgetHandler:IsSyncedCode() then
--if bestBurrowID then
-- Spring.DestroyUnit(bestBurrowID, true, false)
--end
return CreateUnit(config.bossName, sx, sy, sz, mRandom(0, 3), scavTeamID), burrowID
return CreateUnit(config.bossName, sx, sy, sz, mRandom(0, 3), scavTeamID), bestBurrowID
end

local x, z, y
Expand Down
12 changes: 6 additions & 6 deletions luarules/gadgets/unit_area_timed_damage.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ end
--------------------------------------------------------------------------------
-- Configuration ---------------------------------------------------------------

local damageInterval = 0.7333 ---@type number in seconds, time between procs
local damageLimit = 120 ---@type number in damage per second, soft-cap across multiple areas
local damageExcessRate = 0.2 ---@type number %damage dealt above limit [0, 1)
local damageCegMinScalar = 30 ---@type number in damage, minimum to show hit CEG
local damageCegMinMultiple = 1 / 3 ---@type number in %damage, minimum to show hit CEG
local factoryWaitTime = damageInterval ---@type number in seconds, immunity period for factory-built units
local damageInterval = 0.7333 ---@type number # in seconds, time between procs
local damageLimit = 120 ---@type number # in damage per second, soft-cap across multiple areas
local damageExcessRate = 0.2 ---@type number # %damage dealt above limit [0, 1)
local damageCegMinScalar = 30 ---@type number # in damage, minimum to show hit CEG
local damageCegMinMultiple = 1 / 3 ---@type number # in %damage, minimum to show hit CEG
local factoryWaitTime = damageInterval ---@type number # in seconds, immunity period for factory-built units

-- Since I couldn't figure out totally arbitrary-radius variable CEGs for fire,
-- we're left with this static list, which is repeated in the expgen def files:
Expand Down
8 changes: 4 additions & 4 deletions luarules/gadgets/unit_carrier_spawner.lua
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ local function CobDroneSpawnSequenceFinished(unitID, unitDefID, team, subUnitID)
return
else
local dockingPiece = carrierMetaList[unitID].subUnitsList[subUnitID].dockingPiece
local _, pieceAngle = spCallCOBScript(unitID, "DroneDocked", 5, pieceAngle, dockingPiece)
local _, pieceAngle = spCallCOBScript(unitID, "DroneDocked", 5, nil, dockingPiece)
spCallCOBScript(subUnitID, "Docked", 0, carrierMetaList[unitID].cobdockparam, dockingPiece, pieceAngle)
return
end
Expand Down Expand Up @@ -475,7 +475,7 @@ local function spawnUnit(spawnData)
energyCost = carrierData.energyCost[dronetypeIndex]
else
local subUnitDef = UnitDefNames[dronename]
if subunitDef then
if subUnitDef then
metalCost = subUnitDef.metalCost
energyCost = subUnitDef.energyCost
else
Expand Down Expand Up @@ -617,7 +617,7 @@ local function spawnUnit(spawnData)
droneSpawnSequence(ownerID, subUnitID)
droneMetaData.activeSpawnSequence = true
else
local _, pieceAngle = spCallCOBScript(ownerID, "DroneDocked", 5, pieceAngle, droneMetaData.dockingPiece)
local _, pieceAngle = spCallCOBScript(ownerID, "DroneDocked", 5, nil, droneMetaData.dockingPiece)
spCallCOBScript(subUnitID, "Docked", 0, carrierData.cobdockparam, droneMetaData.dockingPiece, pieceAngle)
end
else
Expand Down Expand Up @@ -1578,7 +1578,7 @@ local function dockUnits(dockingqueue, queuestart, queueend)
if carrierMetaList[unitID].dockArmor then
spSetUnitArmored(subUnitID, true, carrierMetaList[unitID].dockArmor)
end
local _, pieceAngle = spCallCOBScript(unitID, "DroneDocked", 5, pieceAngle, pieceNumber)
local _, pieceAngle = spCallCOBScript(unitID, "DroneDocked", 5, nil, pieceNumber)
spCallCOBScript(subUnitID, "Docked", 0, carrierMetaList[unitID].cobdockparam, pieceNumber, pieceAngle)

if dronetype == "abductor" then
Expand Down
2 changes: 1 addition & 1 deletion luarules/gadgets/unit_stomp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ end
local stompableDefs = {}
for udid, ud in pairs(UnitDefs) do
if stompable[ud.name] then
stompableDefs[udid] = v
stompableDefs[udid] = true
end
end

Expand Down
2 changes: 1 addition & 1 deletion luaui/Include/AtlasOnDemand.lua
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ local function MakeAtlasOnDemand(config)
if id then
self.uvcoords[id] = nil
end
local drawblanktask = { id = self.blankimg, w = xmax - xmin * self.xresolution, h = ymax - ymin * yresolution, x = xmin * self.xresolution, y = ymin * self.yresolution }
local drawblanktask = { id = self.blankimg, w = xmax - xmin * self.xresolution, h = ymax - ymin * self.yresolution, x = xmin * self.xresolution, y = ymin * self.yresolution }
self.renderImageTaskList[#self.renderImageTaskList + 1] = drawblanktask
self.hastasks = true
end
Expand Down
2 changes: 1 addition & 1 deletion luaui/Scenarios/stresstest/multi_attack.lua
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function run_commands(nattackers, ntargets, attackerDef, targetDef)
local arr = {}
for _, unitID in pairs(attackers) do
for idx, targetID in pairs(targets) do
currOpt = (idx == 1) and opts or shiftOpts
local currOpt = (idx == 1) and {} or shiftOpts
arr[1] = targetID
spGiveOrderToUnit(unitID, CMD_ATTACK, arr, currOpt)
end
Expand Down
2 changes: 1 addition & 1 deletion luaui/Widgets/api_unit_tracker_gl4.lua
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ local function Scream(reason, unitID) -- This will pause the game and play some
-- gather as much info as possible about this unitID
local unitDefID = spGetUnitDefID(unitID)
local unitTeam = spGetUnitTeam(unitID)
local ux, uy, uz = spGetUnitPosition(unitID)
local px, py, pz = spGetUnitPosition(unitID)
spEcho("API Unit Tracker error unitID", unitID, unitDefID and UnitDefs[unitDefID].name or "nil", unitTeam, px, pz)
end
if lastknownunitpos[unitID] then
Expand Down
4 changes: 2 additions & 2 deletions luaui/Widgets/cmd_area_commands_filter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ local myAllyTeamID
--- Target sorting logic (pick the closest first)
---------------------------------------------------------------------------------------

---@field position1 table {x, y, z}
---@field position2 table {x, y, z}
---@param position1 table {x, y, z}
---@param position2 table {x, y, z}
local function distanceSq(position1, position2)
local dx = position1.x - position2.x
local dz = position1.z - position2.z
Expand Down
1 change: 1 addition & 0 deletions luaui/Widgets/cmd_context_build.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ local tableInsert = table.insert

-- Localized Spring API for performance
local spGetGameFrame = Spring.GetGameFrame
local _, isSpec = Spring.GetSpectatingState()

local isPregame = spGetGameFrame() == 0 and not isSpec

Expand Down
1 change: 1 addition & 0 deletions luaui/Widgets/dbg_frame_grapher.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

local widget = widget ---@type Widget

local lastframeduration = 0 -- forward-decl: read into prevframems
local lastframems -- forward-decl: read into prevframems

local alpha = 0 -- forward-decl: read at file scope in a shader-params table
Expand Down
4 changes: 2 additions & 2 deletions luaui/Widgets/gfx_deferred_rendering_GL4.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1416,8 +1416,8 @@ function widget:UnitCreated(unitID, unitDefID, teamID)
eventLightSpawner("UnitCreated", unitID, unitDefID, teamID)
end
function widget:UnitFromFactory(unitID, unitDefID, unitTeam, factID, factDefID, userOrders)
eventLightSpawner("UnitFromFactory", unitID, unitDefID, teamID) -- i have no idea of the differences here
eventLightSpawner("UnitFromFactoryBuilder", factID, factDefID, teamID)
eventLightSpawner("UnitFromFactory", unitID, unitDefID, unitTeam) -- i have no idea of the differences here
eventLightSpawner("UnitFromFactoryBuilder", factID, factDefID, unitTeam)
end
function widget:UnitDestroyed(unitID, unitDefID, teamID) -- dont do piece-attached lights here!
eventLightSpawner("UnitDestroyed", unitID, unitDefID, teamID)
Expand Down
4 changes: 2 additions & 2 deletions luaui/Widgets/gfx_distortion_gl4.lua
Original file line number Diff line number Diff line change
Expand Up @@ -999,8 +999,8 @@ function widget:UnitCreated(unitID, unitDefID, teamID)
eventDistortionSpawner("UnitCreated", unitID, unitDefID, teamID)
end
function widget:UnitFromFactory(unitID, unitDefID, unitTeam, factID, factDefID, userOrders)
eventDistortionSpawner("UnitFromFactory", unitID, unitDefID, teamID) -- i have no idea of the differences here
eventDistortionSpawner("UnitFromFactoryBuilder", factID, factDefID, teamID)
eventDistortionSpawner("UnitFromFactory", unitID, unitDefID, unitTeam) -- i have no idea of the differences here
eventDistortionSpawner("UnitFromFactoryBuilder", factID, factDefID, unitTeam)
end
function widget:UnitDestroyed(unitID, unitDefID, teamID) -- dont do piece-attached distortions here!
eventDistortionSpawner("UnitDestroyed", unitID, unitDefID, teamID)
Expand Down
1 change: 1 addition & 0 deletions luaui/Widgets/gfx_norush_timer_gl4.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ local LuaShader = gl.LuaShader
local InstanceVBOTable = gl.InstanceVBOTable

local minY, maxY = Spring.GetGroundExtremes()
local NUM_BOXES = 0

local shaderSourceCache = {
vssrcpath = "LuaUI/Shaders/norush_timer.vert.glsl",
Expand Down
3 changes: 2 additions & 1 deletion luaui/Widgets/gui_advplayerslist.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2026,7 +2026,7 @@ function CreateBackground()
if absRight > vsx + margin then -- lazy bugfix needed when playerScale < 1 is in effect
absRight = vsx + margin
end
apiAbsPosition = { absTop, absLeft, absBottom, absRight, widgetScale, right, false }
apiAbsPosition = { absTop, absLeft, absBottom, absRight, widgetScale, absRight, false }

local paddingBottom = bgpadding
local paddingRight = bgpadding
Expand Down Expand Up @@ -2844,6 +2844,7 @@ function DrawState(playerID, posX, posY)
-- note that adv pl list uses a phantom pID for absent players, so this will always show unready for players not ingame
local ready = (playerReadyState[playerID] == 1) or (playerReadyState[playerID] == 2) or (playerReadyState[playerID] == -1)
local hasStartPoint = (playerReadyState[playerID] == 4)
local ai = player[playerID] and player[playerID].ai
if ai then
gl_Color(0.1, 0.1, 0.97, 1)
else
Expand Down
1 change: 1 addition & 0 deletions luaui/Widgets/gui_building_grid_gl4.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ local config = {
local waterLevel = Spring.GetWaterPlaneLevel and Spring.GetWaterPlaneLevel() or 0

local cmdShowForUnitDefID
local _, _, isSpec = Spring.GetPlayerInfo(Spring.GetMyPlayerID())
local isPregame = Spring.GetGameFrame() == 0 and not isSpec

local gridVBO = nil -- the vertex buffer object, an array of vec2 coords
Expand Down
2 changes: 1 addition & 1 deletion luaui/Widgets/gui_flowui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,7 @@ WG.FlowUI.Draw.Button = function(px, py, sx, sy, tl, tr, br, bl, ptl, ptr, pbr,

-- Layer 6: White feathered inner outline glow
local outlineWidth = 7
local outlineAlpha = opaque and 0.12 or 0.06
local outlineAlpha = opacity >= 1 and 0.12 or 0.06
WG.FlowUI.Draw.RectRoundOutline(px + pxPad, py + pyPad, sx - sxPad, sy - syPad, cs, outlineWidth, tl, tr, br, bl, { 1, 1, 1, outlineAlpha }, { 1, 1, 1, 0 })
end

Expand Down
2 changes: 1 addition & 1 deletion luaui/Widgets/gui_ground_ao_plates_gl4.lua
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ end

function widget:VisibleUnitRemoved(unitID) -- remove the corresponding ground plate if it exists
if debugmode then
BAR.Debug.TraceEcho("remove", unitID, reason)
BAR.Debug.TraceEcho("remove", unitID, "VisibleUnitRemoved")
end
if groundPlateVBO.instanceIDtoIndex[unitID] then
popElementInstance(groundPlateVBO, unitID)
Expand Down
2 changes: 1 addition & 1 deletion luaui/Widgets/gui_healthbars_gl4.lua
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ local function addBarForUnit(unitID, unitDefID, barname, reason)

if unitDefID == nil or Spring.ValidUnitID(unitID) == false or Spring.GetUnitIsDead(unitID) == true then -- dead or invalid
if debugmode then
BAR.Debug.TraceEcho("Tried to add a bar to dead/invalid/nounitdef unit", unitID, unitdefID, barname)
BAR.Debug.TraceEcho("Tried to add a bar to dead/invalid/nounitdef unit", unitID, unitDefID, barname)
end
return nil
end
Expand Down
2 changes: 1 addition & 1 deletion luaui/Widgets/gui_idle_builders.lua
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ local function drawContent()
end

local texSize = floor(iconSize * 1.33)
local zoom = i == hoveredIcon and (b and 0.15 or 0.105) or 0.05
local zoom = i == hoveredIcon and (showStack and 0.15 or 0.105) or 0.05
local highlightOpacity = 0
if i == hoveredIcon then
highlightOpacity = 0.22
Expand Down
6 changes: 4 additions & 2 deletions luaui/Widgets/gui_options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1234,9 +1234,11 @@ function widget:RecvLuaMsg(msg, playerID)
end

local showToggledOff = false
local isClientPaused = false
local function checkPause()
-- pause/unpause when the options/quitscreen interface shows
local _, _, isClientPaused, _ = Spring.GetGameState()
local _, _, currentIsClientPaused, _ = Spring.GetGameState()
isClientPaused = currentIsClientPaused
if not isClientPaused then
skipUnpauseOnHide = false
skipUnpauseOnLobbyHide = false
Expand Down Expand Up @@ -10652,7 +10654,7 @@ function widget:GetConfigData()
currentGroupTab = currentGroupTab,
show = show,
waterDetected = waterDetected,
customPresets = customPresets,
customPresets = customPresetOptions,
changesRequireRestart = changesRequireRestart,
requireRestartDefaults = requireRestartDefaults,

Expand Down
2 changes: 1 addition & 1 deletion luaui/Widgets/gui_pip.lua
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,7 @@ function pipTV.DirectorTick(dt)

-- Before game start, stay on overview — pre-game map markers shouldn't move the camera
-- Note: can't use gameHasStarted (declared later in file), so check gameFrame directly
local gameFrame = Spring.GetGameFrame()
if gameFrame == 0 then
local offsetX = (pipNumber or 0) * Game.mapSizeX * 0.15
local overviewX = math.min(Game.mapSizeX * 0.85, Game.mapSizeX / 2 + offsetX)
Expand All @@ -997,7 +998,6 @@ function pipTV.DirectorTick(dt)
-- Time factor: 0→1 over first 2 minutes (baseline)
-- Activity factor: 0→1 as peak hotspot weight reaches combat levels (~10+)
-- Use whichever is higher — so early fights on small maps instantly ramp up
local gameFrame = Spring.GetGameFrame()
local timeFactor = math.min(1, gameFrame / (30 * 60 * 2)) -- 0→1 over 2 minutes

-- Track peak activity across all current hotspots
Expand Down
3 changes: 2 additions & 1 deletion luaui/Widgets/gui_pregameui_draft.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
local widget = widget ---@type Widget

local isAI = false -- forward-decl: read in DrawState
local msx, msz = Game.mapSizeX, Game.mapSizeZ -- forward-decl: read in Initialize startbox check

function widget:GetInfo()
return {
Expand Down Expand Up @@ -213,7 +214,7 @@ local function DrawState(playerID, posX, posY)
-- note that adv pl list uses a phantom pID for absent players, so this will always show unready for players not ingame
local ready = (playerReadyState[playerID] == 1) or (playerReadyState[playerID] == 2) or (playerReadyState[playerID] == -1)
local hasStartPoint = (playerReadyState[playerID] == 4)
if ai then
if isAI then
gl_Color(0.1, 0.1, 0.97, 1)
else
if ready then
Expand Down
2 changes: 1 addition & 1 deletion luaui/Widgets/gui_spectator_hud.lua
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ local function buildUnitDefs()

local function isArmyUnit(unitDefID, unitDef)
local isArmyUnit = #unitDef.weapons > 0 and unitDef.speed > 0
return isArmyUnit and not isCommander(unitDefId, unitDef)
return isArmyUnit and not isCommander(unitDefID, unitDef)
end

local function isDefenseUnit(unitDefID, unitDef)
Expand Down
1 change: 1 addition & 0 deletions luaui/Widgets/map_startbox.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ local spGetTeamStartPosition = Spring.GetTeamStartPosition
local spGetTeamRulesParam = Spring.GetTeamRulesParam
local spGetGroundHeight = Spring.GetGroundHeight
local glDrawGroundCircle = gl.DrawGroundCircle
local goodbye = spEcho

local GL_SRC_ALPHA = GL.SRC_ALPHA
local GL_ONE_MINUS_SRC_ALPHA = GL.ONE_MINUS_SRC_ALPHA
Expand Down
1 change: 1 addition & 0 deletions luaui/Widgets/snd_notifications.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
local widget = widget ---@type Widget

local customNotifications -- forward-decl: read in GetConfigData export
local customNotificationTimers -- forward-decl: read in GetConfigData export

function widget:GetInfo()
Expand Down
5 changes: 3 additions & 2 deletions luaui/barwidgets.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ function widgetHandler:UpdateCallIn(name)
if name == "Update" or name == "DrawScreen" then
return
end
if #self[listName] > 0 or not flexCallInMap[name] or (name == "GotChatMsg" and actionHandler.HaveChatAction()) or (name == "RecvFromSynced" and actionHandler.HaveSyncAction()) then
if #self[listName] > 0 or not flexCallInMap[name] or (name == "GotChatMsg" and self.actionHandler.HaveChatAction()) or (name == "RecvFromSynced" and self.actionHandler.HaveSyncAction()) then
-- always assign these call-ins
local selffunc = self[name]

Expand Down Expand Up @@ -1808,7 +1808,8 @@ function widgetHandler:DrawInMiniMap(xSize, ySize)
end

function widgetHandler:DrawBuildSquare(unitDefID, x, z, facing, statuses)
for _, w in ripairs(self.DrawBuildSquareList) do
for i = #self.DrawBuildSquareList, 1, -1 do
local w = self.DrawBuildSquareList[i]
w:DrawBuildSquare(unitDefID, x, z, facing, statuses)
end
return
Expand Down
2 changes: 1 addition & 1 deletion modules/graphics/LuaShader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@ local function isUpdateRequiredNoTable(uniform, u1, u2, u3, u4)

if u1 and cachedValues[1] ~= u1 then
update = true
cachedValues[1] = val
cachedValues[1] = u1
end
if u2 and cachedValues[2] ~= u2 then
update = true
Expand Down
3 changes: 2 additions & 1 deletion modules/graphics/instancevboidtable.lua
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ local function makeVAOandAttach(vertexVBO, instanceVBO, indexVBO) -- Attach a ve
local newVAO = nil
newVAO = gl.GetVAO()
if newVAO == nil then
goodbye("Failed to create newVAO")
Spring.Echo("Failed to create newVAO")
end
if vertexVBO == nil then -- the special case where are using 'vertices' as 'instances'
newVAO:AttachVertexBuffer(instanceVBO)
Expand Down Expand Up @@ -639,5 +639,6 @@ return {
dumpAndCompareInstanceData = dumpAndCompareInstanceData,
uploadAllElements = uploadAllElements,
validateInstanceVBOIDTable = validateInstanceVBOIDTable,
---@diagnostic disable-next-line: undefined-global
uploadElementRange = uploadElementRange,
}
4 changes: 2 additions & 2 deletions modules/graphics/instancevbotable.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ local function makeInstanceVBOTable(layout, maxElements, myName, unitIDattribID)
local newVAO = nil
newVAO = gl.GetVAO()
if newVAO == nil then
goodbye("Failed to create newVAO")
Spring.Echo("Failed to create newVAO")
end
self.VAO = newVAO
if vertexVBO == nil then -- the special case where are using 'vertices' as 'instances'
Expand Down Expand Up @@ -226,7 +226,7 @@ local function makeVAOandAttach(vertexVBO, instanceVBO, indexVBO) -- Attach a ve
local newVAO = nil
newVAO = gl.GetVAO()
if newVAO == nil then
goodbye("Failed to create newVAO")
Spring.Echo("Failed to create newVAO")
end
if vertexVBO == nil then -- the special case where are using 'vertices' as 'instances'
newVAO:AttachVertexBuffer(instanceVBO)
Expand Down
Loading
Loading