-
Notifications
You must be signed in to change notification settings - Fork 109
RFC: EMI: Check for collisions when using updateWalk(). #1050
base: master
Are you sure you want to change the base?
Conversation
I guess we don't need this in Grim as no moving actors collide with Manny? |
That depends, that monster/car-puzzle might be doing some collisions like that. But largely anyone that's not Manny, doesn't really move much at all in Grim. (Which is mostly true in EMI too, apart from the wandering tourists, Jimmy and perhaps the logs in the lava puzzle?). |
so we wait for testing this? |
I wanted to wait for the log puzzle to be fixed first. I think it's still not visible (but I haven't checked). |
@klusark have you checked this? |
We're still waiting on this for my fixes for rotation. I'm going to check some of the possible areas where this might be problematic in Grim too. |
what is status on this? |
I think this one may have been superseded by #1108, but that needs to be confirmed. |
This bug is still present:
#1108 only fixed the issue if an actor is moved via Actor::setPos(). Unfortunately, the proposed bug fix has the drawback that the moving actor does not try to avoid the object it collides with. This has the following two consequences:
|
Math::Vector3d newWalkAmt = dir * walkAmt; | ||
foreach (Actor *a, g_grim->getActiveActors()) { | ||
// Don't move if we've collided | ||
if(handleCollisionWith(a, mode, &newWalkAmt)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a space after if.
This forces a check for collisions when updateWalk is called. This fixes Timmy running through the legs of Guybrush on the beach in the set mib. I think it fixes the logs in the flume puzzle as well, but I need to finish with that PR first to be sure since they're not visible right now.