Jump to content

Tread

Member
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Tread's Achievements

  1. Version 41.65 Rest is not relevant since report regards lua code. Issue is regarding vehicle fuel consumption - gasMultiplier increased by heater usage should result in more Gas being used from gas tank. At the moment it does the opposite. Even variable name is opposite to what is done with it in line 368 - it is being used as denominator. Effectively reducing fuel consumption the higher it is (and as you see in line 342 heater usage increases it). Bottom line is that turning heater ON lowers the fuel consumption of vehicle. My tests (while playing with values in code) also do confirm that. server/Vehicles/Vehicles.lua line 342: if heater and heater:getModData().active then gasMultiplier = gasMultiplier + 5000; end line 368: local newAmount = (speedMultiplier / gasMultiplier) * SandboxVars.CarGasConsumption; newAmount = newAmount * (vehicle:getEngineSpeed()/2500.0); amount = amount - elapsedMinutes * newAmount; I found the issue while working on my mod and studying game lua files. I hope that this finding (even thought it is minor issue) will help! P.S. Apologies for not using "code" formatting, but it bugged out for some reason and I could not use it in this post.
  2. Version : 41.65 SP/MP: Both Rest is not important - bug report is about code mistake I found, not specific game bug. Nonetheless this mistake is likely cause of some specific game related bugs. While working on my mod and repurposing one of native functions: "AdjacentFreeTileFinder.privTrySquareForWalls" from ".../media/lua/shared/util/AdjacentFreeTileFinder.lua" I found the bug in the native function. It seems to be small syntax error but it causes improper function operation. In case of my adjusted function this mistake was causing improper detection (lack of it) of walls separating diagonal tiles. if src:getX() ~= test:getX() and src:getY() ~= test:getY() then if not AdjacentFreeTileFinder.privTrySquareForWalls2(src, test:getX(), src:getY(), src:getZ() or --line 31 lacks one ")" not AdjacentFreeTileFinder.privTrySquareForWalls2(src, src:getX(), test:getY(), src:getZ()) or not AdjacentFreeTileFinder.privTrySquareForWalls2(test, test:getX(), src:getY(), src:getZ()) or not AdjacentFreeTileFinder.privTrySquareForWalls2(test, src:getX(), test:getY(), src:getZ())) then --line 34 has one ")" too many return false end end I hope that this small bug report helps you with making it even greater game!
×
×
  • Create New...