mirror of
https://github.com/godotengine/godot.git
synced 2025-04-07 00:44:24 +08:00
Merge pull request #46192 from nmrkr/surface-tool-negative-index
Fix handling of negative indices in SurfaceTool
This commit is contained in:
commit
240b97d13d
@ -299,6 +299,7 @@ void SurfaceTool::add_triangle_fan(const Vector<Vector3> &p_vertices, const Vect
|
||||
|
||||
void SurfaceTool::add_index(int p_index) {
|
||||
ERR_FAIL_COND(!begun);
|
||||
ERR_FAIL_COND(p_index < 0);
|
||||
|
||||
format |= Mesh::ARRAY_FORMAT_INDEX;
|
||||
index_array.push_back(p_index);
|
||||
|
Loading…
x
Reference in New Issue
Block a user