Example #1
0
	/** Called on every draw */
	void refresh(const game_display& disp,const map_location& loc) {
		if (state_ == STATE_FORGET  && anim_ && anim_->animation_finished_potential()) {
			set_standing( loc);
			return;
		}
		if (state_ != STATE_STANDING || (get_current_animation_tick() < next_idling_) || incapacitated()) return;
		if (get_current_animation_tick() > next_idling_ + 1000) { // prevent all units animating at the same
			set_standing(loc);
		} else {
			set_idling(disp, loc);
		}
	}
Example #2
0
	bool emits_zoc() const { return emit_zoc_ && !incapacitated();}
Example #3
0
	int attacks_left() const { return (attacks_left_ == 0 || incapacitated()) ? 0 : attacks_left_; }
Example #4
0
	/// Returns how far a unit can move this turn (zero if incapacitated).
	int movement_left() const { return (movement_ == 0 || incapacitated()) ? 0 : movement_; }