Ignore:
Timestamp:
11/09/16 04:35:36 (8 years ago)
Author:
sz
Message:

Updated to avoid using deprecated API (Creature.moveAbs, size_x/y/z, pos_x/y/z, energ0)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • experiments/frams/capture-the-flag/data/scripts/capture-the-flag.expdef

    r485 r632  
    2121function onExpDefLoad()
    2222{
    23         GenePools.clear();
    24         Populations.clear();
    25        
    2623        World.wrldsiz = 100;
    2724        World.wrldtyp = 0;
     
    5653function onBorn(cr)
    5754{
    58   cr.energ0 = 100;
    59   cr.energy = cr.energ0;
     55  cr.energy0 = 100;
     56  cr.energy = cr.energy0;
    6057}
    6158
     
    227224                        else if (crY > -5 && crY < 0)
    228225                                crY = -5;
    229                         cr.moveAbs(flagsX[team] + crX, flagsY[team] + crY, 0);
     226                        cr.locationSetBboxLow(flagsX[team] + crX, flagsY[team] + crY, 0);
    230227                        cr.data->holding = 0;
    231228                        cr.data->flag = 0;
     
    262259                        var cr=pop[player];
    263260                        if (cr.data->holding == 1){
    264                                 cr.data->flag.moveAbs(cr.pos_x, cr.pos_y, cr.size_z + 1);
     261                                cr.data->flag.locationSetBboxLow(cr.bboxLow.x, cr.bboxLow.y, cr.bboxSize.z + 1);
    265262                        }
    266263                }
     
    283280
    284281function placeFlag(flag){
    285         flag.moveAbs(flagsX[flag.population.index], flagsY[flag.population.index], 0);
     282        flag.locationSetBboxLow(flagsX[flag.population.index], flagsY[flag.population.index], 0);
    286283}
    287284
Note: See TracChangeset for help on using the changeset viewer.