Add controller lightbar response based on ingame events. Release Build 8399.
This commit is contained in:
		
							parent
							
								
									07d4dbf1b4
								
							
						
					
					
						commit
						df0d7d680f
					
				| @ -1720,6 +1720,8 @@ void AiL::RenderHud(){ | ||||
| 		if(runTimeAmt<"Player.Health Warning Flicker Time"_F){ | ||||
| 			healthOutlineCol="Player.Health Warning Outline Color"_Pixel; | ||||
| 		} | ||||
| 		 | ||||
| 		Input::SetLightbar(healthOutlineCol); | ||||
| 	} | ||||
| 	 | ||||
| 	DrawDecal({2,2},GFX["heart_outline.png"].Decal(),{1.f,1.f},healthOutlineCol); | ||||
|  | ||||
| @ -1219,4 +1219,12 @@ const int Input::GetKeyCode()const{ | ||||
| 
 | ||||
| const bool InputEngageGroup::GetLabelVisible()const{ | ||||
| 	return labelVisible; | ||||
| } | ||||
| 
 | ||||
| void Input::SetLightbar(const Pixel col){ | ||||
| 	if(SteamInput()){ | ||||
| 		for(int i=0;i<controllerCount;i++){ | ||||
| 			SteamInput()->SetLEDColor(steamControllers[i],col.r,col.g,col.b,0); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
| @ -140,6 +140,7 @@ public: | ||||
| 	const int GetKeyCode()const; | ||||
| 	friend const bool operator==(const Input&input1,const Input&input2); | ||||
| 	std::string GetProperIconName(std::string currentIconName)const; | ||||
| 	static void SetLightbar(const Pixel col); | ||||
| 	static uint64_t ingameControlsHandle; | ||||
| }; | ||||
| 
 | ||||
|  | ||||
| @ -748,6 +748,7 @@ bool Player::Hurt(int damage,bool onUpperLevel,float z){ | ||||
| 	 | ||||
| 	hurtRumbleTime="Player.Hurt Rumble Time"_F; | ||||
| 	Input::StartVibration(); | ||||
| 	Input::SetLightbar(PixelLerp(GREEN,DARK_RED,GetHealth()/GetMaxHealth())); | ||||
| 
 | ||||
| 	if(lastHitTimer>0){ | ||||
| 		damageNumberPtr.get()->damage+=int(mod_dmg); | ||||
| @ -1016,6 +1017,7 @@ bool Player::Heal(int damage,bool suppressDamageNumber){ | ||||
| 	if(!suppressDamageNumber&&damage>0){ | ||||
| 		DAMAGENUMBER_LIST.push_back(std::make_shared<DamageNumber>(GetPos(),damage,true,HEALTH_GAIN)); | ||||
| 	} | ||||
| 	Input::SetLightbar(PixelLerp(GREEN,DARK_RED,GetHealth()/GetMaxHealth())); | ||||
| 	return true; | ||||
| } | ||||
| 
 | ||||
|  | ||||
| @ -83,6 +83,7 @@ void State_Death::OnUserUpdate(AiL*game){ | ||||
| 			Menu::OpenMenu(MenuType::DEATH); | ||||
| 		} | ||||
| 		game->SetMosaicEffect(uint8_t(util::lerp(9.f,1.f,(gameSlowdownPct-7)/3.f))); | ||||
| 		Input::SetLightbar(PixelLerp(BLACK,DARK_RED,sin((1.5*game->GetRuntime())/2.f)+0.5f)); | ||||
| 	} | ||||
| 
 | ||||
| 	if(gameSlowdownPct<10.f){ | ||||
|  | ||||
| @ -39,7 +39,7 @@ All rights reserved. | ||||
| #define VERSION_MAJOR 1 | ||||
| #define VERSION_MINOR 0 | ||||
| #define VERSION_PATCH 0 | ||||
| #define VERSION_BUILD 8398 | ||||
| #define VERSION_BUILD 8399 | ||||
| 
 | ||||
| #define stringify(a) stringify_(a) | ||||
| #define stringify_(a) #a | ||||
|  | ||||
										
											Binary file not shown.
										
									
								
							
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user