Skip to content

Commit

Permalink
Fixed Camera Collision on Polysoup
Browse files Browse the repository at this point in the history
  • Loading branch information
HumanGamer committed Mar 5, 2024
1 parent e94b5fd commit aceb999
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion engine/source/game/marble/marblecamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

//----------------------------------------------------------------------------

static U32 sCameraCollisionMask = InteriorObjectType | StaticShapeObjectType;
static U32 sCameraCollisionMask = InteriorObjectType | StaticShapeObjectType | StaticTSObjectType;

#ifdef MB_GOLD
#define RADIUS_FOR_CAMERA 0.09f
Expand Down
5 changes: 4 additions & 1 deletion engine/source/ts/tsCollision.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,9 @@ bool TSShapeInstance::castRayOpcode(S32 dl, const Point3F& startPos, const Point
S32 ss = detail->subShapeNum;
S32 od = detail->objectDetailNum;

// set up static data
setStatics(dl);

// nothing emitted yet...
bool emitted = false;

Expand All @@ -554,7 +557,7 @@ bool TSShapeInstance::castRayOpcode(S32 dl, const Point3F& startPos, const Point
// run through objects and collide
for (S32 i = start; i < end; i++)
{
MeshObjectInstance* mesh = &mMeshObjects[i];
MeshObjectInstance *mesh = &mMeshObjects[i];

if (od >= mesh->object->numMeshes)
continue;
Expand Down

0 comments on commit aceb999

Please sign in to comment.