floorzgoal is set to 0 if the sector is moving down and to -1 if it has reached its z destination.
See ceilingzgoal.