I found weapon wich hits 360 angle. How to change to 160?
I think calculation is here ,but i dont understand how it calculates.
I think calculation is here ,but i dont understand how it calculates.
Code:
IsSoundPlayed = false;
for(dalpha=5;dalpha<=32728;dalpha+=180)
{
tempalpha=PointRot.Yaw+dalpha;
if(tempalpha>65535) // if angle more then 360
AdditionalHit(tempalpha-65535);
else
AdditionalHit(tempalpha);
AdditionalHit(PointRot.Yaw+dalpha);
tempalpha=PointRot.Yaw-dalpha;
if(tempalpha<0) // if angle negative
AdditionalHit(65535+tempalpha);
else
AdditionalHit(tempalpha);
}
clearHitted();