Hi,
anyone seeing any risk in this patch? If not, I would like to ask to put
it into cvs.
Maik
Maik Justus schrieb am 14.11.2006 00:19:
> Hi,
> I've checked, that I still need this patch to avoid a freeze of the
> MP-Scenery after reset. Can someone confirm, that other users (on
> msvc?) do not have this problem (freezing of the other MP-aircrafts
> after reset)?
> Maik
> Maik Justus schrieb am 01.10.2006 15:11:
>> Hi,
>>
>> this effect is caused by the
>> globals->set_sim_time_sec( 0.0 );
>> call when resetting. After this the stored time offset "mTimeOffset"
>> in AIMultiplayer.cxx is wrong and it needs much time this offset is
>> corrected.
>> I don't know, why this bug is only visible in windows (at least it is
>> not reported for other os).
>>
>> Please find enclosed a patch for AIMultiplayer.cxx, which detects and
>> corrects large time offsets. (I only tested it very shortly, but i t
>> seems to work (at least as a workaround)).
>>
>> Maik
>>
>>
>> Maik Justus wrote:
>>> Hi,
>>> Maik Justus wrote:
>>>
>>>> Hi,
>>>> Maik Justus wrote:
>>>> After choosing "Reset" in the File menu, all multiplayer
>>>> aircrafts stop moving.
>>> after some time the multiplayer aircrafts start moving again. I am
>>> not sure, but I could be, that this "some time" is about the
>>> duration of the last session (time since the prior reset resp.
>>> starting of flightgear to the reset).
>>>
>>>
> Index: AIMultiplayer.cxx
> ===================================================================
> RCS file: /var/cvs/FlightGear-0.9/source/src/AIModel/AIMultiplayer.cxx,v
> retrieving revision 1.10
> diff -u -p -r1.10 AIMultiplayer.cxx
> --- AIMultiplayer.cxx 8 Aug 2006 17:57:33 -0000 1.10
> +++ AIMultiplayer.cxx 1 Oct 2006 12:47:50 -0000
> @@ -129,7 +129,7 @@ void FGAIMultiplayer::update(double dt)
> mTimeOffset = curentPkgTime - curtime - lag;
> } else {
> double offset = curentPkgTime - curtime - lag;
> - if (!mAllowExtrapolation && offset + lag < mTimeOffset) {
> + if ((!mAllowExtrapolation && offset + lag < mTimeOffset)||(offset - 10 >
> mTimeOffset)) {
> mTimeOffset = offset;
> SG_LOG(SG_GENERAL, SG_DEBUG, "Resetting time offset adjust system to "
> "avoid extrapolation: time offset = " << mTimeOffset);
>
> ------------------------------------------------------------------------
>
>
-------------------------------------------------------------------------
SF.net email is sponsored by: A Better Job is Waiting for You - Find it Now.
Check out Slashdot's new job board. Browse through tons of technical jobs
posted by companies looking to hire people just like you.
http://jobs.slashdot.org/
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel