fixed ambush size

This commit is contained in:
Zeno Rogue 2020-03-07 04:37:24 +01:00
parent 4828623960
commit 35dbeea702
2 changed files with 3 additions and 5 deletions

View File

@ -798,8 +798,8 @@ EX int size(cell *c, eItem what) {
}
EX void ambush(cell *c, eItem what) {
LATE ( ambush(c, what); )
EX void ambush(cell *c, int dogs) {
LATE ( ambush(c, dogs); )
int maxdist = gamerange();
celllister cl(c, maxdist, 1000000, NULL);
cell *c0 = c;
@ -812,7 +812,6 @@ EX void ambush(cell *c, eItem what) {
if(dh > d) c0 = cx, d = dh;
}
if(sphere) {
int dogs = size(c, what);
for(int i = cl.lst.size()-1; i>0 && dogs; i--)
if(!isPlayerOn(cl.lst[i]) && !cl.lst[i]->monst)
cl.lst[i]->monst = moHunterDog, dogs--;
@ -849,7 +848,6 @@ EX void ambush(cell *c, eItem what) {
}
}
int N = isize(around);
int dogs = size(c, what);
int gaps = dogs;
int result = dogs0;

View File

@ -80,7 +80,7 @@ EX bool collectItem(cell *c2, bool telekinesis IS(false)) {
}
if(c2->land == laHunting && c2->item && !inv::activating) {
ambush::ambush(c2, c2->item);
ambush::ambush(c2, ambush::size(c2, c2->item));
}
if(isRevivalOrb(c2->item) && multi::revive_queue.size()) {