Skip to content

Commit e74e3a0

Browse files
cryhammgerhardy
authored andcommitted
removed old code comments
1 parent 38e9f57 commit e74e3a0

File tree

3 files changed

+3
-21
lines changed

3 files changed

+3
-21
lines changed

src/caveexpress/server/entities/Platform.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,31 +44,16 @@ void Platform::onPreSolve (b2Contact* contact, IEntity* entity, const b2Manifold
4444
contact->GetWorldManifold(&worldManifold);
4545
const b2Vec2 worldNormal = worldManifold.normal;
4646
// not from above - then we don't care // -1/sqrt(2)
47-
// if (worldNormal.y >= -0.707) // old
48-
// return;
4947
if (worldNormal.y >= -0.07 ||
5048
fabs(worldNormal.x) > fabs(worldNormal.y))
5149
return;
5250

5351
const b2Manifold *maniFold = contact->GetManifold();
54-
// if (maniFold->pointCount < 2) // old
55-
// return;
56-
5752
const float normalImpulse = maniFold->points[0].normalImpulse;
5853
const float absNormalImpulse = fabs(normalImpulse);
5954
if (absNormalImpulse < EPSILON)
6055
return;
6156

62-
/* old
63-
for (int i = 0; i < maniFold->pointCount; i++) {
64-
// shut up compiler
65-
if (i == 0)
66-
continue;
67-
// the impulses must match - otherwise we are not in rest
68-
const float impulse = fabs(normalImpulse - maniFold->points[i].normalImpulse);
69-
if (impulse > 5.0f)
70-
return;
71-
}*/
7257
player->setPlatform(this);
7358
Log::debug(LOG_GAMEIMPL, "player %s (%i) landed on cave %i", player->getName().c_str(), player->getID(), getID());
7459
}

src/caveexpress/server/entities/Player.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -590,9 +590,6 @@ bool Player::isCloseOverSolid (float distance) const
590590

591591
bool Player::isLanded () const
592592
{
593-
// if (!b2Vec2Equals(getLinearVelocity(), b2Vec2_zero)) // old
594-
// return false;
595-
596593
if (isCloseOverSolid())
597594
return true;
598595

src/caveexpress/server/entities/npcs/NPCFriendly.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ bool NPCFriendly::triggerTargetCaveAnnouncement (const b2Vec2& playerPos)
9090
return false;
9191
}
9292
if (_triggerMovement == 0) {
93-
_triggerMovement = _time + 200; // 600
94-
GameEvent.announceTargetCave(getVisMask(), *this, 1400); // 1200
95-
return true; // false;
93+
_triggerMovement = _time + 200;
94+
GameEvent.announceTargetCave(getVisMask(), *this, 1400);
95+
return true;
9696
}
9797
return _time > _triggerMovement;
9898
}

0 commit comments

Comments
 (0)