Skip to content

Commit f7802f3

Browse files
committed
implement ficool2 shadow data bugfix
1 parent 795971b commit f7802f3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/game/client/c_baseentity.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3864,8 +3864,17 @@ void C_BaseEntity::RemoveAllDecals( void )
38643864

38653865
bool C_BaseEntity::SnatchModelInstance( C_BaseEntity *pToEntity )
38663866
{
3867+
#ifdef BDSBASE
3868+
ModelInstanceHandle_t handle = GetModelInstance();
3869+
if (!modelrender->ChangeInstance(handle, pToEntity))
3870+
return false; // engine could move modle handle
3871+
3872+
// engine bugfix: remove stale shadow data
3873+
shadowmgr->RemoveAllShadowsFromModel(handle);
3874+
#else
38673875
if ( !modelrender->ChangeInstance( GetModelInstance(), pToEntity ) )
38683876
return false; // engine could move modle handle
3877+
#endif
38693878

38703879
// remove old handle from toentity if any
38713880
if ( pToEntity->GetModelInstance() != MODEL_INSTANCE_INVALID )

0 commit comments

Comments
 (0)