News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

Powerlines and public player

Started by jamespetts, March 17, 2012, 02:49:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jamespetts

I hope that this is now the right place to put requests for information as to how a particular part of the code works following the forum reorganisation - apologies in advance if I have erred in my posting location.

I am trying to fix a bug in Experimental relating to access rights and power lines, and wonder whether anyone can tell me where in the code provision is made for power lines to connect to public player power lines but not to other players' power lines? In other words, which bit of the code checks whether a potentially connecting power line is public player or not, refuses connexion if it is not, and allows connexion if it is? I should be very grateful for any assistance.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

kierongreen

dings/leitung2.cc:gimme_neighbours(leitung_t **conn)

...
            leitung_t *lt = gr->get_leitung();
            if(  lt  ) {
                const spieler_t *owner = get_besitzer();
                const spieler_t *other = lt->get_besitzer();
                const spieler_t *super = welt->get_spieler(1);
                if (owner==other  ||  owner==super  ||  other==super) {
....

jamespetts

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.