Projectiles with non-angled sprites will no longer uselessly create and set a matrix (#2114)

This commit is contained in:
CitadelStationBot
2017-07-24 06:06:08 -05:00
committed by kevinz000
parent 7c8844baae
commit faf5b1dd73
+2 -2
View File
@@ -223,10 +223,10 @@
Angle=round(Get_Angle(src,current))
if(spread)
Angle += (rand() - 0.5) * spread
var/matrix/M = new
if(!nondirectional_sprite)
var/matrix/M = new
M.Turn(Angle)
transform = M
transform = M
var/Pixel_x=round((sin(Angle)+16*sin(Angle)*2), 1) //round() is a floor operation when only one argument is supplied, we don't want that here
var/Pixel_y=round((cos(Angle)+16*cos(Angle)*2), 1)