[pkg-fgfs-crew] Bug#760077: flightgear-data-aircrafts: SenecaII: timed updates receive the total elapsed time, not delta time since last update
Ludovic Brenta
ludovic at ludovic-brenta.org
Sun Aug 31 15:32:02 UTC 2014
Package: flightgear-data-aircrafts
Version: 3.0.0-1
Severity: normal
The bug is pretty obvious in SenecaII.nas, the patch below should be
self-explanatory.
----------------------------------------------------------------------
Revision: a1938d7b46898441959a01cf7a9fc145cc724d29
Parent: 881d90681de950215bc0154cdc2d7207b044df2e
Author: Ludovic Brenta
Date: 2014-08-31T17:29:30
Branch: org.flightgear.aircraft.SenecaII
Changelog:
* Bug fix: pass the delta time since last update, not total elapsed time, to updaters.
Changes against parent 881d90681de950215bc0154cdc2d7207b044df2e
patched Nasal/SenecaII.nas
============================================================
--- Nasal/SenecaII.nas bb1eae50e10da5dfe78bdc80a25ff1bbaafc746a
+++ Nasal/SenecaII.nas 0787b6637818bae913fa8eb8862ad7a46dcde591
@@ -19,10 +19,11 @@ var timedUpdate = func {
var timeNode = props.globals.getNode( "/sim/time/elapsed-sec", 1 );
var lastRun = timeNode.getValue();
var timedUpdate = func {
- var dt = timeNode.getValue() - lastRun;
+ var now = timeNode.getValue();
foreach( var n; updateClients ) {
- n.update( dt );
+ n.update(now - lastRun);
}
+ lastRun = now;
settimer( timedUpdate, 0 );
};
-- System Information:
Debian Release: jessie/sid
APT prefers testing
APT policy: (10000, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 3.14-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
-- no debconf information
More information about the pkg-fgfs-crew
mailing list