Skip to content

Instantly share code, notes, and snippets.

@SamuXarick
Created December 31, 2023 21:20
Show Gist options
  • Save SamuXarick/f58c829f072c28733ea0b35a6a96a384 to your computer and use it in GitHub Desktop.
Save SamuXarick/f58c829f072c28733ea0b35a6a96a384 to your computer and use it in GitHub Desktop.
RemoveOrderFromAllVehicles - Simplify these checks into 1 line
if (owner == OWNER_NONE && type == OT_GOTO_WAYPOINT && vtype != VEH_SHIP) continue;
if (owner == OWNER_NONE && type == OT_GOTO_STATION && vtype != VEH_SHIP && vtype != VEH_AIRCRAFT) continue;
if (owner == c->index && type == OT_GOTO_WAYPOINT && vtype != VEH_TRAIN) continue;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment