The reason I put those small block comments in front of each of those lines was just to make sure that the script I used to generate that code was working properly. It's always easier to look at the beginning of the line, rather than try reading a string in the middle of it.
I made some small changes to the RM2 format, because my RMESH to RM2 converter was broken (that's what I get for writing spaghetti code) so some data was missing. Here are the new files: https://www.mediafire.com/?gs115si6i0maa77MWATTT wrote:It seems that some things are missing in the lastest git. There is no reference to the "irrToBtVec" function and no fragment shader for FogBillboard.
Also, a strange thing in the entAmount loop of the loadRMesh function is I always get a segfault in the last itteration because the value of entType is 10. Everything works correctly if I remove the last itteration.
When Irrlicht finds the end of a file, it doesn't make changes to the variables that you give to the reading functions. So the RM2 loader would duplicate the last point entity because it tried reading too much data. Now I reset the entType variable to 10, so if Irrlicht fails to read the file, the loader will crash.
As for the irrToBtVec function, yeah I forgot to commit some changes to irrDynamics. I'm not sure how I forgot to commit FogBillboardFrag. Thanks for telling me, I fixed it just now.
3dworld.cpp, line 556:InnocentSam wrote:Now, it sets the Stamina variable fine, but I'm not sure if it loops and keeps re-setting it, or whether you've got infinite sprint turned on for testing purposes (again, half one in the morning). Either way, it works, and worst case scenario is that the code that sets the Stamina needs to be moved.
Code: Select all
mainPlayer->boostStamina(10.f,-1.f);