Fix for amb257 - get_user_origin mode 4 false positives.

Most should be filtered out.
This commit is contained in:
Steve Dudenhoeffer 2007-08-04 03:34:34 +00:00
parent 9e0f3f01a7
commit 226d188d19

View File

@ -211,10 +211,16 @@ void Client_CurWeapon(void* mValue)
case 2:
if (!mPlayer) return;
if (!iState || (iId < 1 || iId >= MAX_WEAPONS)) break;
mPlayer->weapons[iId].clip = *(int*)mValue;
mPlayer->current = iId;
if (*(int*)mValue < mPlayer->weapons[iId].clip && // Only update the lastHit vector if the clip size is decreasing
*(int*)mValue != -1) // But not if it's a melee weapon
{
mPlayer->lastHit = mPlayer->lastTrace;
}
mPlayer->weapons[iId].clip = *(int*)mValue;
}
}
void Client_AmmoX(void* mValue)