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

Comparing deliantra/server/server/monster.C (file contents):
Revision 1.81 by root, Fri Mar 26 01:04:45 2010 UTC vs.
Revision 1.82 by root, Sun Mar 28 16:17:28 2010 UTC

1060 } 1060 }
1061 1061
1062 if (QUERY_FLAG (head, FLAG_CONFUSED)) 1062 if (QUERY_FLAG (head, FLAG_CONFUSED))
1063 dir = absdir (dir + rndm (3) + rndm (3) - 2); 1063 dir = absdir (dir + rndm (3) + rndm (3) - 2);
1064 1064
1065 object *new_skill = 0;
1066
1065 /* skill selection - monster will use the next unused skill. 1067 // skill selection - monster will use the last unused skill
1066 * well...the following scenario will allow the monster to 1068 // and rotate, eventually cycling through all skills.
1067 * toggle between 2 skills. One day it would be nice to make
1068 * more skills available to monsters.
1069 */
1070 for (skill = head->inv; skill; skill = skill->below) 1069 for (skill = head->inv; skill; skill = skill->below)
1071 if (skill->type == SKILL && skill != head->chosen_skill) 1070 if (skill->type == SKILL && skill != head->chosen_skill)
1072 { 1071 new_skill = skill;
1072
1073 if (new_skill)
1073 head->chosen_skill = skill; 1074 splay (head->chosen_skill = new_skill);
1074 break;
1075 }
1076
1077 if (!skill && !head->chosen_skill) 1075 else if (!head->chosen_skill)
1078 { 1076 {
1079 LOG (llevDebug, "Error: Monster %s (%d) has FLAG_READY_SKILL without skill.\n", &head->name, head->count); 1077 LOG (llevDebug, "Error: Monster %s (%d) has FLAG_READY_SKILL without skill.\n", &head->name, head->count);
1080 CLEAR_FLAG (head, FLAG_READY_SKILL); 1078 CLEAR_FLAG (head, FLAG_READY_SKILL);
1081 return 0; 1079 return 0;
1082 } 1080 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines