Utility/OBJParser: Fix relative offsets loading
This commit is contained in:
parent
b85a762476
commit
8697cf33e6
|
|
@ -47,6 +47,7 @@ Nazara Engine:
|
||||||
- Fix potential bug on SocketImpl::Connect (used by TcpClient::Connect) on POSIX platforms
|
- Fix potential bug on SocketImpl::Connect (used by TcpClient::Connect) on POSIX platforms
|
||||||
- It is now possible to initialize a StackArray with a size of zero on every platforms (this was not possible on non-Windows platforms before)
|
- It is now possible to initialize a StackArray with a size of zero on every platforms (this was not possible on non-Windows platforms before)
|
||||||
- Calling PlacementDestroy on a null pointer is now a no-op (was triggering an undefined behavior)
|
- Calling PlacementDestroy on a null pointer is now a no-op (was triggering an undefined behavior)
|
||||||
|
- Fix OBJParser relative offsets handling
|
||||||
|
|
||||||
Nazara Development Kit:
|
Nazara Development Kit:
|
||||||
- Added ImageWidget (#139)
|
- Added ImageWidget (#139)
|
||||||
|
|
|
||||||
|
|
@ -227,7 +227,7 @@ namespace Nz
|
||||||
|
|
||||||
if (p < 0)
|
if (p < 0)
|
||||||
{
|
{
|
||||||
p += static_cast<int>(m_positions.size() - 1);
|
p += static_cast<int>(m_positions.size());
|
||||||
if (p < 0)
|
if (p < 0)
|
||||||
{
|
{
|
||||||
Error("Vertex index out of range (" + String::Number(p) + " < 0");
|
Error("Vertex index out of range (" + String::Number(p) + " < 0");
|
||||||
|
|
@ -238,7 +238,7 @@ namespace Nz
|
||||||
|
|
||||||
if (n < 0)
|
if (n < 0)
|
||||||
{
|
{
|
||||||
n += static_cast<int>(m_normals.size() - 1);
|
n += static_cast<int>(m_normals.size());
|
||||||
if (n < 0)
|
if (n < 0)
|
||||||
{
|
{
|
||||||
Error("Normal index out of range (" + String::Number(n) + " < 0");
|
Error("Normal index out of range (" + String::Number(n) + " < 0");
|
||||||
|
|
@ -249,7 +249,7 @@ namespace Nz
|
||||||
|
|
||||||
if (t < 0)
|
if (t < 0)
|
||||||
{
|
{
|
||||||
t += static_cast<int>(m_texCoords.size() - 1);
|
t += static_cast<int>(m_texCoords.size());
|
||||||
if (t < 0)
|
if (t < 0)
|
||||||
{
|
{
|
||||||
Error("Texture coordinates index out of range (" + String::Number(t) + " < 0");
|
Error("Texture coordinates index out of range (" + String::Number(t) + " < 0");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue