D00Med / farlands

Steampunk/fantasy themed subgame with dinosaurs
29 stars 11 forks source link

/change_weather crashes the subgame #121

Closed ghost closed 6 years ago

ghost commented 6 years ago

/change_weather rain and /change_weather storm results in a runtime error https://i.imgur.com/l5zy5f6.png this is due to the fact that the arguments of math.random() is passed in the wrong order velocity = {x=0, y=math.random(-15,-20), z=0}, should be velocity = {x=0, y=math.random(-20,-15), z=0}, velocity = {x=0, y=math.random(-25,-30), z=0}, should be velocity = {x=0, y=math.random(-30,-25), z=0}, velocity = {x=math.random(-5,5)/10, y=math.random(-4,-6), z=math.random(-5,5)/10}, should be velocity = {x=math.random(-5,5)/10, y=math.random(-6,-4), z=math.random(-5,5)/10},

tobyplowy commented 6 years ago

@gorkoda1 thanks for reporting :)

ghost commented 6 years ago

For now, it's not crashing, but snowing isn't working.

D00Med commented 6 years ago

@Reedych snow works, it just doesn't work when there is not snow nearby

ghost commented 6 years ago

its crashing for me. running Lubuntu 16.04 minetest 0.4.16 release. video proof: https://youtu.be/XOkWVHUb15Q

ghost commented 6 years ago

just compiled and tested the dev version. it is affected aswell

ghost commented 6 years ago

@gorkoda1 could you send us the debug information? It's hard to read from video.

ghost commented 6 years ago

@Reedych heres my debug.txt https://pastebin.com/MKVej86d

ghost commented 6 years ago

bad argument #2 to 'random' (interval is empty)

Ehm, I think your farlands is too old. Could you try to load last version? I see that this math.random call probably is correct.

ghost commented 6 years ago

It isn't thats why it's crashing

ghost commented 6 years ago

oops. i just realized that this has already fixed in the 1.1 branch.