Skip to content

Commit

Permalink
Changed vehicle deaths to lock trunks unless in water
Browse files Browse the repository at this point in the history
  • Loading branch information
Southclaws committed Jul 25, 2016
1 parent ca3b3b1 commit f9d30ab
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion BUILD_NUMBER
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1150
1154
15 changes: 11 additions & 4 deletions gamemodes/sss/core/vehicle/core.pwn
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,18 @@ stock DestroyWorldVehicle(vehicleid, bool:perma = false)

GetVehiclePos(vehicleid, x, y, z);

if(!IsPosInWater(x, y, z))
SetVehicleExternalLock(vehicleid, false);
veh_Data[vehicleid][veh_key] = 0;

if(!IsPosInWater(x, y, z - 1.0))
{
CreateDynamicObject(18690, x, y, z - 2.0, 0.0, 0.0, 0.0);
SetVehicleTrunkLock(vehicleid, true);
}
else
{
SetVehicleTrunkLock(vehicleid, false);
}
}

return 1;
Expand Down Expand Up @@ -861,9 +871,6 @@ public OnVehicleSpawn(vehicleid)

veh_Data[vehicleid][veh_health] = 300.0;
ResetVehicle(vehicleid);
SetVehicleExternalLock(vehicleid, false);
SetVehicleTrunkLock(vehicleid, false);
veh_Data[vehicleid][veh_key] = 0;

DestroyWorldVehicle(vehicleid);
}
Expand Down

0 comments on commit f9d30ab

Please sign in to comment.