From: <sv...@ww...> - 2004-12-15 09:23:47
|
Author: mkrose Date: 2004-12-15 01:23:39 -0800 (Wed, 15 Dec 2004) New Revision: 1384 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Source/Engine.cpp trunk/CSP/SimNet/PeerInfo.cpp Log: Minor fix for the engine cutoff function under linux. Bug fix in dup packet filter. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1384 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2004-12-15 09:12:50 UTC (rev 1383) +++ trunk/CSP/CSPSim/CHANGES.current 2004-12-15 09:23:39 UTC (rev 1384) @@ -1,14 +1,17 @@ Version 0.4.0 (in progress) =========================== +2004-12-14: onsight + * Minor fix for the engine cutoff function under linux. + 2004-12-13: delta - * Updated Data/XML/vehicles/aircraft/m2k/thrust.xml with more accurate + * Updated Data/XML/vehicles/aircraft/m2k/thrust.xml with more accurate m2k data. - + * Added a cutting function on the engine when aoa is too low or high. - + * Slightly moved the aircraft at startup. - + 2004-12-12: onsight * Several networking fixes, but the most relevant changes for CSPSim are: @@ -33,9 +36,9 @@ interpolating positions. 2004-12-12: delta - * Updated Data/Models/Mirage2000/m2k/model.osg and associated - textures (adding T1.jpg) by Lologramme. - + * Updated Data/Models/Mirage2000/m2k/model.osg and associated + textures (adding T1.jpg) by Lologramme. + 2004-12-05: delta * Updated CSPSim.vcproj, added SimNet to the build, cleaned up source and header directories and added a custom build step on Modified: trunk/CSP/CSPSim/Source/Engine.cpp =================================================================== --- trunk/CSP/CSPSim/Source/Engine.cpp 2004-12-15 09:12:50 UTC (rev 1383) +++ trunk/CSP/CSPSim/Source/Engine.cpp 2004-12-15 09:23:39 UTC (rev 1384) @@ -163,15 +163,13 @@ // / -pi/2 if x = -a // f(x) = | 0 if x in [-a/2,b/2] (0 < a, b) // \ b if x = b - double ret = abs(x-m_B/2) + x-m_B/2 + simdata::PI_2*(m_A/2+x - abs(m_A/2+x))/m_A; + double ret = std::abs(x-m_B/2) + x-m_B/2 + simdata::PI_2*(m_A/2+x - std::abs(m_A/2+x))/m_A; return ret; } void EngineDynamics::cut() { double alpha = b_Alpha->value(); - if (abs(alpha) > simdata::PI_2) - alpha -= simdata::sign(alpha)*simdata::PI; - if (alpha < -m_A) { + if ((std::abs(alpha) > simdata::PI_2) || (alpha < -m_A)) { m_Force = simdata::Vector3::ZERO; } else if (alpha < m_B) { Modified: trunk/CSP/SimNet/PeerInfo.cpp =================================================================== --- trunk/CSP/SimNet/PeerInfo.cpp 2004-12-15 09:12:50 UTC (rev 1383) +++ trunk/CSP/SimNet/PeerInfo.cpp 2004-12-15 09:23:39 UTC (rev 1384) @@ -268,7 +268,7 @@ if (m_duplicate_filter_low && (id >= 65536/32*3/4)) { m_duplicate_filter_low = false; memset(reinterpret_cast<char*>(m_duplicate_filter), 0, 65536/2); - } else if (!m_duplicate_filter_low && (id >= 65536/32/4)) { + } else if (!m_duplicate_filter_low && (id >= 65536/32/4) && (id < 65536/32/2)) { m_duplicate_filter_low = true; memset(reinterpret_cast<char*>(m_duplicate_filter) + 65536/2, 0, 65536/2); } |