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

Comparing deliantra/server/common/loader.C (file contents):
Revision 1.151 by root, Sat Jan 16 13:41:37 2010 UTC vs.
Revision 1.153 by root, Sun Apr 11 00:34:05 2010 UTC

1/* 1/*
2 * This file is part of Deliantra, the Roguelike Realtime MMORPG. 2 * This file is part of Deliantra, the Roguelike Realtime MMORPG.
3 * 3 *
4 * Copyright (©) 2005,2006,2007,2008,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team 4 * Copyright (©) 2005,2006,2007,2008,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
5 * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team 5 * Copyright (©) 2002 Mark Wedel & Crossfire Development Team
6 * Copyright (©) 1992,2007 Frank Tore Johansen 6 * Copyright (©) 1992 Frank Tore Johansen
7 * 7 *
8 * Deliantra is free software: you can redistribute it and/or modify it under 8 * Deliantra is free software: you can redistribute it and/or modify it under
9 * the terms of the Affero GNU General Public License as published by the 9 * the terms of the Affero GNU General Public License as published by the
10 * Free Software Foundation, either version 3 of the License, or (at your 10 * Free Software Foundation, either version 3 of the License, or (at your
11 * option) any later version. 11 * option) any later version.
429 randomitems = 0; /* So another spell isn't created for this object */ 429 randomitems = 0; /* So another spell isn't created for this object */
430 /* without this, value is all screwed up */ 430 /* without this, value is all screwed up */
431 value = arch->value * inv->value; 431 value = arch->value * inv->value;
432 } 432 }
433 433
434 if (QUERY_FLAG (this, FLAG_MONSTER)) 434 if (this->flag [FLAG_MONSTER])
435 { 435 {
436 if (stats.hp > stats.maxhp) 436 if (stats.hp > stats.maxhp)
437 { 437 {
438 LOG (llevInfo, "ITEMBUG: monster %s has hp set higher than maxhp (%d>%d)\n", debug_desc (), stats.hp, stats.maxhp); 438 LOG (llevInfo, "ITEMBUG: monster %s has hp set higher than maxhp (%d>%d)\n", debug_desc (), stats.hp, stats.maxhp);
439 stats.maxhp = stats.hp; 439 stats.maxhp = stats.hp;
442 /* The archs just need to be updated for this */ 442 /* The archs just need to be updated for this */
443 if (move_type == 0) 443 if (move_type == 0)
444 move_type = MOVE_WALK; 444 move_type = MOVE_WALK;
445 } 445 }
446 446
447 if ((QUERY_FLAG (this, FLAG_GENERATOR) && QUERY_FLAG (this, FLAG_CONTENT_ON_GEN)) || type == CREATOR || type == CONVERTER) 447 if ((this->flag [FLAG_GENERATOR] && this->flag [FLAG_CONTENT_ON_GEN]) || type == CREATOR || type == CONVERTER)
448 /* Object will duplicate it's content as part of the 448 /* Object will duplicate it's content as part of the
449 * generation process. To do this, we must flag inventory 449 * generation process. To do this, we must flag inventory
450 * so it remains unevaluated concerning the randomitems and 450 * so it remains unevaluated concerning the randomitems and
451 * the living (a demonlord shouldn't cast from inside generator!) 451 * the living (a demonlord shouldn't cast from inside generator!)
452 */ 452 */
588 // was: insert_ob_in_ob (tmp, op); 588 // was: insert_ob_in_ob (tmp, op);
589 // but manually adding it can improve map loading times a lot 589 // but manually adding it can improve map loading times a lot
590 // also, appending instead of prepending keeps the 590 // also, appending instead of prepending keeps the
591 // save ordering the same between repeated load/saves. 591 // save ordering the same between repeated load/saves.
592 // and finally we do not want any funny effects 592 // and finally we do not want any funny effects
593 CLEAR_FLAG (tmp, FLAG_OBJ_ORIGINAL); 593 tmp->clr_flag (FLAG_OBJ_ORIGINAL);
594 CLEAR_FLAG (tmp, FLAG_REMOVED); 594 tmp->clr_flag (FLAG_REMOVED);
595 595
596 if (!op_inv) 596 if (!op_inv)
597 { 597 {
598 inv = tmp; 598 inv = tmp;
599 tmp->above = 0; 599 tmp->above = 0;
632 f.delayed_deref (this, owner, f.get_str ()); 632 f.delayed_deref (this, owner, f.get_str ());
633 break; 633 break;
634 634
635 case KW_animation: 635 case KW_animation:
636 { 636 {
637 CLEAR_FLAG (this, FLAG_ANIMATE); 637 this->clr_flag (FLAG_ANIMATE);
638 animation_id = 0; 638 animation_id = 0;
639 639
640 if (f.has_value () && (animation_id = find_animation (f.get_str ()))) 640 if (f.has_value () && (animation_id = find_animation (f.get_str ())))
641 SET_FLAG (this, FLAG_ANIMATE); //TODO: should not be forced to true here 641 this->set_flag (FLAG_ANIMATE); //TODO: should not be forced to true here
642 } 642 }
643 break; 643 break;
644 644
645 case KW_last_heal: f.get (last_heal); break; 645 case KW_last_heal: f.get (last_heal); break;
646 case KW_last_sp: f.get (last_sp); break; 646 case KW_last_sp: f.get (last_sp); break;
824 824
825 825
826 case KW_identified: 826 case KW_identified:
827 GET_FLAG (this, FLAG_IDENTIFIED); 827 GET_FLAG (this, FLAG_IDENTIFIED);
828 //TODO: move to check_object or so 828 //TODO: move to check_object or so
829 if (QUERY_FLAG (this, FLAG_IDENTIFIED)) 829 if (this->flag [FLAG_IDENTIFIED])
830 CLEAR_FLAG (this, FLAG_KNOWN_MAGICAL); 830 this->clr_flag (FLAG_KNOWN_MAGICAL);
831 831
832 break; 832 break;
833 833
834 case KW_friendly: 834 case KW_friendly:
835 if (f.get_bool ()) 835 if (f.get_bool ())

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines