mirror of
https://github.com/Relintai/godot-lportal.git
synced 2024-11-11 10:52:09 +01:00
Just small changes
This commit is contained in:
parent
4bfe94b2b1
commit
41972955e4
@ -791,7 +791,13 @@ bool LRoomManager::Light_FindCasters(int lightID)
|
||||
|
||||
void LRoomManager::Light_UpdateTransform(LLight &light, const Light &glight) const
|
||||
{
|
||||
// assert (glight.is_in_tree());
|
||||
if (!glight.get_parent())
|
||||
{
|
||||
WARN_PRINT_ONCE("LRoomManager::Light_UpdateTransform Light is not in tree");
|
||||
return;
|
||||
}
|
||||
|
||||
// get global transform only works if glight is in the tree
|
||||
Transform tr = glight.get_global_transform();
|
||||
light.m_Source.m_ptPos = tr.origin;
|
||||
light.m_Source.m_ptDir = -tr.basis.get_axis(2); // or possibly get_axis .. z is what we want
|
||||
@ -908,12 +914,6 @@ int LRoomManager::dynamic_light_register(Node * pLightNode, float radius)
|
||||
return -1;
|
||||
}
|
||||
|
||||
//bool LRoomManager::dynamic_light_register_hint(Node * pLightNode, float radius, Node * pRoom)
|
||||
//{
|
||||
// // NYI
|
||||
// return true;
|
||||
//}
|
||||
|
||||
|
||||
bool LRoomManager::dynamic_light_unregister(int light_id)
|
||||
{
|
||||
|
@ -97,9 +97,8 @@ public:
|
||||
|
||||
// dynamic lights (spot or omni within rooms)
|
||||
// returns light ID
|
||||
// int dynamic_light_register(Node * pLightNode, const Vector3 &pos, const Vector3 &dir, float radius);
|
||||
// only lights within the rooms on conversion are supported so far
|
||||
int dynamic_light_register(Node * pLightNode, float radius);
|
||||
// bool dynamic_light_register_hint(Node * pLightNode, float radius, Node * pRoom);
|
||||
bool dynamic_light_unregister(int light_id);
|
||||
int dynamic_light_update(int light_id, const Vector3 &pos, const Vector3 &dir); // returns room within
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user