~ubuntu-branches/debian/squeeze/openttd/squeeze

« back to all changes in this revision

Viewing changes to src/newgrf_engine.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Matthijs Kooijman
  • Date: 2010-07-01 08:14:02 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20100701081402-98jmva0t3sqywxmi
Tags: 1.0.2-1
* [00c4efe] New upstream release 1.0.2.
* [c7b38fd] Break older openttd versions instead of Conflicting with
  them.
* [36bd61f] Bump standards version to 3.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: newgrf_engine.cpp 19300 2010-03-02 00:38:01Z rubidium $ */
 
1
/* $Id: newgrf_engine.cpp 19857 2010-05-18 21:44:47Z rubidium $ */
2
2
 
3
3
/*
4
4
 * This file is part of OpenTTD.
383
383
                case VSG_SCOPE_SELF: return object->u.vehicle.self;
384
384
                case VSG_SCOPE_PARENT: return object->u.vehicle.parent;
385
385
                case VSG_SCOPE_RELATIVE: {
 
386
                        if (object->u.vehicle.self == NULL) return NULL;
386
387
                        const Vehicle *v = NULL;
387
388
                        switch (GB(object->count, 6, 2)) {
388
389
                                default: NOT_REACHED();
512
513
        if (v == NULL) {
513
514
                /* Vehicle does not exist, so we're in a purchase list */
514
515
                switch (variable) {
515
 
                        case 0x43: return _current_company | (LiveryHelper(object->u.vehicle.self_type, NULL) << 24); // Owner information
 
516
                        case 0x43: return _current_company | (Company::IsValidAiID(_current_company) ? 0x10000 : 0) | (LiveryHelper(object->u.vehicle.self_type, NULL) << 24); // Owner information
516
517
                        case 0x46: return 0;               // Motion counter
517
518
                        case 0x47: { // Vehicle cargo info
518
519
                                const Engine *e = Engine::Get(object->u.vehicle.self_type);