fix(light): Lampen-Sitz konfigurierbar + Debug-Befehle
Lint / Lint Resource (push) Has been cancelled
Lint / Lint Resource (push) Has been cancelled
Offset und Rotation des Lampen-Props waren hart im Code, und die Rotation (180, 90, 0) war stumpf von der Maske uebernommen - daher stand die Lampe quer im Gesicht. d4rk_phone haengt sein Prop mit komplett null Offset und Rotation an, das ist der bessere Ausgangspunkt. - lampBone, lampPropOffset, lampPropRotation in die Config; Prop und Licht haengen jetzt am selben Bone, damit der Strahl aus der Lampe kommt - lampProp = '' erlaubt, dann nur Licht ohne Prop - Lichtwerte (Farbe, Reichweite, Helligkeit, Kegel) aus d4rk_phone uebernommen statt neu geraten; lampShadows wie dort auf false - /divelamp und /divelight stellen beides im laufenden Spiel ein und geben die Config-Zeile zum Uebernehmen aus (config.debug) Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+2
-3
@@ -10,7 +10,6 @@ local config = require 'config.client'
|
||||
-- anderen Tauchers selbst zeichnet.
|
||||
|
||||
local STATE_KEY = 'divelight'
|
||||
local HEAD_BONE = 31086 -- SKEL_Head
|
||||
|
||||
--- Kandidaten des aktuellen Frames. Wird wiederverwendet statt jedes Frame neu
|
||||
--- angelegt, damit der GC bei Dauerbetrieb nichts zu tun bekommt.
|
||||
@@ -26,8 +25,8 @@ local function getLampVectors(ped)
|
||||
local offset = config.lampOffset
|
||||
local direction = config.lampDirection
|
||||
|
||||
local from = GetPedBoneCoords(ped, HEAD_BONE, offset.x, offset.y, offset.z)
|
||||
local ahead = GetPedBoneCoords(ped, HEAD_BONE,
|
||||
local from = GetPedBoneCoords(ped, config.lampBone, offset.x, offset.y, offset.z)
|
||||
local ahead = GetPedBoneCoords(ped, config.lampBone,
|
||||
offset.x + direction.x,
|
||||
offset.y + direction.y,
|
||||
offset.z + direction.z)
|
||||
|
||||
Reference in New Issue
Block a user