Rise
The Vieneo Province
Loading...
Searching...
No Matches
Landing Light tests

Checks authored landing-light optics, frame updates, collision damage and lamp placement.

Subsystem: Vehicles, cockpit geometry and surface physics
Fixture/harness: landinglighttests
Setup: The standalone LandingLightTests harness owns the inputs, local helpers and assertion sink used by the case files below.

Build/entry point: Tests/LandingLightTests.vcxproj; declared configurations: Debug|Win32, Release|Win32.

LandingLightTests.cpp

Source: Tests/LandingLightTests.cpp

Car Optics Check

Fixture: Landing Light tests
Case symbol: CarOpticsCheck
Source: Tests/LandingLightTests.cpp:49

Test
Car Optics Check: car optical fixture has two lamps; beam configuration retains the authored lamp position; car model-mounted aim matches old headlightvec.
Source check messages (including original failure wording)

  • car optical fixture has two lamps
  • beam configuration retains the authored lamp position
  • car model-mounted aim matches old headlightvec
  • car low beams illuminate road 20 m ahead
  • car low-beam cutoff removes light above the lamps
  • beam up follows physical vehicle up
  • car has dim foreground spill 1-4 m ahead
  • foreground spill stays weaker than the main beam
  • foreground spill covers the near road beside each lamp

Frame Check

Fixture: Landing Light tests
Case symbol: FrameCheck
Source: Tests/LandingLightTests.cpp:114

Test
Frame Check: car lamps have authored lateral spacing; both car beams reach the renderer; lamp origin matches exterior after physics update.
Source check messages (including original failure wording)

  • car model supplies two lamps
  • car lamps have authored lateral spacing
  • car lamps are at the nose
  • both car beams reach the renderer
  • lamp origin matches exterior after physics update
  • lamp aim matches exterior after physics update
  • shader receives transformed aim for each lamp
  • shader receives separate lamp origins
  • shader receives vehicle-aligned cutoff axis
  • both fixed-function lamp slots enabled
  • fixed-function uses same exterior aim
  • fixed-function uses same cutoff axis
  • one-lamp update disables second slot
  • switching lamps off clears renderer count

Model Check

Fixture: Landing Light tests
Case symbol: ModelCheck
Source: Tests/LandingLightTests.cpp:174

Test
Model Check: beam points forward after model axis conversion; origin follows full world transform.
Source check messages (including original failure wording)

  • two authored landing lights
  • lamps remain on opposite sides
  • lamp stays at model nose
  • model height conversion
  • beam points forward after model axis conversion
  • unit aim
  • E-11 authored aim preserved
  • translation cannot change aim
  • origin follows full world transform

Condition Check

Fixture: Landing Light tests
Case symbol: ConditionCheck
Source: Tests/LandingLightTests.cpp:203

Test
Condition Check: healthy lamps dim steadily; absent/dead lamps stay off; flicker is independent of frame rate; two lamps have independent flicker timing.
Source check messages (including original failure wording)

  • healthy lamps dim steadily; absent/dead lamps stay off
  • flicker is independent of frame rate
  • two lamps have independent flicker timing
  • damaged contact alternates between off and half brightness
  • health 1 flashes briefly every few seconds
  • health 62 visibly drops out every few seconds
  • middle damage has substantial on and off periods
  • severely damaged lamp starts off
  • repair restores full brightness immediately
  • failure removes light immediately
  • the latest trace's health 59 has a visible interruption within five seconds
  • contact charges only peak shock at 30/60/144 FPS
  • separate impact causes further damage

Damage Frame Check

Fixture: Landing Light tests
Case symbol: DamageFrameCheck
Source: Tests/LandingLightTests.cpp:269

Test
Damage Frame Check: pending vdat cannot light lamps or report false mismatches; dead first lamp leaves only the second beam active; compacting live beams preserves the original vdat slot.
Source check messages (including original failure wording)

  • pending vdat cannot light lamps or report false mismatches
  • dead first lamp leaves only the second beam active
  • compacting live beams preserves the original vdat slot
  • shader and fixed lighting receive half brightness
  • sprite brightness retains per-model slot order
  • lens material retains dead emitter locations and shares the beam brightness
  • extra beam sprites share the nearest lamp circuit
  • installed but dead lamps are not model mismatches
  • absent vdat lamp with a model beam reports one descriptive error
  • installed second lamp without a model beam also reports a mismatch
  • one installed lamp plus one absent slot is valid
  • flicker changes the shader count and fixed light together
  • lens, sprite and beam receive the same flicker sample
  • shared rain/cloud/fallback light receives flicker brightness
  • production frame update exercises both phases of a failing lamp
  • simulator retains legacy damaged-lamp timing
  • leaving simulator resets the long pending interval to real-world flicker
  • entering simulator clears pending real-world flicker
  • repair restores the rendered beam immediately
  • master switch also clears lamp sprite brightness
  • mesh damage state remains available to the separate parked-alarm light switch
  • vehicle switch cannot reuse stale lamp damage

