version 1.6 | | version 1.7 |
---|
| | |
/* | | /* |
* static char *rcsid_c_new_c = | | * static char *rcsid_c_new_c = |
* "$Id: c_new.c,v 1.6 2002/03/20 06:27:46 mwedel Exp $"; | | * "$Id: c_new.c,v 1.7 2003/10/21 17:16:29 ryo_saeba Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
| | |
int command_run(object *op, char *params) | | int command_run(object *op, char *params) |
{ | | { |
| | int dir; |
| | dir = params?atoi(params):0;
|
| | if ( dir<0 || dir>=9 ){
|
| | new_draw_info(NDI_UNIQUE, 0,op,"Can't run into a non adjacent square.");
|
| | return 0;
|
| | }
|
op->contr->run_on=1; | | op->contr->run_on=1; |
return (move_player(op, params?atoi(params):0)); | | return move_player(op, dir);
|
} | | } |
| | |
int command_run_stop(object *op, char *params) | | int command_run_stop(object *op, char *params) |
| | |
| | |
int command_fire(object *op, char *params) | | int command_fire(object *op, char *params) |
{ | | { |
| | int dir;
|
| | dir = params?atoi(params):0;
|
| | if ( dir<0 || dir>=9 ){
|
| | new_draw_info(NDI_UNIQUE, 0,op,"Can't fire to a non adjacent square.");
|
| | return 0;
|
| | };
|
op->contr->fire_on=1; | | op->contr->fire_on=1; |
return move_player(op, params?atoi(params):0); | | return move_player(op, dir);
|
} | | } |
| | |
int command_fire_stop(object *op, char *params) | | int command_fire_stop(object *op, char *params) |