Comments (4)
I'm looking at this and I don't think the change you suggest would actually be correct, since that "speed" variable is used elsewhere as well in the exact same way. I also note that this particular code has looked like this for many years; that doesn't necessarily mean it's doing the right thing, but it does mean that it's likely that it was working without noticeable faults until recently.
The only code related to this that I think has ever changed in Naikari's development history is the AI code itself, so it's possible there's some sort of issue with the numbers that has only come to light as a result of those. We'll have to try to figure out what that might be. If it's easy to reproduce, perhaps a git bisect could be in order just to narrow down exactly what change led to this. I'll look into things more closely in a few days, in any case. Perhaps a whole rewrite might even be in order. (Naev actually did a full rewrite, which we tried out with 5112da3, but we subsequently reverted that because it seemed to not work correctly.)
from naikari.
I think my mind on what I think seems correct has changed and I think your initial conclusion seems right, after looking at it for a few more minutes. I'll want to do some checks to verify, thΓ΄, and look into why that "speed" variable is getting set <= 0 (which is almost certainly why it got set to 0.0001), since that could be indicative of a deeper problem in the code.
from naikari.
Ok, so, it looks like our initial reservations were right. That "speed" usage was there for a good reason: because it's the drift speed. Looks like what was happening was speed could become zero if the speed limit was low enough, and that would mean that brake distance actually should be zero (as braking isn't actually needed in that case). So I've changed it so that completely not drifting is less likely, added a MAX call to make sure minbrakedist doesn't return a negative number (returns zero instead), and I'll need to also add a guard in the AI code itself to handle the case of min brake distance being extremely small, probably just by also recognizing being inside the jump radius as a condition to start braking.
π·οΈ
from naikari.
Just finished adding in that last protection and the totality of the changes seems to make things pretty sturdy now. I didn't specifically test the mission you mentioned, but I did test some generic AI pilots with an extremely small speed limit applied and the fix to them should also work for the mission pilot. Please let us know if the bug persists in the latest git revision. Assuming there isn't a problem with the fix, we'll be pushing out a 0.10.1 bugfix release soon.
Thanks for the report. All the information you provided was also very helpful in more easily solving the bug, so thank you for that as well.
from naikari.
Related Issues (11)
- Limit playing of individual sound files to limit proliferation of noise
- The game doesnt start HOT 13
- Display current objectives at the selected system in the starmap
- Neo GUI HOT 3
- Unfocused window sometimes freezes up on Linux HOT 1
- black market of nope HOT 1
- Content should not be gated behind completing the tutorial HOT 2
- Unables to create Opengl context! Could not create GL context HOT 12
- Update MacOS Support
- Question on CPU use HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from naikari.