Revision: 2777 http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=2777&view=rev Author: rorthomas Date: 2012-06-05 10:34:19 +0000 (Tue, 05 Jun 2012) Log Message: ----------- fixed water physics not working
Modified Paths: -------------- trunk/source/main/physics/Beam.cpp trunk/source/main/physics/BeamData.h trunk/source/main/physics/BeamForcesEuler.cpp trunk/source/main/physics/input_output/SerializedRig.cpp Modified: trunk/source/main/physics/Beam.cpp =================================================================== --- trunk/source/main/physics/Beam.cpp 2012-06-05 09:59:40 UTC (rev 2776) +++ trunk/source/main/physics/Beam.cpp 2012-06-05 10:34:19 UTC (rev 2777) @@ -1677,6 +1677,7 @@ void Beam::resetPosition(float px, float pz, bool setI, float miny) { if (!gEnv->terrainManager->getHeightFinder()) return; + Water *water = gEnv->terrainManager->getWater(); // horizontal displacement Vector3 offset = Vector3(px, -iPosition.y, pz) - nodes[0].AbsPosition; for (int i=0; i<free_node; i++) Modified: trunk/source/main/physics/BeamData.h =================================================================== --- trunk/source/main/physics/BeamData.h 2012-06-05 09:59:40 UTC (rev 2776) +++ trunk/source/main/physics/BeamData.h 2012-06-05 10:34:19 UTC (rev 2777) @@ -928,7 +928,7 @@ int trucknum; Skin *usedSkin; Buoyance *buoyance; - Water *water; + //Water *water; int driveable; BeamEngine *engine; int hascommands; Modified: trunk/source/main/physics/BeamForcesEuler.cpp =================================================================== --- trunk/source/main/physics/BeamForcesEuler.cpp 2012-06-05 09:59:40 UTC (rev 2776) +++ trunk/source/main/physics/BeamForcesEuler.cpp 2012-06-05 10:34:19 UTC (rev 2777) @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>. */ +#include "RoRPrerequisites.h" #include "AeroEngine.h" #include "AirBrake.h" #include "Airfoil.h" @@ -36,6 +37,7 @@ #include "ScrewProp.h" #include "SoundScriptManager.h" #include "Water.h" +#include "TerrainManager.h" extern float mrtime; @@ -45,6 +47,9 @@ { Beam** trucks = BeamFactory::getSingleton().getTrucks(); int numtrucks = BeamFactory::getSingleton().getTruckCount(); + Water *water = 0; + if(gEnv->terrainManager) + water = gEnv->terrainManager->getWater(); // do not calculate anything if we are going to get deleted if (deleting) return; Modified: trunk/source/main/physics/input_output/SerializedRig.cpp =================================================================== --- trunk/source/main/physics/input_output/SerializedRig.cpp 2012-06-05 09:59:40 UTC (rev 2776) +++ trunk/source/main/physics/input_output/SerializedRig.cpp 2012-06-05 10:34:19 UTC (rev 2777) @@ -271,7 +271,6 @@ enable_wheel2=true; //BSETTING("Enhanced wheels"); engine=0; - water=0; hascommands=0; hashelp=0; cinecameranodepos[0]=-1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Rigsofrods-devel mailing list Rigsofrods-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel