Author Topic: Steering Auto Return turns itself off  (Read 1622 times)

I really do not understand why this is, but sometimes, the steering auto-return on my Parkour Physics Vehicle just stops working. It does work sometimes, so I figure it's not the actual datablock code.

I have actually noticed that it turns itself back on temporarily about 20 seconds after I execute it, before turning itself back off again.


Steering auto return is client-sided

Steering auto return is client-sided
No, it's not. You only think it is b/c you don't code. You code it into your vehicle, or you don't. If you don't, steering auto-return can be on client-side all you want, but it won't do anything.

No, it's not. You only think it is b/c you don't code.

Ouch.

No, it's not. You only think it is b/c you don't code. You code it into your vehicle, or you don't. If you don't, steering auto-return can be on client-side all you want, but it won't do anything.

I'm not sure, but I think steering auto-return indeed is client-sided. The server simply tells the client the properties you specify in your vehicle, then the client handles the rest. That's also the cause for the "Disable Steering Auto-Return" or something option on the client.

Okay well, it could also be the client telling the server "I don't want your silly auto-return", but it's still a possibility. I don't have Blockland's source code, obviously, so I can't check.

Steering Auto-Return is enabled in my Advanced Options. And as I said previously, it works for a few seconds after I execute the script, before it stops working again. All other vehicles have Steering Auto-Return just fine. Now do you understand? Here, I'll show you the datablock code:
Code: [Select]
datablock WheeledVehicleData(ParkourPhysicsVehicle)
{
//tagged fields
doSimpleDismount = false; //just unmount the player, dont look for a free space
maxDismountDist = 5;

   numMountPoints = 1;

   category = "Vehicles";
   shapeFile = "add-ons/Item_skis/skiVehicle.dts";
   emap = true;

   maxDamage = 10.00;
   destroyedLevel = 10.00;

   uiName = "";
   rideable = false;

   maxSteeringAngle = 1.800;  // Maximum steering angle, should match animation
   tireEmitter = ParkourPhysicsEmitter; // All the tires use the same dust emitter

   // 3rd person camera settings
   cameraRoll = false;         // Roll the camera with the vehicle?
   cameraMaxDist = 7.5;         // Far distance from vehicle
   cameraOffset = 4.4;        // Vertical offset from camera mount point
   cameraLag = 5.0;           // Velocity lag of camera
   cameraDecay = 1.75;  //0.75;      // Decay per sec. rate of velocity lag
   cameraTilt = 0.3201; //tilt adjustment for camera: ~20 degrees down

   // Rigid Body
   mass = 300;
   density = 5.0;
   massCenter = "0 0 0";    // Center of mass for rigid body
   massBox = "1.5 1.5 1.5";         // Size of box used for moment of inertia,
                              // if zero it defaults to object bounding box
   drag = 0.2; //was 0.8                // Drag coefficient
   bodyFriction = 2.00; //was 0.21
   bodyRestitution = 0.2; //was 0.2
   minImpactSpeed = 0;        // Impacts over this invoke the script callback
   softImpactSpeed = 3;       // Play SoftImpact Sound
   hardImpactSpeed = 10;      // Play HardImpact Sound
   integration = 4;           // Physics integration: TickSec/Rate
   collisionTol = 0.25;        // Collision distance tolerance
   contactTol = 0.000000000000000000000001;          // Contact velocity tolerance
   justcollided = 0;

isSled = true; //if its a sled, the wing surfaces dont work unless its on the ground

   // Engine
   engineTorque = 3500;       // Engine power
   engineBrake = 25;         // Braking when throttle is 0
   brakeTorque = 80000;        // When brakes are applied
   maxWheelSpeed = 30;        // Engine scale by current speed / max speed

forwardThrust = 00; //500
reverseThrust = 00;
lift = 00;
maxForwardVel = 10;
maxReverseVel = 10;
horizontalSurfaceForce = 50; //50
verticalSurfaceForce = 50;
rollForce = 7500; //was 2000
yawForce = 10000; //was 2000
pitchForce = 40000; //was 5000
rotationalDrag = 5; //1
stallSpeed = 1;

steeringAutoReturn = true; //this allows the client-side Steering Auto-Return option to work
steeringAutoReturnRate = 10.0;
steeringAutoReturnMaxSpeed = 10.0;
steeringUseStrafeSteering = false; //this vehicle has pitch control, so we can't use strafe steering


   // Energy
   maxEnergy = 100;
   jetForce = 3000;
   minJetEnergy = 30;
   jetEnergyDrain = 2;

   hardImpactSound = Impact1BSound;

speedDamageScale = 1.04;
collDamageThresholdVel = 2.0;
collDamageMultiplier   = 0.02;
};

No, Hata. Steering auto return is entirely clientsided. There's absolutely no reason for it to be server-sided, it would result in a delayed return that would make no sense. I /do/ have Torque's source code, so I'll prove it just for you.

I /do/ have Torque's source code, so I'll prove it just for you.
Hax
How

Code: [Select]
void Vehicle::updateMove(const Move* move)
{
   mDelta.move = *move;

   // Image Triggers
   if (mDamageState == Enabled) {
      setImageTriggerState(0,move->trigger[0]);
      setImageTriggerState(1,move->trigger[1]);
   }

   // Throttle
   if(!mDisableMove)
      mThrottle = move->y;

   // Steering
   if (move != &NullMove) {
      F32 y = move->yaw;
      mSteering.x = mClampF(mSteering.x + y,-mDataBlock->maxSteeringAngle,
                            mDataBlock->maxSteeringAngle);
      F32 p = move->pitch;
      mSteering.y = mClampF(mSteering.y + p,-mDataBlock->maxSteeringAngle,
                            mDataBlock->maxSteeringAngle);
   }
   else {
      mSteering.x = 0;
      mSteering.y = 0;
   }

   // Jetting flag
   if (move->trigger[3]) {
      if (!mJetting && getEnergyLevel() >= mDataBlock->minJetEnergy)
         mJetting = true;
      if (mJetting) {
         F32 newEnergy = getEnergyLevel() - mDataBlock->jetEnergyDrain;
         if (newEnergy < 0) {
            newEnergy = 0;
            mJetting = false;
         }
         setEnergyLevel(newEnergy);
      }
   }
   else
      mJetting = false;
}