From 3539d436906cf4d2aef6c000c8b819e7dbfd0b3a Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Wed, 11 Mar 2020 09:53:53 +0100 Subject: [PATCH] fixed a crash in some tilings when drawing plain sidewalls --- floorshapes.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/floorshapes.cpp b/floorshapes.cpp index ae443617..8caf3a85 100644 --- a/floorshapes.cpp +++ b/floorshapes.cpp @@ -286,7 +286,8 @@ void geometry_information::bshape_regular(floorshape &fsh, int id, int sides, ld } for(int k=0; ktype); + if(isize(fsh.gpside[k]) < c->type) + fsh.gpside[k].resize(c->type); for(int i=0; itype; i++) { sizeto(fsh.gpside[k][i], id); bshape(fsh.gpside[k][i][id], PPR::LAKEWALL); @@ -442,7 +443,8 @@ void geometry_information::generate_floorshapes_for(int id, cell *c, int siid, i hpcpush(mid_at(hpxy(0,0), cornerlist[i%cor], SHADMUL)); for(int k=0; ktype); + if(isize(fsh.gpside[l]) < c->type) + fsh.gpside[l].resize(c->type); for(auto& gs: fsh.gpside[l]) { for(auto& li: gs) bind_floor_texture(li, fsh.id); @@ -611,7 +614,8 @@ void geometry_information::generate_floorshapes_for(int id, cell *c, int siid, i for(auto& li: fsh.levels[l]) bind_floor_texture(li, fsh.id); fsh.side[l] = shFullFloor.side[l]; for(auto& li: fsh.side[l]) bind_floor_texture(li, fsh.id); - fsh.gpside[l].resize(c->type); + if(isize(fsh.gpside[l]) < c->type) + fsh.gpside[l].resize(c->type); for(int e=0; etype; e++) { fsh.gpside[l][e] = shFullFloor.gpside[l][e]; for(auto& li: fsh.gpside[l][e])