mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-26 06:50:06 +00:00
Remove each group member's vehicle when warping into an instance
This commit is contained in:
parent
ee978e8bc9
commit
d97444cca5
@ -531,6 +531,9 @@ void NPCManager::handleWarp(CNSocket* sock, int32_t warpId) {
|
|||||||
if (Warps.find(warpId) == Warps.end())
|
if (Warps.find(warpId) == Warps.end())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// remove the player's vehicle
|
||||||
|
plr->iPCState &= ~8;
|
||||||
|
|
||||||
// std::cerr << "Warped to Map Num:" << Warps[warpId].instanceID << " NPC ID " << Warps[warpId].npcID << std::endl;
|
// std::cerr << "Warped to Map Num:" << Warps[warpId].instanceID << " NPC ID " << Warps[warpId].npcID << std::endl;
|
||||||
if (Warps[warpId].isInstance) {
|
if (Warps[warpId].isInstance) {
|
||||||
uint64_t instanceID = Warps[warpId].instanceID;
|
uint64_t instanceID = Warps[warpId].instanceID;
|
||||||
@ -565,6 +568,9 @@ void NPCManager::handleWarp(CNSocket* sock, int32_t warpId) {
|
|||||||
otherPlr->recallZ = Warps[warpId].z + RESURRECT_HEIGHT;
|
otherPlr->recallZ = Warps[warpId].z + RESURRECT_HEIGHT;
|
||||||
otherPlr->recallInstance = instanceID;
|
otherPlr->recallInstance = instanceID;
|
||||||
|
|
||||||
|
// remove their vehicle if they're on one
|
||||||
|
otherPlr->iPCState &= ~8;
|
||||||
|
|
||||||
PlayerManager::sendPlayerTo(sockTo, Warps[warpId].x, Warps[warpId].y, Warps[warpId].z, instanceID);
|
PlayerManager::sendPlayerTo(sockTo, Warps[warpId].x, Warps[warpId].y, Warps[warpId].z, instanceID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user