mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-27 07:05:38 +03:00
little code fixes (#798)
* weapons.cpp fix compile warning
`warning C4715: 'GetBaseAccuracy': not all control paths return a value`
* vihicle.cpp: use PlayerRelationship()
thanks to cf8deb9cac (r92242848)
Co-authored-by: Vaqtincha <51029683+Vaqtincha@users.noreply.github.com>
This commit is contained in:
parent
980162774a
commit
ab2bfd4b9d
@ -150,7 +150,7 @@ void CFuncVehicle::Blocked(CBaseEntity *pOther)
|
||||
if (pOther->Classify() == CLASS_PLAYER)
|
||||
{
|
||||
CBasePlayer* playerOther = static_cast<CBasePlayer*>(pOther);
|
||||
if (!playerDriver || (!friendlyfire.value && playerDriver->m_iTeam == playerOther->m_iTeam))
|
||||
if (!playerDriver || g_pGameRules->PlayerRelationship(playerDriver, playerOther) == GR_TEAMMATE)
|
||||
{
|
||||
// Just kick player
|
||||
return;
|
||||
|
@ -70,6 +70,8 @@ float GetBaseAccuracy(WeaponIdType id)
|
||||
case WEAPON_MP5N:
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
// Resets the global multi damage accumulator
|
||||
|
Loading…
Reference in New Issue
Block a user