Page 1 of 1

[Patch] Drowning Fix

Posted: Sun May 30, 2010 11:48 am
by Rhas
This fixes the issue where you continue to drown even after leaving the water or swimming to the top. Tested before and after the change on my server. Also went to another public server to verify the problem existed there. The problem was that the GetDrowningVictim function was not returning the correct value.

Code: Select all

--- zoneserver.cpp (revision 437)
+++ zoneserver.cpp (working copy)
@@ -1078,7 +1078,7 @@
 
 Client* ZoneServer::GetDrowningVictim(Player* player){
 	Client* client = GetClientBySpawn(player);
-	if(client && drowning_victims.count(client) == 0)
+	if(client && drowning_victims.count(client) > 0)
 		return(client);
 	return 0;
 }

Re: [Patch] Drowning Fix

Posted: Mon May 31, 2010 1:42 pm
by John Adams
Awesome, thank you for the bug fixes.