void IMovable::ProcessForce() { Dir step = VDirToDir(force_); TryMove(step); if (!NonZero(force_)) { return; } VDir vstep = DirToVDir[step]; force_.x -= (vstep.x * Friction::CombinedFriction(GetTurf())) / Friction::BASE_FRICTION; force_.y -= (vstep.y * Friction::CombinedFriction(GetTurf())) / Friction::BASE_FRICTION; force_.z -= (vstep.z * Friction::CombinedFriction(GetTurf())) / Friction::BASE_FRICTION; }
void IMovable::ProcessForce() { Dir step = VDirToDir(force_); checkMove(step); if (!NonZero(force_)) return; // qDebug() << "Process force: " << GetId(); // qDebug() << force_.x; // qDebug() << force_.y; VDir vstep = DirToVDir[step]; force_.x -= (vstep.x * Friction::CombinedFriction(GetTurf())) / Friction::BASE_FRICTION; force_.y -= (vstep.y * Friction::CombinedFriction(GetTurf())) / Friction::BASE_FRICTION; force_.z -= (vstep.z * Friction::CombinedFriction(GetTurf())) / Friction::BASE_FRICTION; }