Update handler.c

Fixes indentations in obj_to_room()
This commit is contained in:
tjr1974
2022-10-24 16:07:49 -05:00
committed by GitHub
parent 97bd28ffd3
commit 59398b2fdc

View File

@@ -675,21 +675,21 @@ void obj_to_room(struct obj_data *object, room_rnum room)
log("SYSERR: Illegal value(s) passed to obj_to_room. (Room #%d/%d, obj %p)", log("SYSERR: Illegal value(s) passed to obj_to_room. (Room #%d/%d, obj %p)",
room, top_of_world, (void *)object); room, top_of_world, (void *)object);
} }
else { else {
if (world[room].contents == NULL){ // if list is empty if (world[room].contents == NULL){ // if list is empty
world[room].contents = object; // add object to list world[room].contents = object; // add object to list
} }
else { else {
struct obj_data *i = world[room].contents; // define a temporary pointer struct obj_data *i = world[room].contents; // define a temporary pointer
while (i->next_content != NULL) i = i->next_content; // find the first without a next_content while (i->next_content != NULL) i = i->next_content; // find the first without a next_content
i->next_content = object; // add object at the end i->next_content = object; // add object at the end
} }
object->next_content = NULL; // mostly for sanity. should do nothing. object->next_content = NULL; // mostly for sanity. should do nothing.
IN_ROOM(object) = room IN_ROOM(object) = room
object->carried_by = NULL; object->carried_by = NULL;
if (ROOM_FLAGGED(room, ROOM_HOUSE)) if (ROOM_FLAGGED(room, ROOM_HOUSE))
SET_BIT_AR(ROOM_FLAGS(room), ROOM_HOUSE_CRASH); SET_BIT_AR(ROOM_FLAGS(room), ROOM_HOUSE_CRASH);
} }
} }
/* Take an object from a room */ /* Take an object from a room */