Skip to content

Commit 657dc06

Browse files
committed
Relax jumping requirements
1 parent 6796528 commit 657dc06

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

src/entity/Entity.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1468,16 +1468,10 @@ namespace Game3 {
14681468

14691469
{
14701470
auto velocity_lock = velocity.uniqueLock();
1471-
if (velocity.z != 0.) {
1471+
if (velocity.z > 0.0) {
14721472
return;
14731473
}
14741474

1475-
{
1476-
auto offset_lock = offset.sharedLock();
1477-
if (offset.z != 0.)
1478-
return;
1479-
}
1480-
14811475
velocity.z = getJumpSpeed();
14821476
}
14831477

src/packet/JumpPacket.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
namespace Game3 {
1010
void JumpPacket::handle(const std::shared_ptr<ServerGame> &, GenericClient &client) {
11-
if (auto player = client.getPlayer()) {
11+
if (ServerPlayerPtr player = client.getPlayer()) {
1212
player->jump();
1313
} else {
1414
client.send(make<ErrorPacket>("No player."));

0 commit comments

Comments
 (0)