Remove Rail with signal Patch

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
RookieTycoon
Engineer
Engineer
Posts: 34
Joined: 29 Dec 2004 01:16
Location: Bandung, Indonesia

Remove Rail with signal Patch

Post by RookieTycoon »

So many ppl annoyed when they want to remove a piece of track with signal on it. so here the patch.

today i can't connect to svn. so this patch again 2021
Attachments
remove rail.diff
auto remove signal with rail Patch again 2021.
(1.03 KiB) Downloaded 208 times
User avatar
Dextro
Chief Executive
Chief Executive
Posts: 701
Joined: 12 Jan 2005 21:56
Location: Lisboa, Portugal
Contact:

Post by Dextro »

Nice :mrgreen: Can't wait to get this in the main trunk :D
Uncle Dex Says: Follow the KISS Principle!
RookieTycoon
Engineer
Engineer
Posts: 34
Joined: 29 Dec 2004 01:16
Location: Bandung, Indonesia

Post by RookieTycoon »

Nothing change... only the comment.
just upload it to sourceforge.
Attachments
remove rail.diff
(1.47 KiB) Downloaded 173 times
Conditional Zenith
Chief Executive
Chief Executive
Posts: 697
Joined: 10 Jun 2003 00:19
Location: Australia

Post by Conditional Zenith »

Just got this reject when applying this patch to r2304

rail_cmd.c.rej

Code: Select all

***************
*** 416,427 ****
   * p2 - tile direction
   */

  int32 CmdRemoveSingleRail(int x, int y, uint32 flags, uint32 p1, uint32 p2)
  {
        TileInfo ti;
        byte rail_bit = 1 << p2;
        byte m5;
        uint tile;

        SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION);

--- 416,430 ----
   * p2 - tile direction
   */

+ int32 CmdRemoveSingleSignal(int x, int y, uint32 flags, uint32 p1, uint32 p2);
+
  int32 CmdRemoveSingleRail(int x, int y, uint32 flags, uint32 p1, uint32 p2)
  {
        TileInfo ti;
        byte rail_bit = 1 << p2;
        byte m5;
        uint tile;
+       int32 cost = _price.remove_rail; ;

        SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION);
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 2 guests