![]() |
Reinstate maximum steering angle (PATCH) - Printable Version +- Forums (https://www.vdrift.net/Forum) +-- Forum: Community (https://www.vdrift.net/Forum/forumdisplay.php?fid=3) +--- Forum: Bugs (https://www.vdrift.net/Forum/forumdisplay.php?fid=7) +--- Thread: Reinstate maximum steering angle (PATCH) (/showthread.php?tid=1139) |
Reinstate maximum steering angle (PATCH) - fudje - 06-26-2009 This has been missing for the entire "refactor" - and is really annoying (to me at least. Should be to others too). To reproduce, just drive any car on any track. All cars currently steer to 45°, which is both useless and unrealistic. Patch to fix is very small. I've tried to keep this to the current coding style (header seem to have a lot of implementation code in them - what's with that? It could be driving up compilation times, btw): Code: Index: include/cardynamics.h Compiled and Tested on Ubuntu Karmic with gcc 4.4.0 - The bits I've added should compile on any C++ compiler ever made though ![]() Cheers, fudje Re: Reinstate maximum steering angle (PATCH) - joevenzon - 06-26-2009 fudje Wrote:I've tried to keep this to the current coding style (header seem to have a lot of implementation code in them - what's with that? It could be driving up compilation times, btw) The cardynamics.h file defines a templated CARDYNAMICS class. The only reason I made it a template was so I could easily switch between floats and doubles as the primary "real" type, but this would have been much better served with a typedef instead of a template (woops, poor design on my part). As a result the implementation of the class is in the header since that's the easiest way to do template classes. Of course, there are fairly simple ways to separate out the implementation and header with template functions, and even better I could just refactor to use a typedef, but I haven't bothered yet. If you're interested in doing this let me know and I'll set you up with SVN access (the patch looks good and I'm applying it now). - joevenzon - 06-27-2009 OK, your patch is in R2506. Thanks! - fudje - 06-27-2009 Ah, of course, the templating. I don't really understand C++ templates enough to do anything much about it at this point (though I fear I am going to have to learn) - mostly what I know is they're much more hackish than in, say, Java or C#. You're very welcome to have the patch. Thanks for applying to SVN ![]() |