Skip to content

Commit

Permalink
Heart rooms placed during gameplay have functional containers (#3419)
Browse files Browse the repository at this point in the history
  • Loading branch information
Loobinex authored Aug 24, 2024
1 parent 7e0176c commit fd17426
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions src/map_blocks.c
Original file line number Diff line number Diff line change
Expand Up @@ -1018,12 +1018,21 @@ void place_slab_object(SlabCodedCoords slb_num, MapSubtlCoord stl_x,MapSubtlCoor
}
if ( !needs_object )
continue;
}
struct Thing *objtng;
objtng = create_object(&pos, tngmodel, plyr_idx, slb_num);
if (thing_is_invalid(objtng)) {
ERRORLOG("Cannot create object type %d", tngmodel);
continue;
}
struct Thing *objtng;
objtng = create_object(&pos, tngmodel, plyr_idx, slb_num);
if (thing_is_invalid(objtng))
{
ERRORLOG("Cannot create object type %d", tngmodel);
continue;
}
if (thing_is_dungeon_heart(objtng))
{
struct Dungeon* dungeon = get_dungeon(objtng->owner);
if (dungeon->backup_heart_idx == 0)
{
dungeon->backup_heart_idx = objtng->index;
}
}
} else
if (sobj->class_id == TCls_EffectGen)
Expand Down

0 comments on commit fd17426

Please sign in to comment.