function item_was_dropped ()
{
Bag *bagPanel;
snd_play ( sndDebugger, 100, 0 );
if ( !mouse_panel ) // Is the mouse pointer out of a panel?
{
snd_play ( sndDebugger, 100, 0 );
if ( inv_is_floating() ) // Does a floating icon exists?
{
snd_play ( sndDebugger, 100, 0 );
if ( mouse_left ) // Is the mouse left button pressed?
{
snd_play ( sndDebugger, 100, 0 );
var item_id = inv_get_floating_icon_item_id (); // Get the floating icon item id.
inv_clear_floating_icon (); // Clear the floating icon.
switch ( item_id ) // Create the new scenery object.
{
case SWORD:
ENTITY *entObject = ent_create ( "sword.mdl", player.x, dropObject );
entObject.skill_id = item_id;
break;
case MACE:
ENTITY *entObject = ent_create ( "mace.mdl", player.x, dropObject );
entObject.skill_id = item_id;
break;
}
}
}
}
}