joaofarias / csl-traffic

A WIP mod for Cities: Skylines to improve traffic.
91 stars 30 forks source link

Merge from "Multi Track Station Enabler" #16

Closed ghost closed 9 years ago

ghost commented 9 years ago

If either Shift key is pressed, it will skip checking for the building that the segment belongs to. That's a pretty small code change.

joaofarias commented 9 years ago

Hi there! Thanks for the pull. I will merge it after I commit my changes because I'm working on the master (I know, I shouldn't :s ).

I want to talk with you about how you detour the method in your mod, if you have some time. I'll get in touch through steam later today.

Quick question, though: any reason for using the bitwise operator instead of the logical operator when checking if any shift is pressed?

ghost commented 9 years ago

I don't think it's a bitwise operator. Since both operands are bool's, not bitfields, it would qualify as a logical operator. MSDN reference

I just realized, though, that I should use the conditional OR (||) operator, for improved efficiency.