Entry-point checks

Fixture: Landing Light tests
Case symbol: main
Source: Tests/LandingLightTests.cpp:348

Test
Entry-point checks: four lamps respect the two-beam cap; four-lamp model keeps both sides; switching to no lamps clears count.
Source check messages (including original failure wording)

  • one-lamp craft
  • normalize imported aim
  • reject zero aim
  • reject invalid origin
  • four lamps respect the two-beam cap
  • four-lamp model keeps both sides
  • switching to no lamps clears count
  • switching clears previous origins
  • two-lamp 5 lux throw
  • one-lamp sqrt(2) throw
  • range edge fades to zero
  • inverse-square decay
  • road light cannot illuminate above cutoff
  • road light illuminates below cutoff
  • road light has a broad horizontal spread
  • road light has weak downward spill beyond its shallow core
  • road spill remains bounded below the lamp
  • landing light has no road cutoff
  • train spill is weak outside its core
  • near wall cutoff has a measurable soft transition
  • cutoff feather grows in physical width with distance
  • cutoff rotates with vehicle attitude
  • nothing behind the lamp is lit
  • fog attenuates light along the lamp path
  • vertical lamp gets a finite orthogonal up axis
  • finite forward fog mesh
  • fog mesh respects low-beam cutoff
  • fog beam fades at profile range

LandingLightCollisionChecks.h

Source: Tests/LandingLightCollisionChecks.h

Long Frame Structural Checks

Fixture: Landing Light tests
Case symbol: LongFrameStructuralChecks
Source: Tests/LandingLightCollisionChecks.h:10

Test
Checks recorded long-frame loads reproduce the old false-damage calculation but remain harmless without collision.
Source check messages (including original failure wording)

  • recorded long-frame loads reproduce the previous false-damage calculation
  • all six trace loads are harmless without a collision, on every possible dominant axis
  • steady support/lift cannot become an impact during a stall
  • real impacts retain identical hull/glass damage even during a two-second stall
  • impact is consumed after evaluation
  • a consumed impact cannot replay on a later frame
  • genuine sustained overload retains its acceleration threshold at every timestep
  • simulator entry clears pending impact
  • simulator contacts do not accumulate exterior impulses
  • simulator support retains original unscaled behavior
  • simulator exit cannot replay contact damage
  • inhibited impacts are discarded

Crash Timing Checks

Fixture: Landing Light tests
Case symbol: CrashTimingChecks
Source: Tests/LandingLightCollisionChecks.h:80

Test
Checks directional crash thresholds and severity-dependent damage probability.
Source check messages (including original failure wording)

  • fault severity retains every existing directional crash threshold
  • fault probability scales from 25 percent to 100 percent with impact severity
  • stronger impacts cannot reduce fault chance
  • twice-threshold impact has exactly 50 percent fault chance
  • recorded C-2 impact guarantees an eligible control upset
  • occupant jolt can hit the stalk but cannot create a persistent horn fault
  • an occupant jolt alone cannot damage the frame or glass
  • turning wipers off survives the same jolt and a latched horn
  • a separate occupant jolt can hit the stalk again
  • glass follows actual frame loss rather than an independent random damage roll
  • frame and glass damage alone do not hit the wiper stalk
  • structural damage can only emit a horn fault, not a wiper command
  • missing or unchanged frame health cannot manufacture glass damage
  • stalk upset needs fitted wipers and an occupant at the controls
  • occupant-only jolts never latch the horn
  • moderate occupant-only jolts can hit or miss the stalk, never latch the horn
  • combined occupant and structural loads allow wipers only, horn only, both or neither
  • single-frame crash damages windshield between animation ticks
  • continuing contact is charged once at every tested frame rate
  • separate crash rearms damage
  • severe jolt hits the stalk while alive but cannot short a horn without new hull damage
  • latched fault cannot resend or toggle the wipers off
  • simulator entry clears local and remote crash faults and contact memory
  • simulator entry clears occupant-jolt memory too
  • received crash faults cannot latch while in simulator
  • simulator cannot emit a crash fault or wiper event
  • simulator retains animation cadence
  • simulator baseline structural damage remains, without exterior fault activation
  • exit cannot replay a cached crash fault
  • new remote crash fault works outside simulator
  • simulated remote vehicles cannot latch crash faults
  • new real-world impact works immediately after exit
  • death, spawn protection and interiors remain protected
  • death, spawn protection and interiors suppress occupant control upsets

