MantisBT - Zandronum
View Issue Details
0003034Zandronum[All Projects] Suggestionpublic2017-03-11 09:382017-03-11 10:29
Borg 
 
normalminoralways
newopen 
MicrosoftWindowsXP/Vista/7
2.1 
 
0003034: Inventory drop should be excluded from sv_limitcommands
There is no point limiting inventory drop to one second. At least
not so aggresivly. If it needs to be limited, I would suggest to use
value around 100ms (3-4 game ticks).
void CLIENTCOMMANDS_RequestInventoryDrop( AInventory *pItem )
{
    if ( sv_limitcommands )
    {
        if ( !(GAMEMODE_GetFlags( GAMEMODE_GetCurrentMode( )) & GMF_COOPERATIVE) )
        {
            Printf( "Dropping is not allowed in non-cooperative game modes.\n" );
            return;
        }

        if (( g_ulLastDropTime > 0 ) && ( (ULONG)gametic < ( g_ulLastDropTime + ( TICRATE ))))
        {
            Printf( "You must wait at least one second before using drop again.\n" );
            return;
        }
    }

    if ( pItem == NULL )
        return;

    const USHORT usActorNetworkIndex = pItem->GetClass( )->getActorNetworkIndex();

    g_ulLastDropTime = gametic;

    NETWORK_WriteByte( &CLIENT_GetLocalBuffer( )->ByteStream, CLC_INVENTORYDROP );
    NETWORK_WriteShort( &CLIENT_GetLocalBuffer( )->ByteStream, usActorNetworkIndex );
}
No tags attached.
Issue History
2017-03-11 09:38BorgNew Issue
2017-03-11 10:29DuskNote Added: 0016965

Notes
(0016965)
Dusk   
2017-03-11 10:29   
I agree that it's too tight. We should put together a more flexible limiting setup so that you can for a short while use drop for more than once per second but not constantly.