~jb55/polyadvent

f8774ae6ed1618b4b64d2a24e40a2cc33bcece83 — William Casarin 1 year, 5 months ago 18ba034 master
fix some crashes near world edge
1 files changed, 2 insertions(+), 0 deletions(-)

M src/terrain_collision.c
M src/terrain_collision.c => src/terrain_collision.c +2 -0
@@ 176,6 176,8 @@ struct tri *collide_terrain(struct terrain *terrain, float *pos, float *move, fl
    get_closest_verts(terrain, pos, queries, cells);

    for (int j = 0; j < ARRAY_SIZE(queries); j++) {
        if (!queries[j].cell)
            continue;
        int vind = queries[j].cell->verts_index[queries[j].cell_vert_index];
        struct vert_tris *vtris = &terrain->vtris[vind / 3];