comparison src/dutil.c @ 17:65de6eb6861a

Indenting...
author darius
date Wed, 24 Dec 1997 12:37:24 +0000
parents d28f3d01043c
children
comparison
equal deleted inserted replaced
16:e246e5730173 17:65de6eb6861a
194 return 0; 194 return 0;
195 } 195 }
196 196
197 if (victim->p_flags & PFSHIELD) 197 if (victim->p_flags & PFSHIELD)
198 { /* shields up? */ 198 { /* shields up? */
199 int penetrated, factor; 199 int penetrated;
200 float factor;
200 /* 201 /*
201 * if the server is configured for damage penetration then the shields 202 * if the server is configured for damage penetration then the shields
202 * will not absorb all the damage 203 * will not absorb all the damage
203 */ 204 */
204 205
205 /* Holds the initial penetration factor */ 206 /* Holds the initial penetration factor */
206 factor = configvals->penetration; 207 factor = configvals->penetration;
207 208
208 /* Are we in nebulous terrain? */ 209 /* Are we in nebulous terrain? */
209 if ((terrain_grid[(int) (j->t_x) / TGRID_GRANULARITY * TGRID_SIZE + 210 if ((terrain_grid[(int) (victim->p_x) / TGRID_GRANULARITY * TGRID_SIZE +
210 (int) (j->t_y) / TGRID_GRANULARITY].types 211 (int) (victim->p_y) / TGRID_GRANULARITY].types
211 & T_NEBULA) && neb_effect[SS_SHIELD]) 212 & T_NEBULA) && neb_effect[SS_SHIELD])
212 factor += drand48(); /* Yes - add something to the penetration factor */ 213 factor += drand48(); /* Yes - add something to the penetration factor */
213 214
214 if(factor > 1) /* Check for overflow */ 215 if(factor > 1) /* Check for overflow */
215 factor = 1; 216 factor = 1;