Skip to content

Commit

Permalink
NPC: Hide flare for dragged torches that aren't visible
Browse files Browse the repository at this point in the history
Fixes: issue #783
  • Loading branch information
dscharrer committed Jun 30, 2018
1 parent 94da188 commit 0231393
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions src/game/NPC.cpp
Expand Up @@ -2823,19 +2823,20 @@ void ManageIgnition_2(Entity * io) {
arx_assert(io);

if(io->ignition > 0.f) {
if(io->ignition > 100.f)

if(io->ignition > 100.f) {
io->ignition = 100.f;

Vec3f position;

if(io->obj && io->obj->fastaccess.fire != ActionPoint())
if(io == DRAGINTER)
}

Vec3f position = io->pos;
if(io->obj && io->obj->fastaccess.fire != ActionPoint()) {
if(io == DRAGINTER && io->show == SHOW_FLAG_ON_PLAYER) {
position = player.pos;
else
} else {
position = actionPointPosition(io->obj, io->obj->fastaccess.fire);
else
position = io->pos;

}
}
EERIE_LIGHT * light = dynLightCreate(io->ignit_light);
if(light) {
light->intensity = std::max(io->ignition * 0.1f, 1.f);
Expand All @@ -2845,7 +2846,11 @@ void ManageIgnition_2(Entity * io) {
light->rgb = (Color3f(1.f, 0.8f, 0.6f) - randomColor3f() * Color3f(0.2f, 0.2f, 0.2f)) * v;
light->pos = position + Vec3f(0.f, -30.f, 0.f);
light->ex_flaresize = 40.f;
light->extras |= EXTRAS_FLARE;
if(io->show == SHOW_FLAG_IN_SCENE || io->show == SHOW_FLAG_TELEPORTING) {
light->extras |= EXTRAS_FLARE;
} else {
light->extras &= ~EXTRAS_FLARE;
}
}

if(io->ignit_sound == audio::INVALID_ID) {
Expand Down

0 comments on commit 0231393

Please sign in to comment.