2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 17:44:56 +00:00

Fix see through collision material

This commit is contained in:
Jack Andersen
2018-05-10 21:02:19 -10:00
parent fef55d7fc0
commit 9c30a44a65
3 changed files with 10 additions and 8 deletions

View File

@@ -150,7 +150,7 @@ uint32_t Connection::_readStr(char* buf, uint32_t bufSz)
BlenderLog.report(logvisor::Fatal, strerror(errno));
return 0;
}
else if (readLen >= 4)
else if (readLen >= 9)
{
if (!memcmp(buf, "EXCEPTION", std::min(readLen, uint32_t(9))))
{
@@ -187,7 +187,7 @@ size_t Connection::_readBuf(void* buf, size_t len)
int ret = Read(m_readpipe[0], cBuf, len);
if (ret < 0)
goto err;
if (len >= 4)
if (len >= 9)
if (!memcmp((char*) cBuf, "EXCEPTION", std::min(len, size_t(9))))
_blenderDied();
readLen += ret;
@@ -1338,6 +1338,7 @@ ColMesh::ColMesh(Connection& conn)
for (uint32_t i=0 ; i<count ; ++i)
edges.emplace_back(conn);
conn._readBuf(&count, 4);
trianges.reserve(count);
for (uint32_t i=0 ; i<count ; ++i)