Mercurial > ~darius > hgwebdir.cgi > paradise_server
diff src/dutil.c @ 17:65de6eb6861a
Indenting...
author | darius |
---|---|
date | Wed, 24 Dec 1997 12:37:24 +0000 |
parents | d28f3d01043c |
children |
line wrap: on
line diff
--- 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 */