items: Implement ::PickupRespawn
This commit is contained in:
parent
f7a1910541
commit
c03b3fc5dc
|
@ -40,11 +40,17 @@ item_pickup::Touch(entity eToucher)
|
|||
Destroy();
|
||||
} else {
|
||||
Disappear();
|
||||
think = Respawn;
|
||||
nextthink = time + 30.0f;
|
||||
ScheduleThink(PickupRespawn, 30.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
item_pickup::PickupRespawn(void)
|
||||
{
|
||||
Respawn();
|
||||
Sound_Play(this, CHAN_ITEM, "item.respawn");
|
||||
}
|
||||
|
||||
void
|
||||
item_pickup::SetItem(int i)
|
||||
{
|
||||
|
@ -75,13 +81,6 @@ item_pickup::Respawn(void)
|
|||
think = __NULL__;
|
||||
nextthink = -1;
|
||||
|
||||
if (!m_iWasDropped && cvar("sv_playerslots") > 1) {
|
||||
if (!real_owner)
|
||||
Sound_Play(this, CHAN_ITEM, "item.respawn");
|
||||
|
||||
m_iClip = -1;
|
||||
}
|
||||
|
||||
if (!m_bFloating) {
|
||||
droptofloor();
|
||||
SetMovetype(MOVETYPE_TOSS);
|
||||
|
|
Loading…
Reference in New Issue