Don't jump when on top of another sentient

This commit is contained in:
smallmodel 2024-11-03 20:32:17 +01:00
parent 406f804ef8
commit 94e1830895
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -7769,6 +7769,14 @@ void Player::Jump(Event *ev)
return;
}
if (g_gametype->integer != GT_SINGLE_PLAYER) {
// Added in 2.0
// Don't jump when on top of another sentient
if (groundentity && groundentity->entity && groundentity->entity->IsSubclassOfSentient()) {
return;
}
}
maxheight = ev->GetFloat(1);
if (maxheight > 16) {