The International Simutrans Forum

Development => Extension Requests => Topic started by: asaphxiix on January 20, 2013, 02:31:04 PM

Title: city bridges to be created as unowned
Post by: asaphxiix on January 20, 2013, 02:31:04 PM
Hello,

Currently, while city roads are unowned, bridges within the city are created as public property and cannot be modified in multiplayer etc.

Assuming this isn't intentional, might it be changed so they are created as unowned?

Thanks!
Title: Re: city bridges to be created as unowned
Post by: prissi on January 20, 2013, 07:10:54 PM
No bridges need a owner (at least it was such still the last time I tested). This is intentional.
Title: Re: city bridges to be created as unowned
Post by: asaphxiix on January 21, 2013, 09:26:00 AM
thank prissi, i'm not sure I understand - currently the bridges in the cities have an owner - the public player - so they cannot be modified by another player. Is this what you meant to say?

I wonder what is the logic behind this.
Title: Re: city bridges to be created as unowned
Post by: Ters on January 21, 2013, 04:36:25 PM
I think he meant that they must have an owner and thus can't be unowned like city roads. (Bridges are conceptually more than just road.) There are no tools in Simutrans to change the owner of something that I'm aware of, except to public player.
Title: Re: city bridges to be created as unowned
Post by: asaphxiix on January 21, 2013, 04:54:48 PM
i see now! thanks :)
Title: Re: city bridges to be created as unowned
Post by: Dwachs on January 21, 2013, 08:12:31 PM
here is a patch. It is mostly trivial: removing some checks, which imho are unnecessary. I could not find anything wrong with ownerless city bridges.
Title: Re: city bridges to be created as unowned
Post by: prissi on January 21, 2013, 09:14:33 PM
I really wonder why the patch works. add_maintenance called with sp=NULL (of the way) will lead to sp->maintenae+= with sp =NULL while the current code check for no owner and just does nothing.
Title: Re: city bridges to be created as unowned
Post by: Dwachs on January 22, 2013, 06:39:31 AM
add_maintenance itself checks for valid pointer ;)
Title: Re: city bridges to be created as unowned
Post by: Dwachs on February 01, 2013, 01:39:58 PM
this is now changed in r6312: cities will create bridges without owner, so players can delete them
Title: Re: city bridges to be created as unowned
Post by: asaphxiix on February 01, 2013, 01:57:01 PM
nice! thank you :)