original
Code: Select all
int player_check_energy(int which, int ani){
if(
self->model->animation[ani] &&
(which &&
self->model->animation[ani]->mponly != 2 &&
self->mp > self->model->animation[ani]->energycost) ||
(!which &&
self->model->animation[ani]->mponly != 1 &&
self->health > self->model->animation[ani]->energycost)
)
return 1;
return 0;
}
to the new version
Code: Select all
int player_check_energy(int which, int ani){
if(
self->model->animation[ani] &&
((which &&
(self->model->animation[ani]->mponly != 2) &&
(self->mp > self->model->animation[ani]->energycost)) ||
(!which &&
(self->model->animation[ani]->mponly != 1) &&
(self->health > self->model->animation[ani]->energycost)))
)
return 1;
return 0;
}