Yea, something simple like that, I just forgot to do it.  I think it needs
to be subtracted actually, TBH the way this is rotating is probably not the
clearest way to do the math.
Also todo, look at lightmap.cpp around line 156-163, which seems to be
scaling brightness with number of lights, I don't think we want this
happening anymore since they are facing in different directions.  Might
need to look into adjusting light projection a bit to have the same effect.
On Jul 26, 2013 9:01 AM, "Christian Bielert" <notifications@github.com>
wrote:

> In veh_interact.cpp:
>
> > -                        dir = 0;
> > -                        break;
> > +            // Need map-relative coordinates to compare to output of look_around.
> > +            int gx, gy;
> > +            veh->coord_translate(dx, dy, gx, gy);
> > +            // Stash offset and set it to the location of the part so look_around will start there.
> > +            int px = g->u.view_offset_x;
> > +            int py = g->u.view_offset_y;
> > +            g->u.view_offset_x = gx;
> > +            g->u.view_offset_y = gy;
> > +            popup("Chose a facing direction for the new headlight.");
> > +            point headlight_target = g->look_around();
> > +            // Restore previous view offsets.
> > +            g->u.view_offset_x = px;
> > +            g->u.view_offset_y = py;
> > +            // TODO: set this in degrees instead of cardinals and sub-cardinals.
>
> Ah, I think that's vehicle.face.dir(). Would
>
> dir += vehicle.face.dir();while(dir < 0) dir += 360;while(dir > 360) dir -= 360;
>
> work?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/CleverRaven/Cataclysm-DDA/pull/2193/files#r5422927>
> .
>