Structural Crush Checks

Fixture: Landing Light tests
Case symbol: StructuralCrushChecks
Source: Tests/LandingLightCollisionChecks.h:262

Test
Checks identical hull/glass/lamp outcomes for the same corner impact across frame rates and RNG seeds, including duplicate reports.
Source check messages (including original failure wording)

  • 60 km/h left-corner impulse gives identical hull/glass loss and lamp destruction at every FPS and RNG seed
  • duplicate crash report cannot stack structural damage
  • both recorded C-2 crashes have comparable major structural damage
  • increasing speed cannot reduce deterministic structural damage
  • milder collision causes less structural damage
  • a stronger sample in the same crash charges only additional peak damage
  • peak damage is not charged twice
  • a separate collision causes new structural damage
  • absent and destroyed hull remain unchanged
  • invalid timesteps cannot manufacture impulse damage
  • recorded front crush can short the horn but does not guarantee a closed circuit
  • horn fault chance grows with frontal severity and fresh structural damage
  • rear, side and vertical structural loads cannot create a front-circuit fault
  • structural horn faults require a ground vehicle, controlled vessel and fresh hull loss
  • trace replay reads the actual C-2 lamp mounts
  • reproduce the trace's initial left lamp strike
  • front-left crush never transfers damage to the uncontacted right lamp
  • major frame damage destroys the contacted lamp assembly
  • recorded 127-to-41 hull loss destroys the struck left lamp
  • trace replay removes the crushed left beam and leaves the right beam at full brightness
  • structural lamp loss queues persistence
  • production crash replay includes the recorded hull damage outcome
  • no contact, expired contact, clock reset, pending snapshot, occupant exit and simulator cannot inherit crush
  • moderate frame damage adds only loss beyond the initial strike
  • repeated structural reports do not multiply lamp damage
  • absent and destroyed lamps remain unchanged
  • nonfinite timestamps cannot link contacts to frame damage

Collision Check

Fixture: Landing Light tests
Case symbol: CollisionCheck
Source: Tests/LandingLightCollisionChecks.h:411

Test
Checks authored lamp mounts and left/right assignment in the recorded collision scenario.
Source check messages (including original failure wording)

  • two authored lamp mounts
  • C-2 trace lamp 1 is the driver's left headlight
  • diagnostic sides match the driver's projected view
  • left lamp follows left-front geometry, independent of vehicle ID and animation phase
  • right lamp follows right-front geometry; centered crash can break both
  • mesh contact queues persistence
  • mesh and direct lamp impacts are suppressed in simulator
  • left-front vehicle contact damages only the contacted lamp
  • spawn guard blocks mesh damage
  • pending vehicle snapshot cannot damage previous occupant

Contact Geometry Checks

Fixture: Landing Light tests
Case symbol: ContactGeometryChecks
Source: Tests/LandingLightCollisionChecks.h:499

Test
Checks swept contact catches thin faces crossed in one frame and finite faces exclude the opposite corner.
Source check messages (including original failure wording)

  • sweep catches a thin face crossed entirely in one frame
  • finite face excludes opposite corner
  • tangential motion cannot damage a lamp
  • receding contact cannot damage a lamp
  • distant face cannot damage a lamp before contact
  • degenerate face is harmless
  • triangle winding cannot swap the damaged side
  • normal wheel touchdown keeps lamps clear of terrain
  • slow contact dims both equally without the vehicle-ID resilience rule
  • moderate contact retains the established flicker damage stage
  • duplicate plane contact cannot double-charge damage
  • nose rotation can damage lamps with stationary CG
  • absent and broken lamps retain their state