mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2025-02-16 21:08:28 +00:00
don't clear raycast buffer - I think that there is no need for that
This commit is contained in:
parent
c5aa931715
commit
d0badd78cf
1 changed files with 0 additions and 6 deletions
|
@ -669,12 +669,6 @@ namespace SanAndreasUnity.Behaviours
|
|||
return Physics.Raycast(source, dir, out hit, this.MaxRange, WeaponsManager.Instance.projectileRaycastMask);
|
||||
|
||||
|
||||
// clear the buffer (not sure if it is needed)
|
||||
for (int i = 0; i < s_raycastHitBuffer.Length; i++)
|
||||
{
|
||||
s_raycastHitBuffer[i] = new RaycastHit();
|
||||
}
|
||||
|
||||
int numHits = Physics.RaycastNonAlloc (source, dir, s_raycastHitBuffer, this.MaxRange, WeaponsManager.Instance.projectileRaycastMask);
|
||||
|
||||
if (numHits < 1)
|
||||
|
|
Loading…
Add table
Reference in a new issue