Projectile Weapon Fire
Projectile fire is used to simulate weapons that fire rounds which are slower moving, explode on impact, affected by gravity,
etc. These are cases where the outcome of the weapon fire cannot be determined at the exact instant the weapon is fired, such
as launching a grenade. For this type of weapon, an actual physical object, or projectile, is spawned and sent moving in the
direction the weapon is aimed. A hit is determined by the projectile colliding with another object in the world.
For projectile fire, the local client does a trace from camera to check what Actor is under the crosshair
FireWeapon(), similar to the instant-hit implementation. If the player is aiming at something, it adjusts the fire direction
to hit that spot and calls
ServerFireProjectile() on the server to spawn a projectile Actor in the direction the weapon was aimed.
When the movement component of the projectile detects a hit on the server, it explodes dealing damage, spawning effects, and
tears off from replication to notify the client about that event. Then, the projectile turns off collision, movement, and visibility
and destroys itself after one second to give client time for replication update.
On clients, explosion effects are replicated via