entity new_item;
if (!expr_evaluate(autocvar_g_overkill))
{
- new_item = Item_Create(strzone(new_classname), item.origin);
+ new_item = Item_Create(strzone(new_classname), item.origin, true);
random_items_is_spawning = false;
if (new_item == NULL)
{
/// this item is on the ground.
.bool m_isexpiring;
-entity Item_Create(string class_name, vector position)
+entity Item_Create(string class_name, vector position, bool no_align)
{
entity item = spawn();
item.classname = class_name;
item.spawnfunc_checked = true;
setorigin(item, position);
+ item.noalign = no_align;
Item_Initialize(item, class_name);
if (wasfreed(item))
{
/// \brief Creates a new item.
/// \param[in] class_name Class name of the item.
/// \param[in] position Position of the item.
+/// \param[in] no_align True if item should be placed directly at specified
+/// position, false to let it drop to the ground.
/// \return Item on success, NULL otherwise.
-entity Item_Create(string class_name, vector position);
+entity Item_Create(string class_name, vector position, bool no_align);
/// \brief Initializes the item according to classname.
/// \param[in,out] item Item to initialize.