- iqx = game.quadx+(lookx+(QUADSIZE-1))/QUADSIZE - 1;
- iqy = game.quady+(looky+(QUADSIZE-1))/QUADSIZE - 1;
- if (!VALID_QUADRANT(iqx,iqy) ||
- game.state.galaxy[iqx][iqy].supernova ||
- game.state.galaxy[iqx][iqy].klingons > 8)
- return 0; /* no can do -- neg energy, supernovae, or >8 Klingons */
- if (ienm == IHR) return 0; /* Romulans cannot escape! */
- if (irun == 0) {
+ iq.x = game.quadrant.x+(look.x+(QUADSIZE-1))/QUADSIZE - 1;
+ iq.y = game.quadrant.y+(look.y+(QUADSIZE-1))/QUADSIZE - 1;
+ if (!VALID_QUADRANT(iq.x,iq.y) ||
+ game.state.galaxy[iq.x][iq.y].supernova ||
+ game.state.galaxy[iq.x][iq.y].klingons > MAXKLQUAD-1)
+ return false; /* no can do -- neg energy, supernovae, or >MAXKLQUAD-1 Klingons */
+ if (ienm == IHR) return false; /* Romulans cannot escape! */
+ if (!irun) {