From c343092bd5ce0f75a396e7091f8a1577c0855912 Mon Sep 17 00:00:00 2001 From: Jade Date: Fri, 27 Nov 2020 16:50:57 +0000 Subject: [PATCH] Gumball times out for slots 2 & 3 + Tweaks --- src/NanoManager.cpp | 4 +++- src/PlayerManager.cpp | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/NanoManager.cpp b/src/NanoManager.cpp index cf6ebbc..e9ae57a 100644 --- a/src/NanoManager.cpp +++ b/src/NanoManager.cpp @@ -904,7 +904,9 @@ std::vector NanoPowers = { NanoPower(EST_RECALL_GROUP, CSB_BIT_NONE, ECSB_NONE, nanoPower), NanoPower(EST_RETROROCKET_SELF, CSB_BIT_NONE, ECSB_NONE, nanoPower), NanoPower(EST_PHOENIX_GROUP, CSB_BIT_NONE, ECSB_NONE, nanoPower), - NanoPower(EST_NANOSTIMPAK, CSB_BIT_STIMPAKSLOT1, ECSB_STIMPAKSLOT1, nanoPower) + NanoPower(EST_NANOSTIMPAK, CSB_BIT_STIMPAKSLOT1, ECSB_STIMPAKSLOT1, nanoPower), + NanoPower(EST_NANOSTIMPAK, CSB_BIT_STIMPAKSLOT2, ECSB_STIMPAKSLOT2, nanoPower), + NanoPower(EST_NANOSTIMPAK, CSB_BIT_STIMPAKSLOT3, ECSB_STIMPAKSLOT3, nanoPower) }; }; // namespace diff --git a/src/PlayerManager.cpp b/src/PlayerManager.cpp index 53366b4..8ed3d11 100644 --- a/src/PlayerManager.cpp +++ b/src/PlayerManager.cpp @@ -762,7 +762,13 @@ void PlayerManager::revivePlayer(CNSocket* sock, CNPacketData* data) { resp2.PCRegenDataForOtherPC.iZ = plr->z; resp2.PCRegenDataForOtherPC.iHP = plr->HP; resp2.PCRegenDataForOtherPC.iAngle = plr->angle; - resp2.PCRegenDataForOtherPC.iConditionBitFlag = plr->iConditionBitFlag; + + Player *otherPlr = PlayerManager::getPlayerFromID(plr->iIDGroup); + if (otherPlr == nullptr) + return; + int bitFlag = GroupManager::getGroupFlags(otherPlr); + resp2.PCRegenDataForOtherPC.iConditionBitFlag = plr->iConditionBitFlag = plr->iSelfConditionBitFlag | bitFlag; + resp2.PCRegenDataForOtherPC.iPCState = plr->iPCState; resp2.PCRegenDataForOtherPC.iSpecialState = plr->iSpecialState; resp2.PCRegenDataForOtherPC.Nano = plr->Nanos[plr->activeNano];