diff options
| -rw-r--r-- | src/client/hudenginestatus.cc | 21 | 
1 files changed, 16 insertions, 5 deletions
diff --git a/src/client/hudenginestatus.cc b/src/client/hudenginestatus.cc index 04b6f63..6b55344 100644 --- a/src/client/hudenginestatus.cc +++ b/src/client/hudenginestatus.cc @@ -33,13 +33,24 @@ void HUDEngineStatus::draw()  	s[1] -= 2.0f * padding;  	// thrust +	const float blink_t = core::application()->time() * 2.0f;  	std::ostringstream thruststr; -	if (core::localcontrol()->state() == core::Entity::Normal) { -		thruststr << "^B" << roundf(core::localcontrol()->thrust() * 100.0f) << "%"; -	} else { -		thruststr << "^B--"; +	switch(core::localcontrol()->state()) { +		case core::Entity::Normal: +			thruststr << "^B" << roundf(core::localcontrol()->thrust() * 100.0f) << "%"; +			break; +		case core::Entity::ImpulseInitiate: +		case core::Entity::JumpInitiate: +			 +			if ((blink_t - floorf(blink_t)) < 0.5f) { +				thruststr << "^B--"; +			} +			break; +		default: +			thruststr << "^B--"; +			break;  	} -	 +  	// speed  	std::ostringstream speedstr;  	speedstr << "^B" << roundf(core::localcontrol()->speed() * 100.0f);  | 
