equal
deleted
inserted
replaced
568 if (w == NULL) |
568 if (w == NULL) |
569 return; |
569 return; |
570 |
570 |
571 u->next = w; |
571 u->next = w; |
572 InitializeDisasterVehicle(w, -6 * TILE_SIZE, v->y_pos, 0, DIR_SW, 12); |
572 InitializeDisasterVehicle(w, -6 * TILE_SIZE, v->y_pos, 0, DIR_SW, 12); |
573 w->vehstatus |= VS_DISASTER; |
573 w->vehstatus |= VS_SHADOW; |
574 } else if (v->current_order.station < 1) { |
574 } else if (v->current_order.station < 1) { |
575 |
575 |
576 int x = TileX(v->dest_tile) * TILE_SIZE; |
576 int x = TileX(v->dest_tile) * TILE_SIZE; |
577 int y = TileY(v->dest_tile) * TILE_SIZE; |
577 int y = TileY(v->dest_tile) * TILE_SIZE; |
578 if (abs(x - v->x_pos) + abs(y - v->y_pos) >= TILE_SIZE) { |
578 if (abs(x - v->x_pos) + abs(y - v->y_pos) >= TILE_SIZE) { |
734 // Allocate shadow too? |
734 // Allocate shadow too? |
735 u = ForceAllocateSpecialVehicle(); |
735 u = ForceAllocateSpecialVehicle(); |
736 if (u != NULL) { |
736 if (u != NULL) { |
737 v->next = u; |
737 v->next = u; |
738 InitializeDisasterVehicle(u, x, 0, 0, DIR_SE, 1); |
738 InitializeDisasterVehicle(u, x, 0, 0, DIR_SE, 1); |
739 u->vehstatus |= VS_DISASTER; |
739 u->vehstatus |= VS_SHADOW; |
740 } |
740 } |
741 } |
741 } |
742 |
742 |
743 static void Disaster1_Init(void) |
743 static void Disaster1_Init(void) |
744 { |
744 { |
756 // Allocate shadow too? |
756 // Allocate shadow too? |
757 u = ForceAllocateSpecialVehicle(); |
757 u = ForceAllocateSpecialVehicle(); |
758 if (u != NULL) { |
758 if (u != NULL) { |
759 v->next = u; |
759 v->next = u; |
760 InitializeDisasterVehicle(u, x, 0, 0, DIR_SE, 3); |
760 InitializeDisasterVehicle(u, x, 0, 0, DIR_SE, 3); |
761 u->vehstatus |= VS_DISASTER; |
761 u->vehstatus |= VS_SHADOW; |
762 } |
762 } |
763 } |
763 } |
764 |
764 |
765 static void Disaster2_Init(void) |
765 static void Disaster2_Init(void) |
766 { |
766 { |
790 |
790 |
791 u = ForceAllocateSpecialVehicle(); |
791 u = ForceAllocateSpecialVehicle(); |
792 if (u != NULL) { |
792 if (u != NULL) { |
793 v->next = u; |
793 v->next = u; |
794 InitializeDisasterVehicle(u, x, y, 0, DIR_SE, 5); |
794 InitializeDisasterVehicle(u, x, y, 0, DIR_SE, 5); |
795 u->vehstatus |= VS_DISASTER; |
795 u->vehstatus |= VS_SHADOW; |
796 } |
796 } |
797 } |
797 } |
798 |
798 |
799 static void Disaster3_Init(void) |
799 static void Disaster3_Init(void) |
800 { |
800 { |
824 |
824 |
825 u = ForceAllocateSpecialVehicle(); |
825 u = ForceAllocateSpecialVehicle(); |
826 if (u != NULL) { |
826 if (u != NULL) { |
827 v->next = u; |
827 v->next = u; |
828 InitializeDisasterVehicle(u, x, y, 0, DIR_SW, 7); |
828 InitializeDisasterVehicle(u, x, y, 0, DIR_SW, 7); |
829 u->vehstatus |= VS_DISASTER; |
829 u->vehstatus |= VS_SHADOW; |
830 |
830 |
831 w = ForceAllocateSpecialVehicle(); |
831 w = ForceAllocateSpecialVehicle(); |
832 if (w != NULL) { |
832 if (w != NULL) { |
833 u->next = w; |
833 u->next = w; |
834 InitializeDisasterVehicle(w, x, y, 140, DIR_SW, 8); |
834 InitializeDisasterVehicle(w, x, y, 140, DIR_SW, 8); |
853 // Allocate shadow too? |
853 // Allocate shadow too? |
854 u = ForceAllocateSpecialVehicle(); |
854 u = ForceAllocateSpecialVehicle(); |
855 if (u != NULL) { |
855 if (u != NULL) { |
856 v->next = u; |
856 v->next = u; |
857 InitializeDisasterVehicle(u, x, y, 0, DIR_NW, 10); |
857 InitializeDisasterVehicle(u, x, y, 0, DIR_NW, 10); |
858 u->vehstatus |= VS_DISASTER; |
858 u->vehstatus |= VS_SHADOW; |
859 } |
859 } |
860 } |
860 } |
861 |
861 |
862 // Submarine type 1 |
862 // Submarine type 1 |
863 static void Disaster5_Init(void) |
863 static void Disaster5_Init(void) |