Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add ability to make client-side vehicles damageable #4411

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
MegadreamsBE wants to merge 2 commits into multitheftauto:master
base: master
Choose a base branch
Loading
from MegadreamsBE:feature/client-side-vehicle-damage
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Client/mods/deathmatch/logic/CClientVehicle.cpp
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ CClientVehicle::CClientVehicle(CClientManager* pManager, ElementID ID, unsigned
memset(&m_ucLightStates[0], 0, sizeof(m_ucLightStates));
m_bCanBeDamaged = true;
m_bSyncUnoccupiedDamage = false;
m_bScriptCanBeDamaged = true;
m_bScriptCanBeDamaged = !IsLocalEntity();
m_bTyresCanBurst = true;
m_ucOverrideLights = 0;
m_pTowedVehicle = NULL;
Expand Down Expand Up @@ -1176,6 +1176,9 @@ void CClientVehicle::CalcAndUpdateCanBeDamagedFlag()
if (m_bSyncUnoccupiedDamage)
bCanBeDamaged = true;

if (IsLocalEntity())
bCanBeDamaged = m_bScriptCanBeDamaged;

// Script override
if (!m_bScriptCanBeDamaged)
bCanBeDamaged = false;
Expand Down Expand Up @@ -1218,6 +1221,9 @@ void CClientVehicle::CalcAndUpdateTyresCanBurstFlag()
if (m_bSyncUnoccupiedDamage)
bTyresCanBurst = true;

if (IsLocalEntity())
bTyresCanBurst = m_bScriptCanBeDamaged;

// Script override
if (!m_bScriptCanBeDamaged)
bTyresCanBurst = false;
Expand Down
Loading

AltStyle によって変換されたページ (->オリジナル) /