mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-04 22:40:05 +00:00
Do not cancel the ongoing race on recall
Also do not remove the player's vehicle if the player isn't on a vehicle.
This commit is contained in:
parent
55431362a7
commit
c78b3ca69f
@ -532,7 +532,7 @@ void NPCManager::handleWarp(CNSocket* sock, int32_t warpId) {
|
||||
if (Warps.find(warpId) == Warps.end())
|
||||
return;
|
||||
|
||||
if (plr->iPCState | 8) {
|
||||
if (plr->iPCState & 8) {
|
||||
// remove the player's vehicle
|
||||
plr->iPCState &= ~8;
|
||||
|
||||
@ -582,7 +582,7 @@ void NPCManager::handleWarp(CNSocket* sock, int32_t warpId) {
|
||||
otherPlr->recallInstance = instanceID;
|
||||
|
||||
// remove their vehicle if they're on one
|
||||
if (otherPlr->iPCState | 8) {
|
||||
if (otherPlr->iPCState & 8) {
|
||||
// remove the player's vehicle
|
||||
otherPlr->iPCState &= ~8;
|
||||
|
||||
|
@ -101,10 +101,6 @@ void PlayerManager::removePlayer(CNSocket* key) {
|
||||
it++;
|
||||
}
|
||||
|
||||
// remove the player's ongoing race, if any
|
||||
if (RacingManager::EPRaces.find(key) != RacingManager::EPRaces.end())
|
||||
RacingManager::EPRaces.erase(key);
|
||||
|
||||
std::cout << players.size() << " players" << std::endl;
|
||||
}
|
||||
|
||||
@ -175,8 +171,8 @@ void PlayerManager::sendPlayerTo(CNSocket* sock, int X, int Y, int Z, uint64_t I
|
||||
// post-warp: check if the source instance has no more players in it and delete it if so
|
||||
ChunkManager::destroyInstanceIfEmpty(fromInstance);
|
||||
|
||||
// clean up EPRaces if we were likely in an IZ
|
||||
if (fromInstance != INSTANCE_OVERWORLD
|
||||
// clean up EPRaces if we were likely in an IZ and left
|
||||
if (fromInstance != INSTANCE_OVERWORLD && fromInstance != I
|
||||
&& RacingManager::EPRaces.find(sock) != RacingManager::EPRaces.end())
|
||||
RacingManager::EPRaces.erase(sock);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user