ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/time.C
(Generate patch)

Comparing deliantra/server/server/time.C (file contents):
Revision 1.45 by root, Sun Apr 22 13:06:45 2007 UTC vs.
Revision 1.46 by root, Sat Apr 28 21:34:38 2007 UTC

220} 220}
221 221
222 222
223void 223void
224move_gate (object *op) 224move_gate (object *op)
225{ /* 1 = going down, 0 = goind up */ 225{ /* 1 = going down, 0 = going up */
226 object *tmp; 226 object *tmp;
227 227
228 if (op->stats.wc < 0 || (int) op->stats.wc >= NUM_ANIMATIONS (op)) 228 if (op->stats.wc < 0 || (int) op->stats.wc >= NUM_ANIMATIONS (op))
229 { 229 {
230 LOG (llevError, "Gate error: animation was %d, max=%d\n", op->stats.wc, NUM_ANIMATIONS (op)); 230 LOG (llevError, "Gate error: animation was %d, max=%d\n", op->stats.wc, NUM_ANIMATIONS (op));
302 */ 302 */
303 if ((int) op->stats.wc >= NUM_ANIMATIONS (op) / 2) 303 if ((int) op->stats.wc >= NUM_ANIMATIONS (op) / 2)
304 { 304 {
305 /* Halfway or further, check blocks */ 305 /* Halfway or further, check blocks */
306 /* First, get the top object on the square. */ 306 /* First, get the top object on the square. */
307 for (tmp = op->above; tmp != NULL && tmp->above != NULL; tmp = tmp->above); 307 for (tmp = op->above; tmp && tmp->above; tmp = tmp->above)
308 ;
308 309
309 if (tmp != NULL) 310 if (tmp)
310 { 311 {
311 if (QUERY_FLAG (tmp, FLAG_ALIVE)) 312 if (QUERY_FLAG (tmp, FLAG_ALIVE))
312 { 313 {
313 hit_player (tmp, random_roll (1, op->stats.dam, tmp, PREFER_LOW), op, AT_PHYSICAL, 1); 314 hit_player (tmp, random_roll (0, op->stats.dam, tmp, PREFER_LOW), op, AT_PHYSICAL, 1);
315
314 if (tmp->type == PLAYER) 316 if (tmp->type == PLAYER)
315 new_draw_info_format (NDI_UNIQUE, 0, tmp, "You are crushed by the %s!", &op->name); 317 new_draw_info_format (NDI_UNIQUE, 0, tmp, "You are crushed by the %s!", &op->name);
316 } 318 }
317 else 319 else
318 /* If the object is not alive, and the object either can 320 /* If the object is not alive, and the object either can

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines