[Jan 24 2009] - Rumble

Fixed command queue cancelling "--" from cancelling the next command. (thanks Fren
ze/Ogdin)
  Fixed object timer values from not saving. (thanks Stoneheart)
  Fixed latest GCC warnings in the /utils. (thanks Jamdog)
  Fixed violent area spells so they would not harm group members. (thanks Nhilar)
  Changed usage of qm->nr to GET_MOB_VNUM(qm). (thanks Tails)
This commit is contained in:
Rumble
2009-01-24 19:11:02 +00:00
parent b458c58878
commit c9c7ed9e7a
11 changed files with 41 additions and 26 deletions

View File

@@ -1863,11 +1863,14 @@ char *parse_object(FILE *obj_f, int nr)
log("SYSERR: Expecting third numeric line of %s, but file ended!", buf2);
exit(1);
}
if ((retval = sscanf(line, "%d %d %d %d", t, t + 1, t + 2, t + 3)) != 4) {
if (retval == 3)
if ((retval = sscanf(line, "%d %d %d %d %d", t, t + 1, t + 2, t + 3, t + 4)) != 5) {
if (retval == 3) {
t[3] = 0;
t[4] = 0;
} else if (retval == 4)
t[4] = 0;
else {
log("SYSERR: Format error in third numeric line (expecting 4 args, got %d), %s", retval, buf2);
log("SYSERR: Format error in third numeric line (expecting 5 args, got %d), %s", retval, buf2);
exit(1);
}
}
@@ -1876,6 +1879,7 @@ char *parse_object(FILE *obj_f, int nr)
GET_OBJ_COST(obj_proto + i) = t[1];
GET_OBJ_RENT(obj_proto + i) = t[2];
GET_OBJ_LEVEL(obj_proto + i) = t[3];
GET_OBJ_TIMER(obj_proto + i) = t[4];
obj_proto[i].sitting_here = NULL;