~ubuntu-branches/debian/squeeze/simutrans/squeeze

« back to all changes in this revision

Viewing changes to besch/vehikel_besch.h

  • Committer: Bazaar Package Importer
  • Author(s): Ansgar Burchardt
  • Date: 2009-10-18 15:29:14 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20091018152914-ip7am3dx1tl27uyb
Tags: 102.2+svn2786-1
* New upstream release.
  + Refresh patches.
  + Update translations.
* debian/rules: Add get-orig-source target.
* debian/rules: Add update-translations target.
* debian/README.source: Document get-orig-source and update-translations
  targets.
* Bump Standards-Version to 3.8.3 (no changes).

Show diffs side-by-side

added added

removed removed

Lines of Context:
183
183
                return static_cast<const vehikel_besch_t *>(get_child(6 + i));
184
184
        }
185
185
 
 
186
        /* returns true, if this veh can be before the next_veh */
 
187
        bool can_lead(const vehikel_besch_t *next_veh) const
 
188
        {
 
189
                if(  nachfolger==0  ) {
 
190
                        return next_veh != 0;
 
191
                }
 
192
                for( int i=0;  i<nachfolger;  i++  ) {
 
193
                        const vehikel_besch_t *veh = (vehikel_besch_t *)get_child(6 + vorgaenger + i);
 
194
                        if(veh==next_veh) {
 
195
                                return true;
 
196
                        }
 
197
                }
 
198
                // only here if not allowed
 
199
                return false;
 
200
        }
186
201
        /* returns true, if this veh can be after the prev_veh */
187
202
        bool can_follow(const vehikel_besch_t *prev_veh) const
188
203
        {
189
204
                if(  vorgaenger==0  ) {
190
 
                        return prev_veh == 0;
 
205
                        return prev_veh != 0;
191
206
                }
192
207
                for( int i=0;  i<vorgaenger;  i++  ) {
193
208
                        const vehikel_besch_t *veh = (vehikel_besch_t *)get_child(6 + i);