# HG changeset patch
# User Trillster
# Date 1709779247 18000
#      Wed Mar 06 21:40:47 2024 -0500
# Node ID abdce7be4a57c3561f73838ba6f36e56593f09c6
# Parent  2f59d4a1f4d10d32e639890b6963fe96620512d8
Fixed: A_SpawnItemEx didn't always sync AAPTR_TARGET to clients (addresses 4200).

diff -r 2f59d4a1f4d1 -r abdce7be4a57 docs/zandronum-history.txt
--- a/docs/zandronum-history.txt	Mon Mar 04 09:34:51 2024 -0600
+++ b/docs/zandronum-history.txt	Wed Mar 06 21:40:47 2024 -0500
@@ -133,6 +133,7 @@
 -	- Fixed: STRFTIME would crash Zandronum if a negative was passed into the first argument (addresses 4144). [Ru5tK1ng]
 -	- Fixed: the server would freeze after running for long enough (e.g. 24 days on Windows) due to an integer overflow in SERVER_Tick. [Kaminsky]
 -	- Fixed: the SendToCommunicator special didn't stop the previous sound when online. [DrinkyBird]
+-	- Fixed: A_SpawnItemEx didn't always sync AAPTR_TARGET to clients (addresses 4200). [Trillster]
 !	- The result value of GAMEEVENT_MEDALS event scripts can now be used to determine whether or not the player receives the medal. [Kaminsky]
 !	- GAMEMODE flags are now validated after all GAMEMODE lumps have been parsed instead of after each one. The internal game mode name (e.g. "TeamLMS") is now printed with the error message instead of the actual name. [Kaminsky]
 !	- Added an extra check to ensure that game modes have a (short) name. [Kaminsky]
diff -r 2f59d4a1f4d1 -r abdce7be4a57 src/thingdef/thingdef_codeptr.cpp
--- a/src/thingdef/thingdef_codeptr.cpp	Mon Mar 04 09:34:51 2024 -0600
+++ b/src/thingdef/thingdef_codeptr.cpp	Wed Mar 06 21:40:47 2024 -0500
@@ -2656,8 +2656,9 @@
 				SERVERCOMMANDS_SetThingTranslation( mo );
 
 			// [BB] To properly handle actor-actor bouncing, the client must know the target.
-			if ( mo->BounceFlags != BOUNCE_None )
-				SERVERCOMMANDS_SetThingTarget ( mo );
+			// if ( mo->BounceFlags != BOUNCE_None )
+			// [TRSR] It's preferable for the client to always know the target.
+			SERVERCOMMANDS_SetThingTarget ( mo );
 
 			// [BB] Set scale if necessary.
 			SERVERCOMMANDS_UpdateThingScaleNotAtDefault ( mo );
