Extend FX_GibHuman with a dir (euler) and force parameter.
This commit is contained in:
parent
af73a3a5b0
commit
9a6897c433
4 changed files with 14 additions and 7 deletions
|
@ -27,9 +27,12 @@ item_pickup::Touch(entity eToucher)
|
|||
}
|
||||
|
||||
Logging_Pickup(eToucher, this, __NULL__);
|
||||
|
||||
UseTargets(eToucher, TRIG_TOGGLE, m_flDelay);
|
||||
|
||||
#ifdef WASTES
|
||||
Sound_Play(eToucher, CHAN_ITEM, "item_weapon.pickup");
|
||||
#endif
|
||||
|
||||
if (real_owner || m_iWasDropped == 1 || cvar("sv_playerslots") == 1) {
|
||||
remove(self);
|
||||
} else {
|
||||
|
@ -60,6 +63,7 @@ item_pickup::Respawn(void)
|
|||
SetOrigin(GetSpawnOrigin());
|
||||
|
||||
/* At some points, the item id might not yet be set */
|
||||
|
||||
if (m_oldModel) {
|
||||
SetModel(m_oldModel);
|
||||
}
|
||||
|
@ -74,7 +78,7 @@ item_pickup::Respawn(void)
|
|||
}
|
||||
|
||||
if (!m_bFloating) {
|
||||
droptofloor();
|
||||
DropToFloor();
|
||||
SetMovetype(MOVETYPE_TOSS);
|
||||
}
|
||||
}
|
||||
|
@ -82,6 +86,10 @@ item_pickup::Respawn(void)
|
|||
void
|
||||
item_pickup::item_pickup(void)
|
||||
{
|
||||
#ifdef WASTES
|
||||
Sound_Precache("item_weapon.pickup");
|
||||
#endif
|
||||
|
||||
super::NSRenderableEntity();
|
||||
Respawn();
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ FX_GibHuman_Init(void)
|
|||
#endif
|
||||
|
||||
void
|
||||
FX_GibHuman(vector pos)
|
||||
FX_GibHuman(vector vecOrigin, vector vecDir, float flForce)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ void
|
|||
NSMonster::Gib(void)
|
||||
{
|
||||
takedamage = DAMAGE_NO;
|
||||
FX_GibHuman(this.origin);
|
||||
FX_GibHuman(origin, vectoangles(origin - g_dmg_eAttacker.origin), g_dmg_iDamage * 2.0f);
|
||||
Hide();
|
||||
}
|
||||
|
||||
|
@ -205,8 +205,7 @@ NSMonster::SeeThink(void)
|
|||
if (flDot < SeeFOV()/180)
|
||||
continue;
|
||||
|
||||
other = world;
|
||||
traceline(origin, w.origin, MOVE_OTHERONLY, this);
|
||||
traceline(origin, w.origin, MOVE_EVERYTHING, this);
|
||||
|
||||
/* we have line of sight with the player */
|
||||
if (trace_fraction == 1.0f) {
|
||||
|
|
|
@ -32,7 +32,7 @@ var int autocvar_mp_flashlight = TRUE;
|
|||
|
||||
void FX_Impact(impactType_t, vector, vector);
|
||||
void FX_Explosion(vector);
|
||||
void FX_GibHuman(vector);
|
||||
void FX_GibHuman(vector vecOrigin, vector vecDir, float flForce);
|
||||
void Footsteps_Update(void);
|
||||
|
||||
void TraceAttack_FireBullets(int, vector, int, vector, int);
|
||||
|
|
Loading…
Reference in a new issue