DispatchKeyValue(player, "targetname", target) and
SetEntPropEnt(gunfire, Prop_Data, "m_hTarget", target)
I wonder the same thing?
The reason for using SetEntPropEnt(gunfire, Prop_Data, "m_hTarget", target)?
m_hTarget - offset?
If you change the version of the game engine the offset may become inaccessible. I think it is unreliable. DispatchKeyValue(player, "targetname", target) is actually the property of ENT.
SetEntPropEnt(gunfire, Prop_Send, "m_hOwnerEntity", client); It is not necessary, as env_gunfire not prejudice, it's just a visual effect.
----------------------------------------
It works!
My mistake was to use env_gunfire in the target property of the player(ID, name). The solution to this issue is the creation of info_targer (or another ENT) and teleportirovat it to the final tracking point (aim). Then gun_fire aim at the info_target.
This question, with the help of
Mitchell, has been solved completely!
VIDEO
Of course, the flaws are many, but the main thing is the result.