[Patch] Drowning Fix

EQ2Emulator Development forum.

Moderator: Team Members

Post Reply
User avatar
Rhas
Retired
Posts: 33
Joined: Sat May 29, 2010 11:39 am
Location: Kansas City

[Patch] Drowning Fix

Post by Rhas » Sun May 30, 2010 11:48 am

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;
 }

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: [Patch] Drowning Fix

Post by John Adams » Mon May 31, 2010 1:42 pm

Awesome, thank you for the bug fixes.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests