From 124ea33959703c324a69bb113e4bae4bf5be76cf Mon Sep 17 00:00:00 2001 From: dongresource Date: Fri, 19 Mar 2021 02:20:13 +0100 Subject: [PATCH] Disallow vehicles in non-overworld instances --- src/PlayerManager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/PlayerManager.cpp b/src/PlayerManager.cpp index b06e2a1..0c44a25 100644 --- a/src/PlayerManager.cpp +++ b/src/PlayerManager.cpp @@ -494,6 +494,10 @@ static void revivePlayer(CNSocket* sock, CNPacketData* data) { static void enterPlayerVehicle(CNSocket* sock, CNPacketData* data) { Player* plr = getPlayer(sock); + // vehicles are only allowed in the overworld + if (plr->instanceID != 0) + return; + bool expired = plr->Equip[8].iTimeLimit < getTimestamp() && plr->Equip[8].iTimeLimit != 0; if (plr->Equip[8].iID > 0 && !expired) {