# HG changeset patch # User darius # Date 882967044 0 # Node ID 65de6eb6861a0c99742644e1499023ca79484e89 # Parent e246e57301734ea2d633739672105e268c2faaa1 Indenting... diff -r e246e5730173 -r 65de6eb6861a src/dutil.c --- a/src/dutil.c Wed Dec 24 12:36:02 1997 +0000 +++ b/src/dutil.c Wed Dec 24 12:37:24 1997 +0000 @@ -196,7 +196,8 @@ if (victim->p_flags & PFSHIELD) { /* shields up? */ - int penetrated, factor; + int penetrated; + float factor; /* * if the server is configured for damage penetration then the shields * will not absorb all the damage @@ -204,10 +205,10 @@ /* Holds the initial penetration factor */ factor = configvals->penetration; - + /* Are we in nebulous terrain? */ - if ((terrain_grid[(int) (j->t_x) / TGRID_GRANULARITY * TGRID_SIZE + - (int) (j->t_y) / TGRID_GRANULARITY].types + if ((terrain_grid[(int) (victim->p_x) / TGRID_GRANULARITY * TGRID_SIZE + + (int) (victim->p_y) / TGRID_GRANULARITY].types & T_NEBULA) && neb_effect[SS_SHIELD]) factor += drand48(); /* Yes - add something to the penetration factor */