Robert, I am not sure if it was mentioned before or if its even a bug....but FuelLeft never changes for me... // Current amount of fuel in the tank(s) // Unit: Liters (l) public Single FuelLeft; Thanks! Stefan
It only works in online races which have fuel enabled. I don't think there's any fuel use in single player. I've definitely seen it working. Robert, will the api stuff in github for c++ and c# be updated when the patch goes live? And will the update to the shared memory actually be in this weeks patch?
Stefan, fueluse is something not fully implemented yet, but think it can be used in online races. Mr_Belowski, I believe it'll be incl in patch. Structs on github will be updated with new data, not sure when to get time to update examples though.
You'll find the change here. The C# version will take a bit longer, since we're having trouble getting C# to play nicely with fixed-size buffers of structs. They only seem to allow fixed-size buffers of primitive types right now. If anyone more versed in C# has any idea how to get around this I'd love to know. Right now the plan is to drop down to C++ by bundling a C++/CLI library that populates the struct and then passes it back to C# somehow, but I'm not super psyched about having to resort to that.
[edit] sent you a Conversation message Mikael. If I use the code from your example to read the Project Cars shared memory (which contains very similar stuff to the stuff you've now got in the Raceroom block), it fails with some cryptic error message about non-native types. I've sent you a link to the code the I use to read the PCars block. Which I borrowed / stole / hacked / adapted / failed to fully understand. But it works
So it seems I was a bit trigger happy with the GitHub repo and some changes made it in that hadn't been integrated into our release branch yet, namely the push_to_pass entry. I just removed it, so feel free to sync again and hopefully the driver data should start making a bit more sense.
I should probably mention that r3e_u8char represents a UTF-8 code unit, and driver names are therefore UTF-8 encoded, not ASCII.
Thanks Mikael and Robert for this great new entries in API! To all SLIMax Manager users, the plugins for R3E are out now and you can get the update by using "Check For Update" as usual, see the EKSIMRacing plugins page for more info. Cheers, z
Is it possible to have fields in the API for a collision with another car ? A reference to the other car, the direction (front,back,left,right) and who is fault would fine I am thinking about building something like ranking app for RRE. Points for clean laps, minus points for tracks cut and collisions. Off course points for fastest lap and race position. Also points for just finishing the race. I hate that a lot of people don't finish the race.
Hi Mikael, I have managed to write the struct in C# and map it successfully. Though I'll test that all the class properties are mapped with the correct values and if all good I'll upload the code. Cheers Stefan
That would be much appreciated, Stefan. Apologies for the delay. I'm caught up in a bunch of other stuff these days. The ID lookup is available in the r3e-spectator-overlay repository, which I also failed to mention.