2020-05-27 09:21:20 +02:00
|
|
|
#include "framework.h"
|
2020-04-09 11:17:26 -03:00
|
|
|
#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);
|
2020-04-09 11:17:26 -03:00
|
|
|
target.y = y;
|
2020-04-25 16:23:53 +02:00
|
|
|
target.z = z + phd_cos(16 * angle);
|
2020-04-09 11:17:26 -03:00
|
|
|
if (!LOS(&source, &target))
|
|
|
|
TriggerDynamicLight(target.x, target.y, target.z, falloff, r, g, b);
|
|
|
|
}
|