- Oct 28, 2017
- 161
- 232
This fix is obsolete! Valve has fixed this in the 20/12/2018 update.
func_rotating has been broken in TF2 since release due to a spawnflag that has never been fixed.
func_rotating has a spawnflag with the number 16, and this is defined as Clientside Rotation in code. However, this spawnflag has been broken since release and Valve has never fixed it.
Also, the FGD lists this spawnflag as "Acc/Dec", which is completely wrong (unless you use my FGD which has this fixed and listed as Clientside Rotation)
However, there is a trick you can do to remove this spawnflag so that the func_rotating works correctly.
First, create your func_rotating as usual.
Second, go into the spawnflags and tick Acc/Dec, or Clientside Rotation if you are using my FGD, this will be needed so we can calculate the spawnflag number easily.
Next, change all the other flags/keyvalues you want, and give the func_rotating a name.
Turn off SmartEdit and look at the "spawnflags" keyvalue, and the number. You need to subtract 16 from this number, and then keep the result as it will be used in a moment.
Next, create a logic_auto, and give it the following output:
OnMapSpawn - <func_rotating name> - AddOutput - spawnflags <result number>
Repalce result number with the number you got earlier from the subtraction.
This small tweak effectively makes the logic_measure_movement workaround obsolete.
Congratulations you now have a working func_rotating, but before you get too excited with the entity, you need to beware of this 1 issue:
func_rotating has been broken in TF2 since release due to a spawnflag that has never been fixed.
func_rotating has a spawnflag with the number 16, and this is defined as Clientside Rotation in code. However, this spawnflag has been broken since release and Valve has never fixed it.
Also, the FGD lists this spawnflag as "Acc/Dec", which is completely wrong (unless you use my FGD which has this fixed and listed as Clientside Rotation)
However, there is a trick you can do to remove this spawnflag so that the func_rotating works correctly.
First, create your func_rotating as usual.
Second, go into the spawnflags and tick Acc/Dec, or Clientside Rotation if you are using my FGD, this will be needed so we can calculate the spawnflag number easily.
Next, change all the other flags/keyvalues you want, and give the func_rotating a name.
Turn off SmartEdit and look at the "spawnflags" keyvalue, and the number. You need to subtract 16 from this number, and then keep the result as it will be used in a moment.
Next, create a logic_auto, and give it the following output:
OnMapSpawn - <func_rotating name> - AddOutput - spawnflags <result number>
Repalce result number with the number you got earlier from the subtraction.
This small tweak effectively makes the logic_measure_movement workaround obsolete.
Congratulations you now have a working func_rotating, but before you get too excited with the entity, you need to beware of this 1 issue:
- The func_rotating has an angle limit of -36000 or 36000. If it exceeds this angle, it will stop working. The faster your func_rotating, the faster it will get to this limit
Last edited: