TombEngine/TR5Main/Game/objlight.cpp

21 lines
531 B
C++
Raw Normal View History

#include "framework.h"
#include "objlight.h"
#include "control.h"
#include "effect2.h"
void TriggerAlertLight(int x, int y, int z, int r, int g, int b, int angle, short room, int falloff)
{
GAME_VECTOR source, target;
source.x = x;
source.y = y;
source.z = z;
GetFloor(x, y, z, &room);
source.roomNumber = room;
2020-04-25 16:23:53 +02:00
target.x = x + phd_sin(16 * angle);
target.y = y;
2020-04-25 16:23:53 +02:00
target.z = z + phd_cos(16 * angle);
if (!LOS(&source, &target))
TriggerDynamicLight(target.x, target.y, target.z, falloff, r, g, b);
}