Account for objects in lua LOS tests

This commit is contained in:
Lwmte 2022-09-13 02:24:57 +03:00
parent 299ae7a005
commit bd2c003b87

View file

@ -48,10 +48,16 @@ namespace Misc
pos1.StoreInGameVector(vec1);
vec1.roomNumber = roomNumber1;
pos2.StoreInGameVector(vec2);
return LOS(&vec1, &vec2);
MESH_INFO* mesh;
Vector3Int vector;
return LOS(&vec1, &vec2) && (ObjectOnLOS2(&vec1, &vec2, &vector, &mesh) == NO_LOS_ITEM);
}
///Vibrate game controller, if function is available and setting is on.
//@function Vibrate
//@tparam float strength Strength of the vibration
//@tparam float time __(default 0.3)__ Time of the vibration, in seconds
static void Vibrate(float strength, sol::optional<float> time)
{
Rumble(strength, time.value_or(0.3f), RumbleMode::Both);