Continuing to implement new steering, removed common.txt, inside functions have been moved to separate files
This commit is contained in:
@@ -1,24 +1,17 @@
|
||||
-- @include ../libs/constants.txt
|
||||
require("../libs/constants.txt")
|
||||
|
||||
SteeringController = class("SteeringController")
|
||||
|
||||
function SteeringController:initialize()
|
||||
function SteeringController:initialize(base)
|
||||
self.seat = NULL_ENTITY
|
||||
self.driver = NULL_ENTITY
|
||||
|
||||
hook.add("PlayerEnteredVehicle", "", function(ply, veh)
|
||||
if veh == self.seat then
|
||||
self.driver = ply
|
||||
end
|
||||
end)
|
||||
|
||||
hook.add("PlayerLeaveVehicle", "", function(ply, veh)
|
||||
if veh == self.seat then
|
||||
self.driver = NULL_ENTITY
|
||||
end
|
||||
end)
|
||||
self.base = base
|
||||
end
|
||||
|
||||
function SteeringController:update()
|
||||
-- print()
|
||||
|
||||
end
|
||||
|
||||
function SteeringController:setDriver(ply)
|
||||
|
||||
Reference in New Issue
Block a user