Rewritten sending helper and logic
This commit is contained in:
@@ -272,13 +272,13 @@ function GetTrainTripStats()
|
||||
end
|
||||
if #tripParts > 400 then
|
||||
log("Sending at " .. tripCount .. " trips")
|
||||
helpers.send_udp(udpAddress, table.concat(tripParts, "\n"), serverIndex)
|
||||
SendChunked(table.concat(tripParts, "\n"))
|
||||
tripParts = {}
|
||||
tripParts[#tripParts + 1] = "---train-trips---\n"
|
||||
end
|
||||
end
|
||||
--tripParts[#tripParts+1] = "--train-fin--"
|
||||
helpers.send_udp(udpAddress, table.concat(tripParts, "\n"), serverIndex)
|
||||
SendChunked(table.concat(tripParts, "\n"))
|
||||
log("Counted " .. tripCount .. " trips")
|
||||
--return table.concat(tripParts,"\n")
|
||||
end
|
||||
@@ -326,6 +326,6 @@ function SendTrainStats()
|
||||
GetTrainTripStats()
|
||||
end
|
||||
log("Sending Train statistics")
|
||||
helpers.send_udp(udpAddress, table.concat(returnParts, "\n"), serverIndex)
|
||||
SendChunked(table.concat(returnParts, "\n"))
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user