version 1.32 | | version 1.33 |
---|
| | |
/* | | /* |
* static char *rcsid_skill_util_c = | | * static char *rcsid_skill_util_c = |
* "$Id: skill_util.c,v 1.32 2002/11/14 00:19:32 garbled Exp $"; | | * "$Id: skill_util.c,v 1.33 2002/11/26 08:37:11 garbled Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
*/ | | */ |
if(op->type==PLAYER && QUERY_FLAG(op,FLAG_READY_WEAPON) | | if(op->type==PLAYER && QUERY_FLAG(op,FLAG_READY_WEAPON) |
&& (!op->chosen_skill || op->chosen_skill->stats.sp!=SK_MELEE_WEAPON)) { | | && (!op->chosen_skill || op->chosen_skill->stats.sp!=SK_MELEE_WEAPON)) { |
#ifdef NO_AUTO_SKILL_SWITCH | | |
rangetype oldrange=op->contr->shoottype; | | rangetype oldrange=op->contr->shoottype; |
#endif | | |
(void) change_skill(op,SK_MELEE_WEAPON); | | (void) change_skill(op,SK_MELEE_WEAPON); |
| | |
/* This is just a simple hack - would probably be cleaner to have change_skill | | /* This is just a simple hack - would probably be cleaner to have change_skill |
* do the right thing, but this isn't that bad. | | * do the right thing, but this isn't that bad. |
*/ | | */ |
#ifdef NO_AUTO_SKILL_SWITCH | | |
if (op->contr->shoottype!=oldrange) { | | if (op->contr->shoottype!=oldrange) { |
op->contr->shoottype=oldrange; | | op->contr->shoottype=oldrange; |
} | | } |
#endif | | |
} | | } |
| | |
/* lose invisiblity/hiding status for running attacks */ | | /* lose invisiblity/hiding status for running attacks */ |