wt nach abladen respawnen
This commit is contained in:
@@ -263,7 +263,8 @@ namespace ReallifeGamemode.Server.Events
|
|||||||
}
|
}
|
||||||
|
|
||||||
nearestBehindVehiclePoint.vehicle.RemoveMarkerBehind();
|
nearestBehindVehiclePoint.vehicle.RemoveMarkerBehind();
|
||||||
|
ServerVehicle sVeh = VehicleManager.GetServerVehicleFromVehicle(vehicle);
|
||||||
|
sVeh.Spawn(vehicle);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
foreach (var v in vehicleItems)
|
foreach (var v in vehicleItems)
|
||||||
|
|||||||
@@ -893,14 +893,15 @@ namespace ReallifeGamemode.Server.Managers
|
|||||||
|
|
||||||
public static ServerVehicle GetServerVehicleFromVehicle(Vehicle veh, DatabaseContext dbContext = null)
|
public static ServerVehicle GetServerVehicleFromVehicle(Vehicle veh, DatabaseContext dbContext = null)
|
||||||
{
|
{
|
||||||
|
if (veh == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
dbContext = dbContext ?? new DatabaseContext();
|
dbContext = dbContext ?? new DatabaseContext();
|
||||||
|
|
||||||
foreach (KeyValuePair<int, NetHandle> pair in _serverVehicles)
|
foreach (KeyValuePair<int, NetHandle> pair in _serverVehicles)
|
||||||
{
|
{
|
||||||
if (veh == null)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pair.Value == veh.Handle)
|
if (pair.Value == veh.Handle)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user