Jump to content

Pantomimed Steering Wheel


Tykvesh
  • Fixed

This new Wes buff looks great!

All jokes aside, clients can steer boats on a whim, after properly doing it once:

  • This is because SteeringWheelUser:SetSteeringWheel(nil) does not clean up self.boat
  • I enabled the experimental boat rotation for this demonstration, but it works in vanilla regardless

1417084429_GIF09-Apr-2205-16-50.gif.42a3d28f21ed215c872ea4891ff4a841.gif

Spoiler

Simple fix to this is to get rid of self.boat when using SetSteeringWheel(nil) (as it should be!)

Quote

    if steering_wheel ~= nil then
        self.inst:StartUpdatingComponent(self)
        self.inst:AddTag("steeringboat")

        self.inst.Physics:Teleport(steering_wheel.Transform:GetWorldPosition())

        self.inst:ListenForEvent("onremove", self.wheel_remove_callback, steering_wheel)

        steering_wheel.components.steeringwheel:StartSteering(self.inst)

        self.inst:ListenForEvent("stopturning", self.onstopturning, self.boat)
        self.inst:ListenForEvent("onremove", self.onboatremoved, self.boat)
    else
        if self.boat ~= nil then
            local dir_x, dir_z = self.boat.components.boatphysics:GetRudderDirection()
            self.boat.components.boatphysics:SetTargetRudderDirection(dir_x, dir_z)
            self.boat = nil
        end
    end
end


Steps to Reproduce
  1. Stop steering
  2. SendRPCToServer(RPC.SteerBoat, UnitRand(), UnitRand())
  • Thanks 1
  • Haha 2
  • Sanity 1



User Feedback


A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...