From 9c30a44a657c6551f4158e6fcf87d6965367a2db Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Thu, 10 May 2018 21:02:19 -1000 Subject: [PATCH] Fix see through collision material --- hecl/blender/hecl/hmdl/__init__.py | 9 +++++---- hecl/include/hecl/Blender/Connection.hpp | 4 ++-- hecl/lib/Blender/Connection.cpp | 5 +++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/hecl/blender/hecl/hmdl/__init__.py b/hecl/blender/hecl/hmdl/__init__.py index 4339d07ac..b31fa83e1 100644 --- a/hecl/blender/hecl/hmdl/__init__.py +++ b/hecl/blender/hecl/hmdl/__init__.py @@ -286,11 +286,11 @@ def cookcol(writebuf, mesh_obj): surfaceWeb = prop_val_from_colmat('retro_surface_web', m) projPassthrough = prop_val_from_colmat('retro_projectile_passthrough', m) solid = prop_val_from_colmat('retro_solid', m) - u20 = prop_val_from_colmat('retro_u20', m) + noPlatformCollision = prop_val_from_colmat('retro_no_platform_collision', m) camPassthrough = prop_val_from_colmat('retro_camera_passthrough', m) surfaceWood = prop_val_from_colmat('retro_surface_wood', m) surfaceOrganic = prop_val_from_colmat('retro_surface_organic', m) - u24 = prop_val_from_colmat('retro_u24', m) + noEdgeCollision = prop_val_from_colmat('retro_no_edge_collision', m) surfaceRubber = prop_val_from_colmat('retro_surface_rubber', m) seeThrough = prop_val_from_colmat('retro_see_through', m) scanPassthrough = prop_val_from_colmat('retro_scan_passthrough', m) @@ -307,8 +307,9 @@ def cookcol(writebuf, mesh_obj): surfaceIce, pillar, surfaceMetalGrating, surfacePhazon, surfaceDirt, surfaceLava, surfaceSPMetal, surfaceStoneRock, surfaceSnow, surfaceMudSlow, surfaceFabric, halfPipe, surfaceMud, surfaceGlass, unused3, unused4, surfaceShield, surfaceSand, surfaceMothOrSeedOrganics, surfaceWeb, projPassthrough, - solid, u20, camPassthrough, surfaceWood, surfaceOrganic, u24, surfaceRubber, seeThrough, scanPassthrough, - aiPassthrough, ceiling, wall, floor, aiBlock, jumpNotAllowed, spiderBall, screwAttackWallJump)) + solid, noPlatformCollision, camPassthrough, surfaceWood, surfaceOrganic, noEdgeCollision, surfaceRubber, + seeThrough, scanPassthrough, aiPassthrough, ceiling, wall, floor, aiBlock, jumpNotAllowed, spiderBall, + screwAttackWallJump)) # Send verts writebuf(struct.pack('I', len(copy_mesh.vertices))) diff --git a/hecl/include/hecl/Blender/Connection.hpp b/hecl/include/hecl/Blender/Connection.hpp index 23f1417af..370ae0ac2 100644 --- a/hecl/include/hecl/Blender/Connection.hpp +++ b/hecl/include/hecl/Blender/Connection.hpp @@ -304,11 +304,11 @@ struct ColMesh bool surfaceWeb; bool projPassthrough; bool solid; - bool u20; + bool noPlatformCollision; bool camPassthrough; bool surfaceWood; bool surfaceOrganic; - bool u24; + bool noEdgeCollision; bool surfaceRubber; bool seeThrough; bool scanPassthrough; diff --git a/hecl/lib/Blender/Connection.cpp b/hecl/lib/Blender/Connection.cpp index aca93bd60..a997a2fd0 100644 --- a/hecl/lib/Blender/Connection.cpp +++ b/hecl/lib/Blender/Connection.cpp @@ -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