TPT: Prevent gaps in beams of photons from powered clone 3702438482
This commit is contained in:
parent
89788d43c3
commit
2417ad3b41
@ -71,6 +71,11 @@ int update_PBCN(UPDATE_FUNC_ARGS) {
|
|||||||
{
|
{
|
||||||
parts[r].vx = rx * 3;
|
parts[r].vx = rx * 3;
|
||||||
parts[r].vy = ry * 3;
|
parts[r].vy = ry * 3;
|
||||||
|
if (r>i)
|
||||||
|
{
|
||||||
|
// Make sure movement doesn't happen until next frame, to avoid gaps in the beams of photons produced
|
||||||
|
parts[r].flags |= FLAG_SKIPMOVE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -61,6 +61,11 @@ int update_PCLN(UPDATE_FUNC_ARGS) {
|
|||||||
{
|
{
|
||||||
parts[r].vx = rx * 3;
|
parts[r].vx = rx * 3;
|
||||||
parts[r].vy = ry * 3;
|
parts[r].vy = ry * 3;
|
||||||
|
if (r>i)
|
||||||
|
{
|
||||||
|
// Make sure movement doesn't happen until next frame, to avoid gaps in the beams of photons produced
|
||||||
|
parts[r].flags |= FLAG_SKIPMOVE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,6 +46,7 @@
|
|||||||
#define PROP_SPARKSETTLE 0x20000 //2^17 Allow Sparks/Embers to settle
|
#define PROP_SPARKSETTLE 0x20000 //2^17 Allow Sparks/Embers to settle
|
||||||
|
|
||||||
#define FLAG_STAGNANT 1
|
#define FLAG_STAGNANT 1
|
||||||
|
#define FLAG_SKIPMOVE 0x2 // skip movement for one frame, only implemented for PHOT
|
||||||
|
|
||||||
#define ST_NONE 0
|
#define ST_NONE 0
|
||||||
#define ST_SOLID 1
|
#define ST_SOLID 1
|
||||||
|
@ -2922,6 +2922,12 @@ killed:
|
|||||||
|
|
||||||
if ((t==PT_PHOT||t==PT_NEUT||t==PT_ELEC)) {
|
if ((t==PT_PHOT||t==PT_NEUT||t==PT_ELEC)) {
|
||||||
if (t == PT_PHOT) {
|
if (t == PT_PHOT) {
|
||||||
|
if (parts[i].flags&FLAG_SKIPMOVE)
|
||||||
|
{
|
||||||
|
parts[i].flags &= ~FLAG_SKIPMOVE;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
rt = pmap[fin_y][fin_x] & 0xFF;
|
rt = pmap[fin_y][fin_x] & 0xFF;
|
||||||
lt = pmap[y][x] & 0xFF;
|
lt = pmap[y][x] & 0xFF;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user