Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#6 patch for crashbug in lgeneral-1.2beta-12

closed-fixed
nobody
None
5
2007-09-24
2007-09-03
Triple Entendre
No

map.c:

606,607c606,622
< map_add_unit_move_mask_rec(unit,unit->x,unit->y,0,unit->prop.mov,0);
< map_add_unit_move_mask_rec(unit,unit->x,unit->y,0,unit->trsp_prop.mov,1);
---
> //begin patch: we need to consider if our range is restricted by lack of fuel -trip
> //map_add_unit_move_mask_rec(unit,unit->x,unit->y,0,unit->prop.mov,0);
> //map_add_unit_move_mask_rec(unit,unit->x,unit->y,0,unit->trsp_prop.mov,1);
> int maxpoints = unit->prop.mov;
> if (unit->cur_fuel < maxpoints) {
> maxpoints = unit->cur_fuel;
> //printf("limiting movement because fuel = %d\n", unit->cur_fuel);
> }
> map_add_unit_move_mask_rec(unit,unit->x,unit->y,0,maxpoints,0);
> /* fix for crashing when don't have enough fuel to use the land transport's full range -trip */
> maxpoints = unit->trsp_prop.mov;
> if (unit->cur_fuel < maxpoints) {
> maxpoints = unit->cur_fuel;
> //printf("limiting expansion of movement via transport because fuel = %d\n", unit->cur_fuel);
> }
> map_add_unit_move_mask_rec(unit,unit->x,unit->y,0,maxpoints,1);
> //end of patch -trip

Discussion

  • Michael Speck
    Michael Speck
    2007-09-24

    • status: open --> closed-fixed
     
  • Michael Speck
    Michael Speck
    2007-09-24

    Logged In: YES
    user_id=59991
    Originator: NO

    applied. thanks!