Permalink
Browse files

Fixed vehicles not duplicating generic stuff

Needs to do some generics.
  • Loading branch information...
1 parent 9d0ac48 commit cbf36e17fc877a7082650550be65829caffb1220 @robotboy655 robotboy655 committed May 18, 2014
Showing with 7 additions and 5 deletions.
  1. +7 −5 garrysmod/gamemodes/sandbox/gamemode/commands.lua
@@ -756,13 +756,15 @@ end
concommand.Add( "gm_spawnswep", function( ply, cmd, args ) Spawn_Weapon( ply, args[1] ) end )
-local function MakeVehicle( Player, Pos, Ang, Model, Class, VName, VTable )
+local function MakeVehicle( Player, Pos, Ang, Model, Class, VName, VTable, data )
if (!gamemode.Call( "PlayerSpawnVehicle", Player, Model, VName, VTable )) then return end
local Ent = ents.Create( Class )
if (!Ent) then return NULL end
+ duplicator.DoGeneric( Ent, data )
+
Ent:SetModel( Model )
-- Fill in the keyvalues if we have them
@@ -795,10 +797,10 @@ local function MakeVehicle( Player, Pos, Ang, Model, Class, VName, VTable )
end
-duplicator.RegisterEntityClass( "prop_vehicle_jeep_old", MakeVehicle, "Pos", "Ang", "Model", "Class", "VehicleName", "VehicleTable" )
-duplicator.RegisterEntityClass( "prop_vehicle_jeep", MakeVehicle, "Pos", "Ang", "Model", "Class", "VehicleName", "VehicleTable" )
-duplicator.RegisterEntityClass( "prop_vehicle_airboat", MakeVehicle, "Pos", "Ang", "Model", "Class", "VehicleName", "VehicleTable" )
-duplicator.RegisterEntityClass( "prop_vehicle_prisoner_pod", MakeVehicle, "Pos", "Ang", "Model", "Class", "VehicleName", "VehicleTable" )
+duplicator.RegisterEntityClass( "prop_vehicle_jeep_old", MakeVehicle, "Pos", "Ang", "Model", "Class", "VehicleName", "VehicleTable", "Data" )
+duplicator.RegisterEntityClass( "prop_vehicle_jeep", MakeVehicle, "Pos", "Ang", "Model", "Class", "VehicleName", "VehicleTable", "Data" )
+duplicator.RegisterEntityClass( "prop_vehicle_airboat", MakeVehicle, "Pos", "Ang", "Model", "Class", "VehicleName", "VehicleTable", "Data" )
+duplicator.RegisterEntityClass( "prop_vehicle_prisoner_pod", MakeVehicle, "Pos", "Ang", "Model", "Class", "VehicleName", "VehicleTable", "Data" )
--[[---------------------------------------------------------

0 comments on commit cbf36e1

Please sign in to comment.