1
0
Fork 0

Multiplayer: Do not interpolate integer values:

Jean Pellotier, 2018-01-02 : we don't want interpolation for integer values, they are mostly used
for non linearly changing values (e.g. transponder etc ...)
ref: https://sourceforge.net/p/flightgear/codetickets/1885/
This commit is contained in:
Richard Harrison 2018-01-04 03:51:00 +01:00
parent 4d36082398
commit 2f84be16f9

View file

@ -342,9 +342,10 @@ void FGAIMultiplayer::update(double dt)
case props::INT: case props::INT:
case props::BOOL: case props::BOOL:
case props::LONG: case props::LONG:
ival = (int)(0.5 + (1 - tau)*((double)(*prevPropIt)->int_value) + // Jean Pellotier, 2018-01-02 : we don't want interpolation for integer values, they are mostly used
tau*((double)(*nextPropIt)->int_value)); // for non linearly changing values (e.g. transponder etc ...)
pIt->second->setIntValue(ival); // fixes: https://sourceforge.net/p/flightgear/codetickets/1885/
pIt->second->setIntValue((*nextPropIt)->int_value);
//cout << "Int: " << ival << "\n"; //cout << "Int: " << ival << "\n";
break; break;
case props::FLOAT: case props::FLOAT: