mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-11-25 14:52:30 +01:00
CPlayerInfo operator= (for SA 1.0
This commit is contained in:
parent
d93a5d6fc6
commit
5ad460ff40
@ -37,4 +37,10 @@ CVehicle* FindPlayerVehicle( int playerID, bool withRC )
|
||||
vehicle = ped->GetVehiclePtr();
|
||||
}
|
||||
return vehicle;
|
||||
}
|
||||
}
|
||||
|
||||
CPlayerInfo& CPlayerInfo::operator=( const CPlayerInfo& rhs )
|
||||
{
|
||||
memcpy( this, &rhs, sizeof(*this) );
|
||||
return *this;
|
||||
}
|
||||
|
@ -12,6 +12,8 @@ private:
|
||||
uint8_t __pad[0xDC];
|
||||
|
||||
public:
|
||||
CPlayerInfo& operator=( const CPlayerInfo& rhs );
|
||||
|
||||
CPlayerPed* GetPlayerPed() const { return m_pPed; }
|
||||
CVehicle* GetControlledVehicle() const { return m_pControlledVehicle; }
|
||||
};
|
||||
|
@ -3438,6 +3438,10 @@ void Patch_SA_10()
|
||||
// Correct streaming when using RC vehicles
|
||||
InjectHook( 0x55574B, FindPlayerEntityWithRC );
|
||||
InjectHook( 0x5557C3, FindPlayerVehicle_RCWrap );
|
||||
|
||||
|
||||
// Fixed CPlayerInfo assignment operator
|
||||
InjectHook( 0x45DEF0, &CPlayerInfo::operator=, PATCH_JUMP );
|
||||
}
|
||||
|
||||
void Patch_SA_11()
|
||||
|
Loading…
Reference in New Issue
Block a user