Skip to content

Ensure m_pDriver assignation on func_vehicle only#853

Merged
s1lentq merged 1 commit intorehlds:masterfrom
dystopm:vehicle-member-fix
Sep 5, 2023
Merged

Ensure m_pDriver assignation on func_vehicle only#853
s1lentq merged 1 commit intorehlds:masterfrom
dystopm:vehicle-member-fix

Conversation

@dystopm
Copy link
Contributor

@dystopm dystopm commented Jul 22, 2023

m_pDriver is a member present only on CFuncVehicle class, in CBasePlayer workflow there's a train quitting logic where game is setting m_pDriver to NULL on both entities func_vehicle and func_tracktrain, which shares FCAP_DIRECTIONAL_USE ObjectCaps flag but the last one doesn't have m_pDriver member (including the implicit cast to CFuncVehicle on code)

Workaround (and ToDo): Train quitting logic is quite similar, should that be grouped in a single function?

@wopox1337
Copy link
Member

Train quitting logic is quite similar, should that be grouped in a single function?

@dystopm sure

@wopox1337 wopox1337 added the Type: 🐞 bug An error that needs fixing. label Jul 22, 2023
@s1lentq s1lentq merged commit 2e6e779 into rehlds:master Sep 5, 2023
@dystopm dystopm deleted the vehicle-member-fix branch October 11, 2023 15:09
yohimik pushed a commit to yohimik/ReGameDLL_CS that referenced this pull request Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: 🐞 bug An error that needs fixing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants