mirror of
				https://github.com/luanti-org/luanti.git
				synced 2025-10-30 23:15:32 +01:00 
			
		
		
		
	Add node field to PlayerHPChangeReason table (#8368)
This commit is contained in:
		
				
					committed by
					
						 rubenwardy
						rubenwardy
					
				
			
			
				
	
			
			
			
						parent
						
							1e5f2e0f13
						
					
				
				
					commit
					22ad820aa4
				
			| @@ -401,10 +401,14 @@ struct PlayerHPChangeReason { | ||||
| 	}; | ||||
| 
 | ||||
| 	Type type = SET_HP; | ||||
| 	ServerActiveObject *object; | ||||
| 	bool from_mod = false; | ||||
| 	int lua_reference = -1; | ||||
| 
 | ||||
| 	// For PLAYER_PUNCH
 | ||||
| 	ServerActiveObject *object = nullptr; | ||||
| 	// For NODE_DAMAGE
 | ||||
| 	std::string node; | ||||
| 
 | ||||
| 	inline bool hasLuaReference() const | ||||
| 	{ | ||||
| 		return lua_reference >= 0; | ||||
| @@ -450,7 +454,15 @@ struct PlayerHPChangeReason { | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	PlayerHPChangeReason(Type type, ServerActiveObject *object=NULL): | ||||
| 	PlayerHPChangeReason(Type type): | ||||
| 			type(type) | ||||
| 	{} | ||||
| 
 | ||||
| 	PlayerHPChangeReason(Type type, ServerActiveObject *object): | ||||
| 			type(type), object(object) | ||||
| 	{} | ||||
| 
 | ||||
| 	PlayerHPChangeReason(Type type, std::string node): | ||||
| 			type(type), node(node) | ||||
| 	{} | ||||
| }; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user