mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-27 07:05:38 +03:00
Little code cleaning: g_vecAttackDir (#831)
* Tiny code cleaning * Skip REGAMEDLL_FIXES * UTIL_BloodDrips: remove useless `direction` param * Fix test demo (RANDOM_FLOAT inside UTIL_RandomBloodVector should be called for testdemo) --------- Co-authored-by: Sergey Shorokhov <wopox1337@ya.ru> Co-authored-by: s1lentq <s1lentsk@yandex.ru>
This commit is contained in:
parent
a5f288fbd6
commit
6375ea5504
@ -1737,10 +1737,12 @@ Vector CBlood::BloodPosition(CBaseEntity *pActivator)
|
||||
|
||||
void CBlood::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
||||
{
|
||||
const Vector direction = Direction();
|
||||
|
||||
if (pev->spawnflags & SF_BLOOD_STREAM)
|
||||
UTIL_BloodStream(BloodPosition(pActivator), Direction(), (Color() == BLOOD_COLOR_RED) ? 70 : Color(), int(BloodAmount()));
|
||||
UTIL_BloodStream(BloodPosition(pActivator), direction, (Color() == BLOOD_COLOR_RED) ? 70 : Color(), int(BloodAmount()));
|
||||
else
|
||||
UTIL_BloodDrips(BloodPosition(pActivator), Direction(), Color(), int(BloodAmount()));
|
||||
UTIL_BloodDrips(BloodPosition(pActivator), Color(), int(BloodAmount()));
|
||||
|
||||
if (pev->spawnflags & SF_BLOOD_DECAL)
|
||||
{
|
||||
|
@ -6596,7 +6596,7 @@ void CBasePlayer::CheatImpulseCommands(int iImpulse)
|
||||
TraceResult tr;
|
||||
Vector dir(0, 0, 1);
|
||||
|
||||
UTIL_BloodDrips(pev->origin, dir, BLOOD_COLOR_RED, 2000);
|
||||
UTIL_BloodDrips(pev->origin, BLOOD_COLOR_RED, 2000);
|
||||
|
||||
for (int r = 1; r < 4; r++)
|
||||
{
|
||||
|
@ -1056,7 +1056,7 @@ void UTIL_BloodStream(const Vector &origin, const Vector &direction, int color,
|
||||
MESSAGE_END();
|
||||
}
|
||||
|
||||
void UTIL_BloodDrips(const Vector &origin, const Vector &direction, int color, int amount)
|
||||
void UTIL_BloodDrips(const Vector &origin, int color, int amount)
|
||||
{
|
||||
if (!UTIL_ShouldShowBlood(color))
|
||||
return;
|
||||
|
@ -262,7 +262,7 @@ bool UTIL_IsMasterTriggered(string_t sMaster, CBaseEntity *pActivator);
|
||||
BOOL UTIL_ShouldShowBlood(int color);
|
||||
int UTIL_PointContents(const Vector &vec);
|
||||
void UTIL_BloodStream(const Vector &origin, const Vector &direction, int color, int amount);
|
||||
void UTIL_BloodDrips(const Vector &origin, const Vector &direction, int color, int amount);
|
||||
void UTIL_BloodDrips(const Vector &origin, int color, int amount);
|
||||
Vector UTIL_RandomBloodVector();
|
||||
void UTIL_BloodDecalTrace(TraceResult *pTrace, int bloodColor);
|
||||
void UTIL_DecalTrace(TraceResult *pTrace, int decalNumber);
|
||||
|
@ -112,7 +112,7 @@ void AddMultiDamage(entvars_t *pevInflictor, CBaseEntity *pEntity, float flDamag
|
||||
|
||||
void SpawnBlood(Vector vecSpot, int bloodColor, float flDamage)
|
||||
{
|
||||
UTIL_BloodDrips(vecSpot, g_vecAttackDir, bloodColor, int(flDamage));
|
||||
UTIL_BloodDrips(vecSpot, bloodColor, int(flDamage));
|
||||
}
|
||||
|
||||
NOXREF int DamageDecal(CBaseEntity *pEntity, int bitsDamageType)
|
||||
|
Loading…
Reference in New Issue
Block a user