1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-12 15:26:00 +00:00

Stop Outlaws from shooting themselves when Orb of Discord is active

This commit is contained in:
Joseph C. Sible
2025-09-06 20:43:15 -04:00
parent 7c0d2649e3
commit c1711d5d7a
2 changed files with 11 additions and 0 deletions

View File

@@ -1194,6 +1194,7 @@ EX vector<cell*> gun_targets(cell *c) {
if(passable(c2, c1, P_BULLET | P_FLYING | P_MONSTER))
if(cl.add(c2)) dists.push_back(dists[i] + 1);
}
cl.remove(c);
return cl.lst;
}

View File

@@ -413,6 +413,16 @@ struct manual_celllister {
return true;
}
/** \brief remove a cell from the list */
bool remove(cell *c) {
if(!listed(c)) return false;
int i = c->listindex;
c->listindex = tmps[i];
tmps.erase(tmps.begin() + i);
lst.erase(lst.begin() + i);
return true;
}
~manual_celllister() {
for(int i=0; i<isize(lst); i++) lst[i]->listindex = tmps[i];
}