Loading

Revision differences

Old revision #pudp2meukNew revision #p7qjxwaex
6  6  
7    /* No need to dirty company windows here, we'll redraw the whole screen anyway. */  7    /* No need to dirty company windows here, we'll redraw the whole screen anyway. */  
8    if (is_lock_middle) Company::Get(old_owner)->infrastructure.water -= 3 * LOCK_DEPOT_TILE_FACTOR; // Lock has three parts.  8    if (is_lock_middle) Company::Get(old_owner)->infrastructure.water -= 3 * LOCK_DEPOT_TILE_FACTOR; // Lock has three parts.  
9    if (GetWaterClass(tile) == WATER_CLASS_CANAL && is_lock_middle) {  9   
10        Company::Get(old_owner)->infrastructure.water--;    
11    }    
12    if (new_owner != INVALID_OWNER) {  10    if (new_owner != INVALID_OWNER) {  
  11        if (GetWaterClass(tile) == WATER_CLASS_CANAL && is_lock_middle) {  
  12            Company::Get(old_owner)->infrastructure.water--;  
  13        }  
13        if (is_lock_middle) Company::Get(new_owner)->infrastructure.water += 3 * LOCK_DEPOT_TILE_FACTOR; // Lock has three parts.  14        if (is_lock_middle) Company::Get(new_owner)->infrastructure.water += 3 * LOCK_DEPOT_TILE_FACTOR; // Lock has three parts.  
14        if (GetWaterClass(tile) == WATER_CLASS_CANAL && is_lock_middle) {  15        if (GetWaterClass(tile) == WATER_CLASS_CANAL && is_lock_middle) {  
15            Company::Get(new_owner)->infrastructure.water++;  16            Company::Get(new_owner)->infrastructure.water++;