Commits

Torr_Samaho committed 936d69a

Fixed: Wound state changes weren't sent to clients. (part of Dusk's wound state / custom damagetype fix patch, but modified so that clients don't touch the wound state on their own)

  • Participants
  • Parent commits 1014cf6

Comments (0)

Files changed (2)

File docs/Skulltag Version History.txt

 -	- Fixed problems with the LAN broadcast under Linux. [Koromix]
 -	- 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]
 !	- 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]

File src/p_interaction.cpp

 	}
 
 	FState * woundstate = target->FindState(NAME_Wound, mod);
-	if (woundstate != NULL)
+	// [BB] The server takes care of this.
+	if ( (woundstate != NULL) && ( NETWORK_InClientMode( ) == false ) )
 	{
 		int woundhealth = RUNTIME_TYPE(target)->Meta.GetMetaInt (AMETA_WoundHealth, 6);
 
 		if (target->health <= woundhealth)
 		{
+			// [Dusk] As the server, update the clients on the state
+			if ( NETWORK_GetState( ) == NETSTATE_SERVER )
+				SERVERCOMMANDS_SetThingFrame( target, woundstate );
+
 			target->SetState (woundstate);
 			return;
 		}