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

Comparing deliantra/server/socket/info.C (file contents):
Revision 1.35 by root, Sun Mar 11 02:12:45 2007 UTC vs.
Revision 1.37 by root, Tue Apr 24 12:32:16 2007 UTC

384 384
385 /* range_scroll is only used for controlling golems. If the 385 /* range_scroll is only used for controlling golems. If the
386 * the player does not have a golem, reset some things. 386 * the player does not have a golem, reset some things.
387 */ 387 */
388 case range_golem: 388 case range_golem:
389 if (pl->contr->ranges[range_golem] != NULL) 389 if (object *golem = pl->contr->ranges[range_golem])
390 sprintf (obuf, "Range: golem (%s)", &pl->contr->ranges[range_golem]->name); 390 sprintf (obuf, "Range: golem (%s)", &golem->name);
391 else 391 else
392 { 392 {
393 pl->contr->shoottype = range_none; 393 pl->contr->shoottype = range_none;
394 strcpy (obuf, "Range: nothing"); 394 strcpy (obuf, "Range: nothing");
395 } 395 }
417 /* Eneq(@csd.uu.se): Let players define their own titles. */ 417 /* Eneq(@csd.uu.se): Let players define their own titles. */
418 if (pl->contr->own_title[0] == '\0') 418 if (pl->contr->own_title[0] == '\0')
419 sprintf (buf, "Player: %s the %s", (const char *) pl->name, (const char *) pl->contr->title); 419 sprintf (buf, "Player: %s the %s", (const char *) pl->name, (const char *) pl->contr->title);
420 else 420 else
421 sprintf (buf, "Player: %s %s", (const char *) pl->name, (const char *) pl->contr->own_title); 421 sprintf (buf, "Player: %s %s", (const char *) pl->name, (const char *) pl->contr->own_title);
422}
423
424// formerly a macro, used only by magic map, so optimised it out
425static inline faceidx
426GET_MAP_FACE (maptile *m, int x, int y, int layer)
427{
428 if (object *op = GET_MAP_FACE_OBJ (m, x, y, layer))
429 return op->face;
430 else
431 return 0;
422} 432}
423 433
424/** 434/**
425 * Helper for magic map creation. 435 * Helper for magic map creation.
426 * 436 *

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines