mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-11-15 13:17:13 +00:00
Stop Outlaws from shooting themselves when Orb of Discord is active
This commit is contained in:
@@ -1194,6 +1194,7 @@ EX vector<cell*> gun_targets(cell *c) {
|
|||||||
if(passable(c2, c1, P_BULLET | P_FLYING | P_MONSTER))
|
if(passable(c2, c1, P_BULLET | P_FLYING | P_MONSTER))
|
||||||
if(cl.add(c2)) dists.push_back(dists[i] + 1);
|
if(cl.add(c2)) dists.push_back(dists[i] + 1);
|
||||||
}
|
}
|
||||||
|
cl.remove(c);
|
||||||
return cl.lst;
|
return cl.lst;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -413,6 +413,16 @@ struct manual_celllister {
|
|||||||
return true;
|
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() {
|
~manual_celllister() {
|
||||||
for(int i=0; i<isize(lst); i++) lst[i]->listindex = tmps[i];
|
for(int i=0; i<isize(lst); i++) lst[i]->listindex = tmps[i];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user