SERVER: Have Ray Gun prop fire from barrel position

This commit is contained in:
Ian 2023-09-09 14:07:40 -04:00
parent 2858e4cb84
commit cf1421b943

View file

@ -188,6 +188,17 @@ void() W_FireRay =
// final setup!
porter.origin = self.origin + self.view_ofs;
porter.origin += v_forward * 0;
// Start at the barrel offset if not ADS
if (self.zoom == 0) {
makevectors(self.v_angle);
// Y, Z, X
vector ads_pos = GetWeaponFlash_Offset(self.weapon);
porter.origin += v_right * (ads_pos.x/1000);
porter.origin += v_up * (ads_pos.y/1000);
porter.origin += v_forward * (ads_pos.z/1000);
}
setorigin(porter, porter.origin);
self.animend = ReturnWeaponModel;