Crt Posted July 27, 2015 Share Posted July 27, 2015 Link to comment Share on other sites More sharing options...
Chase Posted July 27, 2015 Share Posted July 27, 2015 +1 For Finding it in the sea of code Link to comment Share on other sites More sharing options...
steveg216 Posted July 27, 2015 Share Posted July 27, 2015 rip lightsabers Link to comment Share on other sites More sharing options...
The Great Gazooks Posted July 27, 2015 Share Posted July 27, 2015 It also crashed at 11:33 PM PST and the last thing that happened was Dan R. unboxing something Link to comment Share on other sites More sharing options...
TitsRP Posted July 27, 2015 Share Posted July 27, 2015 function SWEP:GetSaberPosAng( num ) num = num or 1 local c = Color( 255, 128, 0 ) if ( SERVER ) then c = Color( 0, 128, 255 ) end if ( IsValid( self.Owner ) ) then local attachment = self:LookupAttachment( "blade" .. num ) if ( attachment && attachment > 0 ) then local PosAng = self:GetAttachment( attachment ) /*if ( SERVER ) then debugoverlay.Line( PosAng.Pos, PosAng.Pos + PosAng.Ang:Forward() * 50, .1, c, false ) end*/ return PosAng.Pos, PosAng.Ang:Forward() end local attachment = self.Owner:LookupBone( "ValveBiped.Bip01_R_Hand" ) if ( attachment ) then local pos, ang = self.Owner:GetBonePosition( attachment ) if ( pos == self.Owner:GetPos() ) then local matrix = self.Owner:GetBoneMatrix( attachment ) pos = matrix:GetTranslation() ang = matrix:GetAngles() end ang:RotateAroundAxis( ang:Forward(), 180 ) ang:RotateAroundAxis( ang:Up(), 30 ) ang:RotateAroundAxis( ang:Forward(), -5.7 ) ang:RotateAroundAxis( ang:Right(), 92 ) pos = pos + ang:Up() * -3.3 + ang:Right() * 0.8 + ang:Forward() * 5.6 /*if ( SERVER ) then debugoverlay.Line( pos, pos + ang:Forward() * 50, .1, c, false ) end*/ return pos, ang:Forward() end end local defAng = self:GetAngles() defAng:RotateAroundAxis( defAng:Right(), 90 ) ErrorNoHalt( "LIGHTSABERS: THIS SHOULD NEVER HAPPEN!") return self:GetPos() + defAng:Right() * 0.6 - defAng:Up() * 1 - defAng:Forward() * 0.25, defAng:Forward() end It relates to attempting to find the ValveBiped.Bip01_R_Hand in the model which does not always exist if some model makers are silly. In theory, the issue should not be fatal but I can always remove them for now. Link to comment Share on other sites More sharing options...
Recommended Posts