Fix monsters above 255 being unsummonable
Thanks to @fosnola for the fix.
This commit is contained in:
@@ -1187,7 +1187,8 @@ void activate_monsters(short code,short /*attitude*/) {
|
|||||||
|
|
||||||
mon_num_t get_summon_monster(short summon_class) {
|
mon_num_t get_summon_monster(short summon_class) {
|
||||||
for(short i = 0; i < 200; i++) {
|
for(short i = 0; i < 200; i++) {
|
||||||
short j = get_ran(1,0,255);
|
// this assumes that there is at least one monster
|
||||||
|
short j = get_ran(1,0,univ.scenario.scen_monsters.size()-1);
|
||||||
if(univ.scenario.scen_monsters[j].summon_type == summon_class) {
|
if(univ.scenario.scen_monsters[j].summon_type == summon_class) {
|
||||||
return j;
|
return j;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user