Fix bug where dropped items shouldn't be respawned.
`spawn()` will cast it's params to floats, so when `m_iWasDropped: TRUE` was given it would set `m_iWasDropped` to `1065353216`; and conditions like `m_iWasDropped == TRUE` where never met. Which would cause `valve/src/server/items.qc:item_pickup::touch` to set `think` to `Respawn`.
This commit is contained in:
parent
f6b0b5c348
commit
7607c249f6
1 changed files with 3 additions and 1 deletions
|
@ -263,7 +263,9 @@ Weapon_DropCurrentWeapon(base_player pl)
|
|||
if (g_weapons[pl.activeweapon].allow_drop != TRUE)
|
||||
return;
|
||||
|
||||
item_pickup drop = spawn(item_pickup, m_iWasDropped: TRUE, m_iClip: pl.a_ammo1);
|
||||
item_pickup drop = spawn(item_pickup);
|
||||
drop.m_iWasDropped = TRUE;
|
||||
drop.m_iClip = pl.a_ammo1;
|
||||
drop.SetItem(pl.activeweapon);
|
||||
setorigin(drop, pl.origin);
|
||||
drop.solid = SOLID_NOT;
|
||||
|
|
Loading…
Reference in a new issue