tunnelbridge_cmd.c
changeset 2989 916f9443345f
parent 2958 ac0a9673b522
child 3017 a75caf4efa2d
equal deleted inserted replaced
2988:26ff5a921204 2989:916f9443345f
  1464 static const byte _tunnel_fractcoord_6[4] = {0x92, 0x89, 0x56, 0x45};
  1464 static const byte _tunnel_fractcoord_6[4] = {0x92, 0x89, 0x56, 0x45};
  1465 static const byte _tunnel_fractcoord_7[4] = {0x52, 0x85, 0x96, 0x49};
  1465 static const byte _tunnel_fractcoord_7[4] = {0x52, 0x85, 0x96, 0x49};
  1466 
  1466 
  1467 static uint32 VehicleEnter_TunnelBridge(Vehicle *v, TileIndex tile, int x, int y)
  1467 static uint32 VehicleEnter_TunnelBridge(Vehicle *v, TileIndex tile, int x, int y)
  1468 {
  1468 {
  1469 	int z;
       
  1470 	int dir, vdir;
  1469 	int dir, vdir;
  1471 	byte fc;
       
  1472 
  1470 
  1473 	if (GB(_m[tile].m5, 4, 4) == 0) {
  1471 	if (GB(_m[tile].m5, 4, 4) == 0) {
  1474 		z = GetSlopeZ(x, y) - v->z_pos;
  1472 		int z = GetSlopeZ(x, y) - v->z_pos;
       
  1473 		byte fc;
       
  1474 
  1475 		if (myabs(z) > 2) return 8;
  1475 		if (myabs(z) > 2) return 8;
  1476 
  1476 
  1477 		if (v->type == VEH_Train) {
  1477 		if (v->type == VEH_Train) {
  1478 			fc = (x & 0xF) + (y << 4);
  1478 			fc = (x & 0xF) + (y << 4);
  1479 
  1479