mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-12-23 20:30:06 +00:00
Various bugfixes
* Fixed Nano stamina not being halved on respawn * Reverted the default argument to terminate() change because MSVC is undable to disambiguate the function pointer passed to sigaction() * Fatal errors during init (like in TableData) can just call exit(1) directly anyway (missing "OpenFusion: terminated." be damned) * Switched to a slightly more portable syntax for getting the version in the Makefile * We shouldn't join the shard thread in the signal handler because the thread the signal handler ends up running in is undefined behaviour and we don't strictly need to join it anyway Many of these issues were discovered on OpenBSD.
This commit is contained in:
@@ -720,7 +720,7 @@ void PlayerManager::revivePlayer(CNSocket* sock, CNPacketData* data) {
|
||||
int nanoID = plr->equippedNanos[i];
|
||||
// halve nano health if respawning
|
||||
// all revives not 3-5 are normal respawns.
|
||||
if (reviveData->iRegenType < 3 && reviveData->iRegenType > 5)
|
||||
if (reviveData->iRegenType < 3 || reviveData->iRegenType > 5)
|
||||
plr->Nanos[nanoID].iStamina = 75; // max is 150, so 75 is half
|
||||
response.PCRegenData.Nanos[i] = plr->Nanos[nanoID];
|
||||
if (plr->activeNano == nanoID)
|
||||
|
||||
Reference in New Issue
Block a user