Repository navigation
Conversation
Every Glide seat is parented to the chassis, so GetPlayerVehicle resolved passengers to it too. A passenger could work the lights, siren, signals, livery and unit number, and a passenger getting out ran the driver-left path, turning off running, brake and reverse lights and the siren while the driver was still driving. GetPlayerVehicle now resolves to the chassis only from Glide seat 1, and hands passengers their seat back, like a passenger pod on a stock vehicle. The enter and leave hooks ignore Glide passenger seats. With that in place the Glide_CanSwitchSeat block is no longer needed: leaving the driver's seat for another one behaves like getting out, so drop it rather than stop drivers switching seats. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQSMwzfwMbz3srta43yhsE
Photon's server SetupCar defined IsBraking and IsReversing on the entity. Glide defines methods of the same name and reads them back through the entity table for its own brake and reverse lights and for trailers, so on the server Glide ran Photon's key-press guess instead of its own brake input and gear. Skip those definitions on Glide chassis so the server scan reads Glide's own methods. On the client, read them directly for every Glide vehicle: both are built on Glide's networked state, so there is no need for the key guess or the half-second SimpleNet cache. This also drops the forward-plus-back key special case, which broke when Glide's controls were rebound. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQSMwzfwMbz3srta43yhsE
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQSMwzfwMbz3srta43yhsE
Ported from livkx's dev/livkx/glide (a71ce15, 03be085) without the Glide native lighting work in the same commits. - Photon_GetAutoSkinData and AutoLivery.ApplyTexture no longer pass a nil submaterial index when a model has no skin/carpaint material, which is common on Glide packs with no livery options. - ELS-only vehicles never run Photon:SetupCar, so ELS_Blackout and the enter and leave hooks check the CAR_* methods exist before calling them. Co-Authored-By: livkx <15910716+livkx@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQSMwzfwMbz3srta43yhsE
On the client, NetworkEntityCreated fires before a scripted entity's IsGlideVehicle and Base can be read. IsPhotonChassis was false at that moment, so RequestSync skipped the car, and a Glide chassis spawned in view never received its Photon state: no lights, no controls (seen on CityRP's SWAT Bearcat; a manual resync fixed it). IsGlideVehicle now falls back to the class definition, which is registered by then. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 886c466)
…fresh Lua refresh stacked SetModelScale on a leftover RenderMultiply matrix, so saving a vehicle file changed prop size until respawn, and Matrix:GetAngles() could flip sprite yaw on pitched or rolled mounts. Co-authored-by: Cursor <cursoragent@cursor.com> (cherry picked from commit 749a077)
Ported from livkx's dev/livkx/glide (b2b995c) without the Glide vehicle identity changes in the same commit. EMVU.Helper and PhotonHUD:GetCurrentState indexed EMVU.Sequences[name] directly, so a vehicle with no sequences registered yet threw instead of reporting nothing. Co-Authored-By: livkx <15910716+livkx@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQSMwzfwMbz3srta43yhsE
Ported from livkx's dev/livkx/glide (03be085, b2b995c, a1fa4c9) without the Glide native lighting work in the same commits. Glide's own spawn menu sets no VehicleName, so Photon fell back to the chassis class and model and attached a pack to every civilian spawn that shared them. CityRP also keeps an item id in VehicleName, which hit the same fallback. LookupVehiclesEntry now resolves a Glide chassis only from VehicleTable, PhotonVehicleName, or a VehicleName that names a Vehicles entry. PhotonVehicleName comes first, so a gamemode can keep VehicleName for its own use and still name a pack; when it is set but does not resolve, nothing attaches. RecoverVehicleName and the client class fallback no longer guess for Glide. Differences from the original: RecoverVehicleName returns false for Glide outright, since the lookup it repeated had already failed and its only new outcome was overwriting VehicleName. HasExplicitVehicleIdentity is left out because nothing calls it. Co-Authored-By: livkx <15910716+livkx@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQSMwzfwMbz3srta43yhsE
This was referenced Oct 10, 2026
Closed
Ported from livkx's dev/livkx/glide (a71ce15, 009101f, cc5e94c, 03be085) onto the glide branch, keeping glide's driver-seat, brake/reverse and vehicle identity behaviour. - Photon no longer draws its own headlight, running, brake, reverse or signal sprites on a Glide chassis; Glide's native lights draw them. Emergency props and components still render as usual. - Photon's blackout mirrors Glide's HeadlightState, including Glide's auto-headlights. Photon's blackout key is ignored on Glide, because Glide's headlight bind is also H by default; an explicit ELS blackout still turns Glide's lights off. - Photon's turn signals and hazards are written to Glide's TurnSignalState. - When the active primary sequence asks for headlights (Headlights or GlideHeadlights on the sequence, or a "headlight" component), Photon flashes Glide's beams from a 0.1-second server scan and restores the driver's preferred beam afterwards. - The HUD blackout icon follows Glide's headlight state. This is an interim integration until the base-mode work in #292 replaces it. Co-Authored-By: livkx <15910716+livkx@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQSMwzfwMbz3srta43yhsE
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Photon support for Glide vehicles at minimum-viable scope: Photon treats a Glide car the way it treats a stock car. Glide still draws its own light and siren sprites; suppressing or sharing them is out of scope here and tracked in #292.
Supersedes #300. This carries livkx's compatibility layer and fixes from that PR, without the Glide native-lighting integration.
Changes
Compatibility layer (livkx, from #294)
shared/sh_glide.luaadds helpers for seat-to-chassis resolution, driver lookup, Vehicles-list lookup and the forward axis (Glide is +X forward, stock vehicles are +Y). Call sites that assumedply:GetVehicle()is the car now go through them.Driver seat only
Photon.GetPlayerVehiclenow returns the chassis only from Glide seat 1, and the enter and leave hooks ignore passenger seats.Glide_CanSwitchSeatblock is removed: leaving the driver's seat for another seat now counts as getting out.Brake and reverse
SetupCardefinedIsBraking/IsReversingon the entity. That replaced Glide's own methods, which Glide's lights and trailers read back through the entity table. Photon now leaves them alone and reads Glide's networked brake and gear state on both realms. This drops the key-press heuristic, which broke when Glide's controls were rebound.Vehicle identity
VehicleTable,PhotonVehicleName, or aVehicleNamethat names a Vehicles entry. Class and chassis-model guesses are off, so cars spawned from Glide's own menu stay civilian.PhotonVehicleNametakes priority, so a gamemode can keepVehicleNamefor its own use; CityRP stores an item id there.docs/glide-vehicles.mdcovers this.Fixes from #300
NetworkEntityCreatedfires before the entity's own fields exist.IsGlideVehiclenow falls back to the class definition.CAR_*methods on ELS-only vehicles.Not included
Testing
lua/tests/photon/glide_helpers.lua(seat resolution, identity lookup, class-definition fallback) andlua/tests/photon/auto_component_transform.lua. These have not been run locally.🤖 Generated with Claude Code
https://claude.ai/code/session_01JQSMwzfwMbz3srta43yhsE
Generated by Claude Code