|
Lines 159-165
Link Here
|
| 159 |
} |
159 |
} |
| 160 |
if (distance <= (radius + TANKHEIGHT/2) && tank->l > 0) { |
160 |
if (distance <= (radius + TANKHEIGHT/2) && tank->l > 0) { |
| 161 |
_global->updateMenu = 1; |
161 |
_global->updateMenu = 1; |
| 162 |
tank->damage = (int) ((float) damage * ((float) 1 - ((fabs (distance) / (float)radius) / 2)) * player->damageMultiplier); |
162 |
tank->damage = (int) ((player ? (float) damage * player->damageMultiplier : (float) damage) * ((float) 1 - ((fabs (distance) / (float)radius) / 2))); |
| 163 |
|
163 |
|
| 164 |
tank->creditTo = player; |
164 |
tank->creditTo = player; |
| 165 |
tank->applyDamage (); |
165 |
tank->applyDamage (); |
|
Lines 253-259
Link Here
|
| 253 |
if (a > 1 && a <= EXPLODEFRAMES + 1) { |
253 |
if (a > 1 && a <= EXPLODEFRAMES + 1) { |
| 254 |
int startCirc = (radius / EXPLODEFRAMES) * a; |
254 |
int startCirc = (radius / EXPLODEFRAMES) * a; |
| 255 |
circlefill (_env->terrain, (int)x, (int)y, startCirc, PINK); |
255 |
circlefill (_env->terrain, (int)x, (int)y, startCirc, PINK); |
| 256 |
circle (dest, (int)x, (int)y, startCirc, player->color); |
256 |
circle (dest, (int)x, (int)y, startCirc, player ? player->color : WHITE); |
| 257 |
setUpdateArea ((int)x - (radius + 1), (int)y - (radius + 1), (radius + 1) * 2, (radius + 1) * 2); |
257 |
setUpdateArea ((int)x - (radius + 1), (int)y - (radius + 1), (radius + 1) * 2, (radius + 1) * 2); |
| 258 |
} |
258 |
} |
| 259 |
} else if ((type >= RIOT_CHARGE) && (type <= RIOT_BLAST)) { |
259 |
} else if ((type >= RIOT_CHARGE) && (type <= RIOT_BLAST)) { |
|
Lines 261-267
Link Here
|
| 261 |
double sx = x - _global->slope[angle][0] * 15; |
261 |
double sx = x - _global->slope[angle][0] * 15; |
| 262 |
double sy = y - _global->slope[angle][1] * 15; |
262 |
double sy = y - _global->slope[angle][1] * 15; |
| 263 |
int startCirc = (radius / EXPLODEFRAMES) * a; |
263 |
int startCirc = (radius / EXPLODEFRAMES) * a; |
| 264 |
triangle (dest, (int)sx, (int)sy, (int)(sx + _global->slope[(angle + 45) % 360][0] * startCirc), (int)(sy + _global->slope[(angle + 45) % 360][1] * startCirc),(int)(sx + _global->slope[(angle + 315) % 360][0] * startCirc),(int)(sy + _global->slope[(angle + 315) % 360][1] * startCirc), player->color); |
264 |
triangle (dest, (int)sx, (int)sy, (int)(sx + _global->slope[(angle + 45) % 360][0] * startCirc), (int)(sy + _global->slope[(angle + 45) % 360][1] * startCirc),(int)(sx + _global->slope[(angle + 315) % 360][0] * startCirc),(int)(sy + _global->slope[(angle + 315) % 360][1] * startCirc), player ? player->color : WHITE); |
| 265 |
setUpdateArea ((int)sx - (startCirc + 1), (int)sy - (startCirc + 1), (startCirc + 1) * 2, (startCirc + 1) * 2); |
265 |
setUpdateArea ((int)sx - (startCirc + 1), (int)sy - (startCirc + 1), (startCirc + 1) * 2, (startCirc + 1) * 2); |
| 266 |
} |
266 |
} |
| 267 |
} else { |
267 |
} else { |