@@ -51,14 +51,14 @@ int Element_POLO::update(UPDATE_FUNC_ARGS)
51
51
const int cooldown = 15 ;
52
52
const int limit = 5 ;
53
53
54
- int r, s;
55
- r = sim->photons [y][x];
56
- if (parts[i].tmp < limit && !parts[i].life )
54
+ int r = sim->photons [y][x];
55
+ if (parts[i].tmp < limit && !parts[i].life )
57
56
{
58
57
if (!(rand ()%1000 ) &&!parts[i].tmp )
59
58
{
60
- s = sim->create_part (-3 , x, y, PT_NEUT);
61
- if (s >= 0 ) {
59
+ int s = sim->create_part (-3 , x, y, PT_NEUT);
60
+ if (s >= 0 )
61
+ {
62
62
parts[i].life = cooldown;
63
63
parts[i].tmp ++;
64
64
@@ -68,9 +68,11 @@ int Element_POLO::update(UPDATE_FUNC_ARGS)
68
68
}
69
69
70
70
71
- if (!(rand ()%10000 )) {
72
- s = sim->create_part (-3 , x, y, PT_NEUT);
73
- if (s >= 0 ) {
71
+ if (!(rand ()%10000 ))
72
+ {
73
+ int s = sim->create_part (-3 , x, y, PT_NEUT);
74
+ if (s >= 0 )
75
+ {
74
76
parts[i].temp = ((parts[i].temp + parts[r>>8 ].temp + parts[r>>8 ].temp ) + 600 .0f ) / 3 .0f ;
75
77
parts[i].life = cooldown;
76
78
parts[i].tmp ++;
@@ -83,30 +85,37 @@ int Element_POLO::update(UPDATE_FUNC_ARGS)
83
85
}
84
86
}
85
87
}
86
- if (parts[i].tmp2 >= 20 ) {
88
+ if (parts[i].tmp2 >= 20 )
89
+ {
87
90
sim->part_change_type (i,x,y,PT_PLUT);
88
91
parts[i].temp = (parts[i].temp +600 .0f )/2 .0f ;
89
92
return 1 ;
90
93
}
91
- if (parts[r>>8 ].type == PT_PROT) {
94
+ if (parts[r>>8 ].type == PT_PROT)
95
+ {
92
96
parts[i].tmp2 ++;
93
97
sim->kill_part (r>>8 );
94
98
}
95
- if (parts[i].temp <388 .15f ) {
96
- if (388 .15f -parts[i].temp >= 0 .2f ) {
99
+ if (parts[i].temp < 388 .15f )
100
+ {
101
+ if (parts[i].temp >= 388 .15f -0 .2f )
102
+ {
97
103
parts[i].temp += 0 .2f ;
98
- } else {
99
- parts[i].temp += 388 .15f -parts[i].temp ; // no overheating!
104
+ }
105
+ else
106
+ {
107
+ // no overheating!
108
+ parts[i].temp += 388 .15f -parts[i].temp ;
100
109
}
101
110
}
102
111
return 0 ;
103
112
}
104
113
105
-
106
114
// #TPT-Directive ElementHeader Element_POLO static int graphics(GRAPHICS_FUNC_ARGS)
107
115
int Element_POLO::graphics (GRAPHICS_FUNC_ARGS)
108
116
{
109
- if (cpart->tmp >= 5 ) {
117
+ if (cpart->tmp >= 5 )
118
+ {
110
119
*colr = 0x70 ;
111
120
*colg = 0x70 ;
112
121
*colb = 0x70 ;
0 commit comments