From 59398b2fdca8be5ac65cf7f7043056c9cf95e6bc Mon Sep 17 00:00:00 2001 From: tjr1974 <116045172+tjr1974@users.noreply.github.com> Date: Mon, 24 Oct 2022 16:07:49 -0500 Subject: [PATCH] Update handler.c Fixes indentations in obj_to_room() --- src/handler.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/handler.c b/src/handler.c index d6660f4..72eaf9a 100644 --- a/src/handler.c +++ b/src/handler.c @@ -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)", room, top_of_world, (void *)object); } - else { - if (world[room].contents == NULL){ // if list is empty - world[room].contents = object; // add object to list + else { + if (world[room].contents == NULL){ // if list is empty + world[room].contents = object; // add object to list } - else { - 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 - i->next_content = object; // add object at the end - } - object->next_content = NULL; // mostly for sanity. should do nothing. - IN_ROOM(object) = room - object->carried_by = NULL; - if (ROOM_FLAGGED(room, ROOM_HOUSE)) - SET_BIT_AR(ROOM_FLAGS(room), ROOM_HOUSE_CRASH); - } + else { + 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 + i->next_content = object; // add object at the end + } + object->next_content = NULL; // mostly for sanity. should do nothing. + IN_ROOM(object) = room + object->carried_by = NULL; + if (ROOM_FLAGGED(room, ROOM_HOUSE)) + SET_BIT_AR(ROOM_FLAGS(room), ROOM_HOUSE_CRASH); + } } /* Take an object from a room */