equal
deleted
inserted
replaced
649 p->name_1 = 0; |
649 p->name_1 = 0; |
650 p->president_name_1 = 0; |
650 p->president_name_1 = 0; |
651 } |
651 } |
652 |
652 |
653 /** Change engine renewal parameters |
653 /** Change engine renewal parameters |
654 * @param x,y unused |
654 * @param tile unused |
655 * @param p1 bits 0-3 command |
655 * @param p1 bits 0-3 command |
656 * - p1 = 0 - change auto renew bool |
656 * - p1 = 0 - change auto renew bool |
657 * - p1 = 1 - change auto renew months |
657 * - p1 = 1 - change auto renew months |
658 * - p1 = 2 - change auto renew money |
658 * - p1 = 2 - change auto renew money |
659 * - p1 = 3 - change auto renew array |
659 * - p1 = 3 - change auto renew array |
674 * - p1 bits 16-31 = months left before engine expires to replace it |
674 * - p1 bits 16-31 = months left before engine expires to replace it |
675 * - p2 bits 0-31 = minimum amount of money available |
675 * - p2 bits 0-31 = minimum amount of money available |
676 * if p1 = 5, then |
676 * if p1 = 5, then |
677 * - p2 = enable renew_keep_length |
677 * - p2 = enable renew_keep_length |
678 */ |
678 */ |
679 int32 CmdReplaceVehicle(int x, int y, uint32 flags, uint32 p1, uint32 p2) |
679 int32 CmdReplaceVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) |
680 { |
680 { |
681 Player *p; |
681 Player *p; |
682 if (!(_current_player < MAX_PLAYERS)) |
682 if (!(_current_player < MAX_PLAYERS)) |
683 return CMD_ERROR; |
683 return CMD_ERROR; |
684 |
684 |
782 } |
782 } |
783 return 0; |
783 return 0; |
784 } |
784 } |
785 |
785 |
786 /** Control the players: add, delete, etc. |
786 /** Control the players: add, delete, etc. |
787 * @param x,y unused |
787 * @param tile unused |
788 * @param p1 various functionality |
788 * @param p1 various functionality |
789 * - p1 = 0 - create a new player, Which player (network) it will be is in p2 |
789 * - p1 = 0 - create a new player, Which player (network) it will be is in p2 |
790 * - p1 = 1 - create a new AI player |
790 * - p1 = 1 - create a new AI player |
791 * - p1 = 2 - delete a player. Player is identified by p2 |
791 * - p1 = 2 - delete a player. Player is identified by p2 |
792 * - p1 = 3 - merge two companies together. Player to merge #1 with player #2. Identified by p2 |
792 * - p1 = 3 - merge two companies together. Player to merge #1 with player #2. Identified by p2 |
800 * on the server itself. First of all this is unbelievably ugly; second of all, well, |
800 * on the server itself. First of all this is unbelievably ugly; second of all, well, |
801 * it IS ugly! <b>Someone fix this up :)</b> So where to fix?@n |
801 * it IS ugly! <b>Someone fix this up :)</b> So where to fix?@n |
802 * @arg - network_server.c:838 DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_COMMAND)@n |
802 * @arg - network_server.c:838 DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_COMMAND)@n |
803 * @arg - network_client.c:536 DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_MAP) from where the map has been received |
803 * @arg - network_client.c:536 DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_MAP) from where the map has been received |
804 */ |
804 */ |
805 int32 CmdPlayerCtrl(int x, int y, uint32 flags, uint32 p1, uint32 p2) |
805 int32 CmdPlayerCtrl(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) |
806 { |
806 { |
807 if (flags & DC_EXEC) _current_player = OWNER_NONE; |
807 if (flags & DC_EXEC) _current_player = OWNER_NONE; |
808 |
808 |
809 switch (p1) { |
809 switch (p1) { |
810 case 0: { /* Create a new player */ |
810 case 0: { /* Create a new player */ |