PRTO fix
This commit is contained in:
parent
a6dabf2072
commit
15deb1145b
@ -6,8 +6,8 @@ int update_PRTO(UPDATE_FUNC_ARGS) {
|
|||||||
parts[i].tmp = (int)((parts[i].temp-73.15f)/100+1);
|
parts[i].tmp = (int)((parts[i].temp-73.15f)/100+1);
|
||||||
if (parts[i].tmp>=CHANNELS) parts[i].tmp = CHANNELS-1;
|
if (parts[i].tmp>=CHANNELS) parts[i].tmp = CHANNELS-1;
|
||||||
else if (parts[i].tmp<0) parts[i].tmp = 0;
|
else if (parts[i].tmp<0) parts[i].tmp = 0;
|
||||||
for (rx=-1; rx<2; rx++)
|
for (rx=1; rx>-2; rx--)
|
||||||
for (ry=-1; ry<2; ry++)
|
for (ry=1; ry>-2; ry--)
|
||||||
if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry))
|
if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry))
|
||||||
{
|
{
|
||||||
r = pmap[y+ry][x+rx];
|
r = pmap[y+ry][x+rx];
|
||||||
@ -21,8 +21,8 @@ int update_PRTO(UPDATE_FUNC_ARGS) {
|
|||||||
int randomness = count + rand()%3-1;
|
int randomness = count + rand()%3-1;
|
||||||
if (randomness<1)
|
if (randomness<1)
|
||||||
randomness=1;
|
randomness=1;
|
||||||
if (randomness>8)
|
if (randomness>9)
|
||||||
randomness=8;
|
randomness=9;
|
||||||
if (portal[parts[i].tmp][randomness-1][nnx]==PT_SPRK)// TODO: make it look better
|
if (portal[parts[i].tmp][randomness-1][nnx]==PT_SPRK)// TODO: make it look better
|
||||||
{
|
{
|
||||||
create_part(-1,x+1,y,portal[parts[i].tmp][randomness-1][nnx]);
|
create_part(-1,x+1,y,portal[parts[i].tmp][randomness-1][nnx]);
|
||||||
|
Loading…
Reference in New Issue
Block a user