Code: Select all
//---------------------------------------------------------------------------
//
// PROC P_DropItem
//
//---------------------------------------------------------------------------
CVAR(Int, dropstyle, 0, CVAR_ARCHIVE|CVAR_SERVERINFO);
AInventory *P_DropItem (AActor *source, const TypeInfo *type, int special, int chance)
{
if (type != NULL && pr_dropitem() <= chance)
{
AActor *mo;
fixed_t spawnz;
spawnz = source->z;
if (!(compatflags & COMPATF_NOTOSSDROPS))
{
int style = dropstyle;
if (style==0) style= (gameinfo.gametype == GAME_Strife)? 2:1;
if (style==2)
{
spawnz += 24*FRACUNIT;
}
else
{
spawnz += source->height / 2;
}
}
Code: Select all
//============================================================================
//
// P_TossItem
//
//============================================================================
void P_TossItem (AActor *item)
{
int style = dropstyle;
if (style==0) style= (gameinfo.gametype == GAME_Strife)? 2:1;
if (style==2)
{
item->momx += pr_dropitem.Random2(7) << FRACBITS;
item->momy += pr_dropitem.Random2(7) << FRACBITS;
}
else
{
item->momx = pr_dropitem.Random2() << 8;
item->momy = pr_dropitem.Random2() << 8;
item->momz = FRACUNIT*5 + (pr_dropitem() << 10);
}
}