diff --git a/src/elements/emp.c b/src/elements/emp.c index 201b8e4a9..a7978a393 100644 --- a/src/elements/emp.c +++ b/src/elements/emp.c @@ -110,16 +110,19 @@ int update_EMP(UPDATE_FUNC_ARGS) { } int graphics_EMP(GRAPHICS_FUNC_ARGS) { - *colr = cpart->life*1.5; - *colg = cpart->life*1.5; - *colb = 200-cpart->life; - if (*colr>255) - *colr = 255; - if (*colg>255) - *colg = 255; - if (*colb>255) - *colb = 255; - if (*colb<=0) - *colb = 0; + if(cpart->life) + { + *colr = cpart->life*1.5; + *colg = cpart->life*1.5; + *colb = 200-(cpart->life); + if (*colr>255) + *colr = 255; + if (*colg>255) + *colg = 255; + if (*colb>255) + *colb = 255; + if (*colb<=0) + *colb = 0; + } return 0; } diff --git a/src/graphics.c b/src/graphics.c index 45d26f33e..afeb79267 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -3621,8 +3621,8 @@ int sdl_open(void) glGenTextures(1, &partsFboTex); glBindTexture(GL_TEXTURE_2D, partsFboTex); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, XRES, YRES, 0, GL_RGBA, GL_FLOAT, NULL); - glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST); //FBO glGenFramebuffers(1, &partsFbo);