Disallow vehicles in non-overworld instances

This commit is contained in:
dongresource 2021-03-19 02:20:13 +01:00
parent 69266d1cda
commit 124ea33959

View File

@ -494,6 +494,10 @@ static void revivePlayer(CNSocket* sock, CNPacketData* data) {
static void enterPlayerVehicle(CNSocket* sock, CNPacketData* data) { static void enterPlayerVehicle(CNSocket* sock, CNPacketData* data) {
Player* plr = getPlayer(sock); 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; bool expired = plr->Equip[8].iTimeLimit < getTimestamp() && plr->Equip[8].iTimeLimit != 0;
if (plr->Equip[8].iID > 0 && !expired) { if (plr->Equip[8].iID > 0 && !expired) {