Torr_Samaho avatar Torr_Samaho committed d354b58

Fixed: The server always instructed clients to use the standard pain state of an actor, not any custom one. (part of Dusk's wound state / custom damagetype fix patch, but slightly modified and extended)

Comments (0)

Files changed (2)

docs/Skulltag Version History.txt

 -	- Fixed: Console icon would stick on a player's head if the server missed the packet to remove the icon. [TIHan]
 -	- Fixed: Medals weren't announced on spied players. [Dusk]
 -	- Fixed: Wound state changes weren't sent to clients. [Dusk, Torr Samaho]
+-	- Fixed: The server always instructed clients to use the standard pain state of an actor, not any custom one. [Dusk, Torr Samaho]
 !	- Changed F12 to allow spectators full spying, with the exception of during LMS if it's disabled. [Eruanna]
 !	- Changed F12 to allow full demo spying. [Eruanna]
 !	- Players aren't forced to spectate after a "changemap" map change on a server with a join password anymore. [Torr Samaho]

src/p_interaction.cpp

 				{
 					// If we are the server, tell clients about the state change.
 					if ( NETWORK_GetState( ) == NETSTATE_SERVER )
-						SERVERCOMMANDS_SetThingState( target, STATE_PAIN );
+						SERVERCOMMANDS_SetThingFrame( target, painstate );
 
 					target->SetState (painstate);
 				}
 		}
 		else
 		{
-			// If we are the server, tell clients about the state change.
-			if ( NETWORK_GetState( ) == NETSTATE_SERVER )
-				SERVERCOMMANDS_SetThingState( target, STATE_PAIN );
-
 			target->flags |= MF_JUSTHIT; // fight back!
 			FState * painstate = target->FindState(NAME_Pain, mod);
-			if (painstate != NULL) target->SetState (painstate);
+			if (painstate != NULL)
+			{
+				// If we are the server, tell clients about the state change.
+				if ( NETWORK_GetState( ) == NETSTATE_SERVER )
+					SERVERCOMMANDS_SetThingFrame( target, painstate );
+
+				target->SetState (painstate);
+			}
 			if (mod == NAME_PoisonCloud)
 			{
 				if ((target->flags3 & MF3_ISMONSTER) && pr_poison() < 128)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.