(svn r2297) - CodeChange: server-check the next batch of commands.

- CodeChange: since only the server will be able to modify difficulty settings, leave the checking of correct values besides, and trust users will join legit servers.
- CodeChange: for renaming signs, only check if GetDParam(); eg _decode_parameters is empty ('\0') or not, instead of the extra check of players, etc. That basically does the same thing. Also dirty sign two times when renaming, once before, once after the action. Because if the name becomes shorter and you update only after, garbage remains on the screen.
- CodeChange: made GetMaskOfTownActions() available to the town-cmd to double-check if the action was available to the player. For this purpose the hardcoded _local_player has been removed from the function and is now passed as a parameter.
This commit is contained in:
Darkvater
2005-05-12 00:11:37 +00:00
parent f3b217db9d
commit 921cc4e94a
13 changed files with 340 additions and 232 deletions

View File

@@ -69,7 +69,7 @@ void HandleOnEditText(WindowEvent *e) {
switch(_rename_what) {
case 0:
// for empty string send "remove sign" parameter
DoCommandP(0, id, (*b==0)?OWNER_NONE:_current_player, NULL, CMD_RENAME_SIGN | CMD_MSG(STR_280C_CAN_T_CHANGE_SIGN_NAME));
DoCommandP(0, id, 0, NULL, CMD_RENAME_SIGN | CMD_MSG(STR_280C_CAN_T_CHANGE_SIGN_NAME));
break;
case 1:
if(*b == 0)