special: do no call town's special outdoor, this makes the game crash...

This commit is contained in:
Laurent Alonso(fr)
2020-05-10 11:52:32 +02:00
committed by Celtic Minstrel
parent c144e83463
commit 3b2b6f63a6

View File

@@ -2082,6 +2082,10 @@ cSpecial get_node(spec_num_t cur_spec, eSpecCtxType cur_spec_type) {
}
return univ.out->specials[cur_spec];
case eSpecCtxType::TOWN:
if (is_out()) {
showError("The scenario called a town special node but it is not in town.");
return dummy_node;
}
if(cur_spec != minmax(0,univ.town->specials.size() - 1,cur_spec)) {
showError("The scenario called a town special node out of range.");
return dummy_node;