… | |
… | |
90 | |
90 | |
91 | pl->speed_left -= csp->time; |
91 | pl->speed_left -= csp->time; |
92 | |
92 | |
93 | csp->func (pl, cp); |
93 | csp->func (pl, cp); |
94 | } |
94 | } |
95 | |
|
|
96 | /* A character time can never exceed his speed (which in many cases, |
|
|
97 | * if wearing armor, is less than one.) Thus, in most cases, if |
|
|
98 | * the command takes 1.0, the player's speed will be less than zero. |
|
|
99 | * it is only really an issue if time goes below -1 |
|
|
100 | * Due to various reasons that are too long to go into here, we will |
|
|
101 | * actually still execute player even if his time is less than 0, |
|
|
102 | * but greater than -1. This is to improve the performance of the |
|
|
103 | * new client/server. In theory, it shouldn't make much difference. |
|
|
104 | */ |
|
|
105 | |
|
|
106 | if (csp->time && pl->speed_left < -2.0) |
|
|
107 | LOG (llevDebug, "execute_newclient_command: Player issued command that takes more time than he has left.\n"); |
|
|
108 | } |
95 | } |
109 | |
96 | |
110 | int |
97 | int |
111 | command_run (object *op, char *params) |
98 | command_run (object *op, char *params) |
112 | { |
99 | { |