TWINE: minor cleanup

This commit is contained in:
Martin Gerhardy 2021-08-15 19:56:47 +02:00
parent 7c068a774d
commit bf6672df34
2 changed files with 5 additions and 7 deletions

View File

@ -192,9 +192,9 @@ void Collision::reajustActorPosition(ShapeType brickShape) {
}
}
void Collision::handlePushing(const IVec3 &minsTest, const IVec3 &maxsTest, ActorStruct *actor, ActorStruct *actorTest) {
void Collision::handlePushing(const IVec3 &minsTest, const IVec3 &maxsTest, const ActorStruct *actor, ActorStruct *actorTest) {
IVec3 &processActor = _engine->_movements->_processActor;
IVec3 &previousActor = _engine->_movements->_previousActor;
const IVec3 &previousActor = _engine->_movements->_previousActor;
const int32 newAngle = _engine->_movements->getAngleAndSetTargetActorDistance(processActor, actorTest->pos());
@ -234,10 +234,8 @@ void Collision::handlePushing(const IVec3 &minsTest, const IVec3 &maxsTest, Acto
if (newAngle >= ANGLE_315 || (newAngle < ANGLE_315 && newAngle < ANGLE_45)) {
processActor.z = minsTest.z - actor->_boudingBox.maxs.z;
}
} else {
if (!actor->_dynamicFlags.bIsFalling) {
processActor = previousActor;
}
} else if (!actor->_dynamicFlags.bIsFalling) {
processActor = previousActor;
}
}

View File

@ -34,7 +34,7 @@ class Collision {
private:
TwinEEngine *_engine;
void handlePushing(const IVec3 &minsTest, const IVec3 &maxsTest, ActorStruct *actor, ActorStruct *actorTest);
void handlePushing(const IVec3 &minsTest, const IVec3 &maxsTest, const ActorStruct *actor, ActorStruct *actorTest);
public:
Collision(TwinEEngine *engine);
/** Actor collision coordinate */