# HG changeset patch
# User Ru5tK1ng
# Date 1706193844 21600
#      Thu Jan 25 08:44:04 2024 -0600
# Branch clericfix2
# Node ID 338f985a58aee652a60c902358e31569758c01c8
# Parent  f46ab13b972a3a2ffbd7baf2e88c43a1828ce7af
Fixed: Cleric's CircleFlame projectile did not rotate properly online (addresses 2101).

diff -r f46ab13b972a -r 338f985a58ae docs/zandronum-history.txt
--- a/docs/zandronum-history.txt	Fri Sep 29 08:23:34 2023 -0400
+++ b/docs/zandronum-history.txt	Thu Jan 25 08:44:04 2024 -0600
@@ -114,6 +114,7 @@
 -	- Fixed: the coop info wasn't getting drawn in clientside demos. [Kaminsky]
 -	- Fixed: Floatbob items having incorrect z-height after a map reset and glitchy GL floor clipping (addresses 2361). [Ru5tK1ng]
 -	- Fixed: Monsters spawned by BossBrain cubes would move before being spawned on the clients therefore triggering warning messages (addresses 2655). [Ru5tK1ng]
+-   - Fixed: Cleric's CircleFlame projectile did not rotate properly online (addresses 2101). [Ru5tK1ng]
 !	- 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 f46ab13b972a -r 338f985a58ae src/g_hexen/a_clericflame.cpp
--- a/src/g_hexen/a_clericflame.cpp	Fri Sep 29 08:23:34 2023 -0400
+++ b/src/g_hexen/a_clericflame.cpp	Thu Jan 25 08:44:04 2024 -0600
@@ -189,8 +189,16 @@
 {
 	int an;
 
+	// [RK] The server handles this.
+	if ( NETWORK_InClientModeAndActorNotClientHandled ( self ))
+		return;
+
 	an = (self->angle+ANG90)>>ANGLETOFINESHIFT;
 	self->velx = self->special1+FixedMul(FLAMEROTSPEED, finecosine[an]);
 	self->vely = self->special2+FixedMul(FLAMEROTSPEED, finesine[an]);
 	self->angle += ANG90/15;
+
+	// [RK] Send the updated actor position to the clients.
+	if ( NETWORK_GetState() == NETSTATE_SERVER )
+		SERVERCOMMANDS_MoveThingExact(self, CM_ANGLE | CM_X | CM_Y | CM_VELX | CM_VELY);
 }
