src/players.cpp
changeset 7144 f058df019ea2
parent 7139 4ae3ab180d05
child 7181 f966d75af3a6
equal deleted inserted replaced
7143:59366b8e133b 7144:f058df019ea2
   693 			}
   693 			}
   694 			break;
   694 			break;
   695 		case 3: {
   695 		case 3: {
   696 			EngineID old_engine_type = GB(p2, 0, 16);
   696 			EngineID old_engine_type = GB(p2, 0, 16);
   697 			EngineID new_engine_type = GB(p2, 16, 16);
   697 			EngineID new_engine_type = GB(p2, 16, 16);
   698 			GroupID id_g = GB(p1, 16, 8);
   698 			GroupID id_g = GB(p1, 16, 16);
   699 			int32 cost;
   699 			int32 cost;
   700 
   700 
   701 			if (!IsValidGroupID(id_g)) return CMD_ERROR;
   701 			if (!IsValidGroupID(id_g) && !IsDefaultGroupID(id_g)) return CMD_ERROR;
   702 
       
   703 			if (new_engine_type != INVALID_ENGINE) {
   702 			if (new_engine_type != INVALID_ENGINE) {
   704 				/* First we make sure that it's a valid type the user requested
   703 				/* First we make sure that it's a valid type the user requested
   705 				 * check that it's an engine that is in the engine array */
   704 				 * check that it's an engine that is in the engine array */
   706 				if (!IsEngineIndex(new_engine_type))
   705 				if (!IsEngineIndex(new_engine_type))
   707 					return CMD_ERROR;
   706 					return CMD_ERROR;