src/ formatting
Clean up quite a bit of minor things found with simple grep patterns: operator at end of continued line instead of beginning of continuation (and a few comments which produced false matches, so that they won't do so next time), trailing spaces (only one or two of those), tabs (a dozen or so of those), several casts which didn't have a space between the type and the expression (I wasn't systematic about finding these). I think the only code change was in the function for the help command.
This commit is contained in:
@@ -651,10 +651,8 @@ int maxdist;
|
||||
|
||||
if (targ) {
|
||||
/* Is the monster visible to the pet? */
|
||||
if ((!targ->minvis || perceives(mtmp->data)) &&
|
||||
!targ->mundetected)
|
||||
if ((!targ->minvis || perceives(mtmp->data)) && !targ->mundetected)
|
||||
break;
|
||||
|
||||
/* If the pet can't see it, it assumes it aint there */
|
||||
targ = 0;
|
||||
}
|
||||
@@ -1107,12 +1105,10 @@ int after; /* this is extra fast monster movement */
|
||||
/* This causes unintended issues for pets trying to follow
|
||||
the hero. Thus, only run it if not leashed and >5 tiles
|
||||
away. */
|
||||
if (!mtmp->mleashed &&
|
||||
distmin(mtmp->mx, mtmp->my, u.ux, u.uy) > 5) {
|
||||
if (!mtmp->mleashed && distmin(mtmp->mx, mtmp->my, u.ux, u.uy) > 5) {
|
||||
k = has_edog ? uncursedcnt : cnt;
|
||||
for (j = 0; j < MTSZ && j < k - 1; j++)
|
||||
if (nx == mtmp->mtrack[j].x &&
|
||||
ny == mtmp->mtrack[j].y)
|
||||
if (nx == mtmp->mtrack[j].x && ny == mtmp->mtrack[j].y)
|
||||
if (rn2(MTSZ * (k - j)))
|
||||
goto nxti;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user