W
WinuX
Guest
Hello everyone
My lightning system seems to stop working when I'm above runtime 2.1.5.
Screenshot when I'm on runtime 2.1.5
Screenshot when I'm on runtime 2.2.1
Thanks for the coming answers
My lightning system seems to stop working when I'm above runtime 2.1.5.
Code:
///////////////////// CREATE ///////////////////
lightsurface = noone;
darknesscol[0] = c_black;
darknesscol[1] = c_black;
darknesscol[2] = c_black;
darknesscol[3] = c_black;
///////////////////// STEP /////////////////////
if (!surface_exists(lightsurface)) {lightsurface = surface_create(room_width, room_height);}
///////////////////// DRAW /////////////////////
if (surface_exists(lightsurface))
{
surface_set_target(lightsurface);
draw_rectangle_colour(0,0,room_width,room_height,darknesscol[0], darknesscol[1], darknesscol[2], darknesscol[3], false);
with (obj_prnt_li)
{
if (on)
{
gpu_set_blendmode(bm_add);
draw_sprite_ext(sprite,subimg,x,y,xscale,yscale,rotation,col[0],alpha);
gpu_set_blendmode(bm_normal);
}
}
surface_reset_target();
gpu_set_blendmode_ext(bm_dest_color,bm_zero);
draw_surface_ext(lightsurface,0,0,1,1,0,c_white,1);
gpu_set_blendmode(bm_normal);
}
Screenshot when I'm on runtime 2.2.1
Thanks for the coming answers