From f793e98212974955fef52e7cb68e9ee6e51c8e3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com> Date: Sun, 23 Jun 2024 19:52:34 +0300 Subject: [PATCH] GetNWInt returns 0 despite having nil as default, compensate --- gamemode/sh_vehicles.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gamemode/sh_vehicles.lua b/gamemode/sh_vehicles.lua index 9fb82e00..92ffa737 100644 --- a/gamemode/sh_vehicles.lua +++ b/gamemode/sh_vehicles.lua @@ -720,7 +720,11 @@ function GM:VehicleGetType(vehicle) end if vehicle:GetNWBool("IsPassengerSeat", false) then return VEHICLE_PASSENGER end - return vehicle:GetNWInt("LambdaVehicleType", nil) + local res = vehicle:GetNWInt("LambdaVehicleType", -1) + if res == -1 then + return nil + end + return res end function GM:VehicleIsPassengerSeat(vehicle)