Hello, As soon as i return "true" in the AccessWeather method, RF2 freeze. I try many code change but rf2 always freeze. Please find an example of the AccessWeather method. Code: bool ExampleInternalsPlugin::AccessWeather( double trackNodeSize, WeatherControlInfoV01 &info ) { if( !mEnabled || !inRealTime) return( false ); if (!weatherUpdated) { weatherUpdated = true; info.mAmbientTempK = 290; info.mCloudiness = 0; info.mET = mET + 1; info.mRaining[0][0] = 0; info.mRaining[0][1] = 0; info.mRaining[0][2] = 0; info.mRaining[1][0] = 0; info.mRaining[1][1] = 0; info.mRaining[1][2] = 0; info.mRaining[2][0] = 0; info.mRaining[2][1] = 0; info.mRaining[2][2] = 0; info.mWindMaxSpeed=3; //std::fill_n(info.mExpansion, 512, 0x00); return true; } return false; }
I will give it a go today and let you know what I find. I did notice something in the comments which was a little confusing: Code: // mRaining[1][1] is at the origin (2013.12.19 - and currently the only implemented node), while the others // are spaced at <trackNodeSize> meters where <trackNodeSize> is the maximum absolute value of a track vertex // coordinate (and is passed into the API call). If I am reading that comment correctly, he is saying that mRaining[1][1] is the only node you can change. Maybe because you are setting other nodes it causes it to crash?
I tried it also in my many tests. No change, still freeze... Thanks to try and wainting your feedback. Launch RF2 in windowed mode, or you will be freezed if the freeze occurs (and you will need to hard shutdonw your PC).
Sorry. I haven't had a chance. I have been messing with the replay controls. I will try to get to it this weekend.
Same xxxx happened to me. Regardless of whether change WeatherControlInfoV01 or not, returning true cause freeze every time.
ISI, could you confirm there is a bug, and it is useless to continue testing ? (avoiding me wasting time on it) Thanks
It solved... When plugin loaded by client (rFactor2.exe), returning true in AccessWeather causes freeze. When plugin loaded by server (rFactor2 Dedicated.exe), returning true in AccessWeather works fine. So, you should add some code to detect which executable running, and make your AccessWeather to runs on server only. This behavior is OK for my purpose (I'm going to develop server plugin), but it will not be OK for some people. Sorry for my bad english.
palm3r, Did you succeed see a visual impact when changing mCloudiness ? It seems that "mCloudiness" is never taken into account and only autocalculated using "mRaining" So i cannot have cloud without rain. Do you confirm ?
When sunny weather, mCloudiness does not show changes. But when rain starts, suddenly clouds appears. Now mCloudiness and mRaining seems associated. I hope they works independently (for showing clouds as sign of rain).
Normally, how it should work: - you have mCloudiness that represents the overall cloud coverage - mRaining (for now, only [1][1] is taken into account) is use to calculate a minimal cloud coverage corresponding to the rain intensity) --> then if the minimal cloud coverage is greater than mCloudiness, then the cloud coverage used is the computed minimal cloud coverage, else it is mCloudiness Actually, mCloudiness is not taken into account because it seems that thecomputed cloud coverage based on rain intensity is always used (so if there is no rain we have only a clear sky) Hope the new plugin weather feature will be enhanced and fixed at each build.