This commit is contained in:
joep van der velden
2020-06-20 08:43:39 +02:00
parent 2960351ce6
commit b6f26be8da
+9 -9
View File
@@ -231,24 +231,24 @@
return 1 //Bullets don't drift in space
/obj/item/projectile/proc/fire(var/setAngle)
set waitfor = 0
set waitfor = FALSE
if(setAngle)
Angle = setAngle
while(!QDELETED(src))
if(!paused)
if((!( current ) || loc == current))
current = locate(Clamp(x+xo,1,world.maxx),Clamp(y+yo,1,world.maxy),z)
if((!current || loc == current))
current = locate(Clamp(x + xo, 1, world.maxx), Clamp(y + yo, 1, world.maxy), z)
if(isnull(Angle))
Angle=round(Get_Angle(src,current))
Angle = round(Get_Angle(src, current))
if(spread)
Angle += (rand() - 0.5) * spread
var/matrix/M = new
M.Turn(Angle)
transform = M
var/Pixel_x=round(sin(Angle)+16*sin(Angle)*2)
var/Pixel_y=round(cos(Angle)+16*cos(Angle)*2)
var/Pixel_x = round(sin(Angle) + 16 * sin(Angle) * 2)
var/Pixel_y = round(cos(Angle) + 16 * cos(Angle) * 2)
var/pixel_x_offset = pixel_x + Pixel_x
var/pixel_y_offset = pixel_y + Pixel_y
var/new_x = x
@@ -257,7 +257,7 @@
while(pixel_x_offset > 16)
pixel_x_offset -= 32
pixel_x -= 32
new_x++// x++
new_x++ // x++
while(pixel_x_offset < -16)
pixel_x_offset += 32
pixel_x += 32
@@ -280,10 +280,10 @@
else
animate(src, pixel_x = pixel_x_offset, pixel_y = pixel_y_offset, time = max(1, (speed <= 3 ? speed - 1 : speed)))
if(original && (original.layer>=2.75) || ismob(original))
if(ismob(original) || (original && original.layer >= 2.75))
if(loc == get_turf(original))
if(!(original in permutated))
Bump(original, 1)
Bump(original, TRUE)
Range()
sleep(max(1, speed))