version 1.7 | | version 1.8 |
---|
| | |
/* | | /* |
* static char *rcsid_skill_util_c = | | * static char *rcsid_skill_util_c = |
* "$Id: skill_util.c,v 1.7 2000/08/02 06:04:50 cvs Exp $"; | | * "$Id: skill_util.c,v 1.8 2000/08/25 06:23:28 cvs Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
for(i=0;i<exp_index;i++) { | | for(i=0;i<exp_index;i++) { |
if(!QUERY_FLAG(exp_ob[i],FLAG_APPLIED)) | | if(!QUERY_FLAG(exp_ob[i],FLAG_APPLIED)) |
SET_FLAG(exp_ob[i],FLAG_APPLIED); | | SET_FLAG(exp_ob[i],FLAG_APPLIED); |
| | /* GD: Update perm exp when loading player. */ |
| | if (settings.use_permanent_experience) |
| | calc_perm_exp(exp_ob[i]); |
pl->stats.exp += exp_ob[i]->stats.exp; | | pl->stats.exp += exp_ob[i]->stats.exp; |
player_lvl_adj(NULL, exp_ob[i]); | | player_lvl_adj(NULL, exp_ob[i]); |
} | | } |
| | |
{ | | { |
int rv; | | int rv; |
| | |
rv = (a*100)/b; | | if (b <= 0) |
| | return 0; |
| | |
| | rv = (int)((100.0f * ((float)a) / ((float)b) ) + 0.5f); |
| | |
if (rv < 0) | | if (rv < 0) |
return 0; | | return 0; |