Fix the issue where tons of special points appear outdoors
This commit is contained in:
@@ -2836,12 +2836,14 @@ bool outd_move_party(location destination,bool forced)
|
||||
// Check if can fly over
|
||||
|| ((flying() == true) &&
|
||||
(scenario.ter_types[ter].fly_over == true)) ) {
|
||||
// TODO: This should only happen if you're actually on a horse
|
||||
if (scenario.ter_types[ter].special == TER_SPEC_DAMAGING || scenario.ter_types[ter].special == TER_SPEC_DANGEROUS) {
|
||||
ASB("Your horses quite sensibly refuse.");
|
||||
return false;
|
||||
}
|
||||
univ.party.direction = set_direction(univ.party.p_loc, destination);
|
||||
|
||||
// TODO: But I though you automatically landed when entering?
|
||||
if ((flying() == true) && (scenario.ter_types[ter].special == TER_SPEC_TOWN_ENTRANCE)) {
|
||||
add_string_to_buf("Moved: You have to land first. ");
|
||||
return false;
|
||||
|
||||
@@ -493,6 +493,7 @@ void draw_fields(location where){
|
||||
if(party_can_see(where) >= 6) return;
|
||||
location where_draw(4 + where.x - center.x, 4 + where.y - center.y);
|
||||
if(is_out()){
|
||||
where = global_to_local(where);
|
||||
if(univ.out.outdoors[univ.party.i_w_c.x][univ.party.i_w_c.y].special_spot[where.x][where.y])
|
||||
Draw_Some_Item(fields_gworld,calc_rect(4,0),terrain_screen_gworld,where_draw,1,0);
|
||||
return;
|
||||
|
||||
@@ -93,12 +93,13 @@ location global_to_local(location global)
|
||||
location local;
|
||||
|
||||
local = global;
|
||||
if (univ.party.i_w_c.x == 1)
|
||||
if(global.x >= 48)
|
||||
local.x = local.x - 48;
|
||||
if (univ.party.i_w_c.y == 1)
|
||||
if(global.y >= 48)
|
||||
local.y = local.y - 48;
|
||||
return local;
|
||||
}
|
||||
// TODO: I fixed the above function, but it's impossible to fix this one without adding a parameter (which would be i_w_c)
|
||||
location local_to_global(location local)
|
||||
{
|
||||
location global;
|
||||
|
||||
@@ -1291,6 +1291,7 @@ void erase_out_specials()
|
||||
|
||||
}
|
||||
}
|
||||
// TODO: Next four lines aren't needed, but first would need to change loop variables
|
||||
}
|
||||
for (i = 0; i < 2; i++)
|
||||
for (j = 0; j < 2; j++)
|
||||
@@ -1312,16 +1313,9 @@ void erase_out_specials()
|
||||
univ.out.outdoors[i][j].special_locs[k].x = 100;
|
||||
}
|
||||
|
||||
// switch (scenario.ter_types[univ.out.outdoors[i][j].terrain[where.x][where.y]].picture) {
|
||||
// case 207: univ.out[48 * i + where.x][48 * j + where.y] = 0; break;
|
||||
// case 208: univ.out[48 * i + where.x][48 * j + where.y] = 170; break;
|
||||
// case 209: univ.out[48 * i + where.x][48 * j + where.y] = 210; break;
|
||||
// case 210: univ.out[48 * i + where.x][48 * j + where.y] = 217; break;
|
||||
// case 211: univ.out[48 * i + where.x][48 * j + where.y] = 2; break;
|
||||
// case 212: univ.out[48 * i + where.x][48 * j + where.y] = 36; break;
|
||||
// }
|
||||
// TODO: I'm not quite sure if this should be within this block
|
||||
univ.out.outdoors[i][j].special_spot[where.x][where.y] = false;
|
||||
}
|
||||
univ.out.outdoors[i][j].special_spot[where.x][where.y] = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user