Here's a zscript lump that can be used to test this.
This is the entire lump, just copypaste.
Code: Select all
class wbbb:weapon{
default{weapon.slotnumber 1;}
states{
ready:
TNT1 A 1 A_WeaponReady();
wait;
select:
TNT1 A 0 A_Raise();
wait;
deselect:
TNT1 A 0 A_Lower();
wait;
fire:
TNT1 A 0{
for(int i=0;i<100;i++){
let aaa=spawn("hdbbbb",pos);aaa.vel=(frandom(-1000,1000),frandom(-1000,1000),frandom(0,40));
}
}
TNT1 A 1 A_Refire();
goto ready;
hold:
TNT1 A 1;
TNT1 A 1 A_Refire();
goto ready;
}
}
class hdbbbb:actor{
override void tick(){
setorigin(pos+vel,true);
}
states{
spawn:
BAL1 A -1;
}
}
To test:
1. Summon a gazillion decorations scattered about in one area so you get lots of overlapping sprites. (EDIT: it may be necessary to do this under sky EDIT2: it is not, but it might be more effective or at least noticeable to have a variety of actors overlapping each other)
2. Give "wbbb" and fire it, then look around.
3. Repeat 2 as necessary.
Expected: the balls just fly off in random directions and nothing else happens.
Actual: after a few seconds or so your decorations start getting drawn in the wrong order.
Here's a zscript lump that can be used to test this.
This is the entire lump, just copypaste.
[code=php]class wbbb:weapon{
default{weapon.slotnumber 1;}
states{
ready:
TNT1 A 1 A_WeaponReady();
wait;
select:
TNT1 A 0 A_Raise();
wait;
deselect:
TNT1 A 0 A_Lower();
wait;
fire:
TNT1 A 0{
for(int i=0;i<100;i++){
let aaa=spawn("hdbbbb",pos);aaa.vel=(frandom(-1000,1000),frandom(-1000,1000),frandom(0,40));
}
}
TNT1 A 1 A_Refire();
goto ready;
hold:
TNT1 A 1;
TNT1 A 1 A_Refire();
goto ready;
}
}
class hdbbbb:actor{
override void tick(){
setorigin(pos+vel,true);
}
states{
spawn:
BAL1 A -1;
}
} [/code]
To test:
1. Summon a gazillion decorations scattered about in one area so you get lots of overlapping sprites. (EDIT: it may be necessary to do this under sky EDIT2: it is not, but it might be more effective or at least noticeable to have a variety of actors overlapping each other)
2. Give "wbbb" and fire it, then look around.
3. Repeat 2 as necessary.
Expected: the balls just fly off in random directions and nothing else happens.
Actual: after a few seconds or so your decorations start getting drawn in the wrong order.