Spotlight problems

Bug #896314 reported by mevitar
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ares
Fix Released
Medium
AlexB

Bug Description

I noticed 3 problems with spotlights:
1. Spotlight.StartHeight= isn't height from the ground, as stated in the manual, but actually height from the 0 level of the map. If the height will be set too low, the light on the ground will be drawn, but no lines to it will be visible (as they will be under ground).
2. Spotlight.AttachedTo=barrel will lock the light of the unit facing in-game West. It won't move even if the unit, its turret (and therefore barrel) will. I checked with a unit coming out of a War Factory, so it may be related to the direction the unit is facing when created.
3. Spotlight.DisableColor=yes doesn't darken the ground, as it should.

Revision history for this message
mevitar (mevitar) wrote :
Revision history for this message
mevitar (mevitar) wrote :

There are two other problems I found:
4. When attached to a building, and the moving light travels through the upper arc, the outlines (provided they are visible, see 1.) are bright (see spotlight_1). However, when the light travels through the lower arc, the outlines become darkened (see spotlight_2).
5. The further the light goes from the emitter, the wider the outlines are spread (compare spotlight_1 and spotlight_2). However, since the light itself doesn't change its size, it looks a bit strange.

Revision history for this message
DCoder DCoder (dcoder1337) wrote :

I'm pretty sure 4 and 5 exist in TS as well... so they will most likely get lower priority.

Changed in ares:
assignee: nobody → DCoder DCoder (dcoder1337)
importance: Medium → Low
status: New → Triaged
Changed in ares:
assignee: DCoder DCoder (dcoder1337) → nobody
AlexB (alexander-b)
Changed in ares:
assignee: nobody → AlexB (alexander-b)
status: Triaged → Fix Committed
Revision history for this message
AlexB (alexander-b) wrote :

1 and 3 have been fixed. 1 was because the actual Z coords weren't added, 3 happened because the tag was parsed as Spotlight.IsInverted.

2 is problematic, because the barrel facing does not work like the other two facings. It does rotate around a different axis, thus makes no real sense. Most likely I'll change it to do the same as "turret".

4 and 5 are by design. I won't change the drawing routines.

Another change that will soon come will change the StartHeight drawing, because the default is not correct. The documentation mentions 250, but Ares uses 200, which actually changes the original game.

Changed in ares:
milestone: none → 0.c
importance: Low → Medium
Revision history for this message
AlexB (alexander-b) wrote :

2 is now fixed. barrel has been removed.

Default StartHeight has been changed to 430, which is true leptons over ground now, no hidden addition leptons. Thus, 0 is on the ground now. Since the outlines weren't drawing correctly anyhow, this should be okay.

Revision history for this message
mevitar (mevitar) wrote :

16.166.1335, spotlight seem to interact correctly with subterranean units, temporal warheads and cloak. They don't disappear for units with disguise, though (not sure if they should or not).

1. Spotlight.StartHeight works correctly now, and defaults to 430 as specified
2. Spotlight.AttachedTo=barrel works the same as using the "turret" value
3. Spotlight.DisableColor=yes darkens the ground now
5. i noticed that at once you reach a certain distance, the outlines seem to disappear completely (tested with 2048 value) - i'm not terribly worried about it myself, since i don't like the outlines being there in the first place (i wanted to get rid of them somehow anyway :P ), but it's something i think should be mentioned

There's a problem with Spotlight.AttachedTo= for AircraftTypes, though. When using Spotlight.AttachedTo=body, the spotlight will face the right direction when the unit is moving, but once it lands on the pad, it will face the last faced direction before landing. It can be even the opposite direction than the direction that the aircraft is currently facing on the pad.
However, using Spotlight.AttachedTo=turret will make it always face the correct direction, even on the pad.

Revision history for this message
AlexB (alexander-b) wrote :

Thanks! 1, 2, and 3 were the bugs I was focusing on. Drawing still has some edge cases, like not drawing at all if even parts of the light are below shroud. I won't touch this. It's just graphical glitches, and drawing a pixel too many could cause problems like the laser/wave drawing crash.

Aircraft spotlight issues would be a new bug. It will have to wait.

A new tag not to draw the lines could be useful. Or maybe using negative StartHeight. Maybe next version.

Changed in ares:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.