1
0
mirror of https://gitlab.com/klmp200/LO41.git synced 2025-07-12 04:39:23 +00:00

To the moooo.... oh wait, not yet.

This commit is contained in:
Aethor
2018-06-21 20:26:35 +02:00
parent 55126c9ca6
commit 653734ec1f
3 changed files with 15 additions and 6 deletions

View File

@ -212,12 +212,7 @@ void go_to_floor_Building(THIS(Building), int origin, int destination, Passenger
this->elevators[elevator_number]->name, origin);
pthread_cond_wait(this->condition_floors[destination], this->mutex_cond_get_outside_elevator);
if (passenger->type == RESIDENT)
printf("Le résident %s sort de l'ascenseur %s à l'étage %d\n", passenger->get_name(passenger),
this->elevators[elevator_number]->name, destination);
else if (passenger->type == VISITOR)
printf("Le visiteur %s sort de l'ascenseur %s à l'étage %d\n", passenger->get_name(passenger),
this->elevators[elevator_number]->name, destination);
this->elevators[elevator_number]->remove_passenger(this->elevators[elevator_number], passenger);
}else{
if (passenger->type == RESIDENT)
printf("Le résident %s à l'étage %d n'a pas pu rentrer dans un ascenseur. Préempté !\n", passenger->get_name(passenger), origin);