Game Development Community

Disable Swimming

by Walker Twyman · in Torque 3D Professional · 03/16/2011 (10:01 am) · 2 replies

I noticed that in T3D that swimming is enabled by default. While I am sure there are a large number of people that like it, I was wondering if there was a simple way to disable it. I don't mind leaving the coding/functionality in the engine (I might even use it in the future, who knows). Perhaps there is a place in the source or script where I can disable it easily? Thanks in advance!

#1
03/16/2011 (11:30 am)
In player::updateMove() locate

bool swimming = mWaterCoverage > 0.65f;      

      if ( swimming != mSwimming )
      {
         if ( !isGhost() )
         {
            String buf = swimming ? "onStartSwim" : "onStopSwim";
            Con::executef( mDataBlock, buf, scriptThis() );
         }

         mSwimming = swimming;
      }

and replace with

mSwimming = false;
#2
03/16/2011 (11:32 am)
Much appreciated. Thanks for the quick reply!