code from lfare1.wdl (problematic function is highlighted in red) Hitting ok will temporarily resume the game until it happens again (which is until the player moves a little bit at a time out of the inflicting area).
see Image of problem

// Modified Template6 file (by David Lancaster and Loopix)
////////////////////////////////////////////////////////////////////////
// File: lflare.wdl
// WDL code for lens flare and lighting effects
////////////////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////////////////
//var temp2[6];
//var temp3[6];

var sun_offset_x = 0;
var sun_offset_y = 0;
var sun_offset_z = 0;
var flare_range = 0;
//var flare_alpha = 60;

var lensvisibility = 0;

var flare_trace_mode; // used to trace to the sun

var qLensFlare = -1; // -1 == not created
// 0 == off
// 1 == on
// otherwise == turning off


string str_skytex = "sky"; // if the first part of the texture scanned matches this, it is sky

// use the skill1 parameter to store a number in a sprite entity
// The pivot distance is the percent distance between the screen center
//(where pivot_dist = 0) and the sun (pivot_dist = 1).
define pivot_dist,skill1;

// this is the sun itself
entity flareSun_ent
{
type = <sun_grey2.tga>; // uses a sprite
// type = <sun2.bmp>; // uses a sprite
view = CAMERA; // same camera parameters as the default view
layer = 3; // displayed beneath other entity layers
pivot_dist = 1; // distance factor from 'pivot point', must be 1 for sun
scale_x = 6; // sun is two times as large as the flares
scale_y = 6;
}

entity sunshine
{
type = <sunrays2.tga>;
view = CAMERA;
layer = 3;
pivot_dist = 1;
scale_x = 12;
scale_y = 12;
}



// Desc: this function takes an entity as parameter.
function flare_init(flare_ent)
{
my = flare_ent; // necessary because function parameters have no type
my.visible = off; // start with flares off
if (video_depth > 8) // D3D mode?
{
ent_alphaset(0,10); // create an alpha channel (won't work with standard edition)
my.bright = on;
my.flare = on;
}
else
{
my.transparent = on; // looks lousy in 8 bit, though
}
}


// Desc: places a flare at temp.x/temp.y deviations from screen center
function flare_place(flare_ent)
{
my = flare_ent;
my.visible = on;
my.transparent = on;

// multiply the pixel deviation with the pivot factor,
// and add the screen center
my.x = temp.x*my.pivot_dist + 0.5*screen_size.x;
my.y = temp.y*my.pivot_dist + 0.5*screen_size.y;
my.z = 1650; // screen distance, determines the size of the flare
IF (my == flareSun_ent) {

vec_set(temp2,sun_pos);

temp2.x += sun_offset_x;
temp2.y += sun_offset_y;
temp2.z += sun_offset_z;

trace_mode = ignore_me + ignore_you + ignore_passents + ignore_passable + ignore_sprites + scan_texture + USE_POLYGON; // ++ added scan_texture
IF (c_trace(camera.x,temp2.x,trace_mode) != 0) {
IF (str_cmpni(tex_name,str_skytex) == 0) {
IF (flareSun_ent.alpha > 0) { flareSun_ent.alpha -= 40 * time; } ELSE { flareSun_ent.alpha = 0; }
}
} ELSE {
IF (camera.pan > sun_angle.pan + 90) || (camera.pan < sun_angle.pan - 90) || (camera.tilt < sun_angle.tilt - 50) || (camera.tilt > sun_angle.tilt + 50) {
IF (flareSun_ent.alpha > 0) { flareSun_ent.alpha -= 40 * time; } ELSE { flareSun_ent.alpha = 0; }
} ELSE {
temp2.x = sqrt(abs(((my.x - (0.5*screen_size.x))*(my.x - (0.5*screen_size.x)))+((my.y - (0.5*screen_size.y))*(my.y - (0.5*screen_size.y)))));
IF (abs(temp2.x) > (0.5*screen_size.x) - flare_range) {
flareSun_ent.alpha = 100 - (abs(temp2.x) - ((0.5*screen_size.x) - flare_range));
IF (flareSun_ent.alpha < 0) { flareSun_ent.alpha = 0; }
} ELSE {
IF (flareSun_ent.alpha < 90) {
flareSun_ent.alpha += 40 * time;
} ELSE {
flareSun_ent.alpha = 90;
}
}
}

}

IF (flareSun_ent.alpha < 0) { flareSun_ent.alpha = 0; }
IF (flareSun_ent.alpha > 90) { flareSun_ent.alpha = 90; }
}
rel_for_screen(my.x,camera);
IF (my == flareSun_ent) {

}
}

// Desc: setup the lens flare effect
function lensflare_create()
{
// set alpha values for each entity

flare_init(flareSun_ent); // <<the sun flare

flare_init(sunshine);

qLensFlare = 0; // start 'off'
}

// Desc: start and animate a lens flare effect as long as qLensFlare == 1
//
starter lensflare_start()
{

// flareSun_ent.invisible = on;
flareSun_ent.transparent = on;

sunshine.transparent = on;

flareSun_ent.passable = on;

sunshine.passable = on;

if(qLensFlare == -1) // create the lens flares
{
lensflare_create();
}

if(qLensFlare == 1) // lens flare already started
{
return;
}

// allow for setup time for "lensflare_create"
//(if it was called right before this function)
wait(1);
qLensFlare = 1; // mark lens flare as on

// place lens flares
while(1)
{
wait(1); // animate each cycle
WHILE (qLensFlare == 0.5) { wait(1); }
//
flareSun_ent.roll -= 0.1 * time;
sunshine.roll += 0.1 * time;


// Animate lens flare
vec_set(temp,sun_pos);
temp.x += sun_offset_x;
temp.y += sun_offset_y;
temp.z += sun_offset_z;


vec_to_screen(temp,camera);
temp.x -= 0.5 * screen_size.x;
temp.y -= 0.5 * screen_size.y;

flare_place(flareSun_ent);

flare_place(sunshine);

// flareSun_ent.alpha = sun_angle.tilt*1.5;

sunshine.alpha = flareSun_ent.alpha*1.2;


IF (sunshine.alpha < 0) { sunshine.alpha = 0; }
IF (sunshine.alpha > 70) { sunshine.alpha = 70; }



}

// Remove lens flares
lensvisibility = 0;
// flare_visible(off);
qLensFlare = 0; // mark lens flare as off
}

// Desc: stop the lens flare effect
function lensflare_stop()
{
qLensFlare = .5; // signal to stop
}


P4 2.6 ghz 1 gig ram geforce 6600 256 mb GS A7.05 commercial