1
0
forked from MTSR/mapserver

proper array concat

This commit is contained in:
Thomas Rudin 2019-02-15 18:40:04 +01:00
parent b8c7935e38
commit a91c500e94

View File

@ -58,8 +58,9 @@ function send_stats()
wagons = {}
}
for _, wagon in pairs(advtrains.wagons) do
if wagon.train_id == train.id then
for _, part in pairs(train.trainparts) do
local wagon = advtrains.wagons[part]
if wagon ~= nil then
table.insert(t.wagons, {
id = wagon.id,
type = wagon.type,