Skip to content

Commit 83cbf3c

Browse files
committed
Remove lower bound checks for setTrainTrack
1 parent bd6f6fc commit 83cbf3c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

MTA10/mods/shared_logic/lua/CLuaFunctionDefs.Vehicle.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2056,7 +2056,7 @@ int CLuaFunctionDefs::SetTrainTrack ( lua_State* luaVM )
20562056

20572057
if ( !argStream.HasErrors () )
20582058
{
2059-
if ( ( ucTrack >= 0 ) && ( ucTrack <= 3 ) ) {
2059+
if ( ( ucTrack <= 3 ) ) {
20602060
if ( CStaticFunctionDefinitions::SetTrainTrack ( *pVehicle, ucTrack ) )
20612061
{
20622062
lua_pushboolean ( luaVM, true );

MTA10_Server/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2777,7 +2777,7 @@ int CLuaVehicleDefs::SetTrainTrack ( lua_State* luaVM )
27772777

27782778
if ( !argStream.HasErrors () )
27792779
{
2780-
if ( ( ucTrack >= 0 ) && ( ucTrack <= 3 ) ) {
2780+
if ( ( ucTrack <= 3 ) ) {
27812781
if ( CStaticFunctionDefinitions::SetTrainTrack ( pVehicle, ucTrack ) )
27822782
{
27832783
lua_pushboolean ( luaVM, true );

0 commit comments

Comments
 (0)