16 Days Ago
Improve ServerUse for weapons with >0 thickness. Previously a sphercast would find all hits along the bullet's travel, and then hit the first valid solid object. But imagine a theoretical bullet with e.g. 20m thickness, hitting the ground in the middle of a crowd of players. That bullet hits the ground first, so that's considered the canonical hit, and no players take damage at all. In this updated version, we only exit once we've done damage to something that can actually take damage, otherwise we keep looking through all the hits. Since this means we might now find valid hits behind solid static objects, we now also check for visibility of the hit.