mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-18 15:00:26 +00:00
fixed a crash bug with Bulls pushing things offscreen
This commit is contained in:
parent
e6efc8fabc
commit
eb4156fe29
2
game.cpp
2
game.cpp
@ -4076,7 +4076,7 @@ void determinizeBull(cell *c, int *posdir, int& nc) {
|
|||||||
// use the previous PC's positions as the tiebreaker
|
// use the previous PC's positions as the tiebreaker
|
||||||
for(int k=0; k<SHSIZE && nc>1; k++) {
|
for(int k=0; k<SHSIZE && nc>1; k++) {
|
||||||
int pts[MAX_EDGE];
|
int pts[MAX_EDGE];
|
||||||
for(int d=0; d<nc; d++) pts[d] = totalbulldistance(c->move(posdir[d]), k);
|
for(int d=0; d<nc; d++) pts[d] = totalbulldistance(c->cmove(posdir[d]), k);
|
||||||
|
|
||||||
int bestpts = 1000;
|
int bestpts = 1000;
|
||||||
for(int d=0; d<nc; d++) if(pts[d] < bestpts) bestpts = pts[d];
|
for(int d=0; d<nc; d++) if(pts[d] < bestpts) bestpts = pts[d];
|
||||||
|
Loading…
Reference in New Issue
Block a user