mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2025-04-09 03:24:52 +00:00
avoid messing with HL2MP
This commit is contained in:
parent
41da8906e7
commit
cf9d2292a4
3 changed files with 16 additions and 5 deletions
|
@ -12,6 +12,7 @@
|
|||
|
||||
#include "shareddefs.h"
|
||||
|
||||
// Number of bits used to transmit the number of point cappers to the client.
|
||||
#define MAX_TRANSMIT_CAPPERS_BITS 4
|
||||
#define MAX_TRANSMIT_CAPPERS (1 << MAX_TRANSMIT_CAPPERS_BITS) - 1
|
||||
|
||||
|
|
|
@ -469,12 +469,20 @@ void CTriggerAreaCapture::CaptureThink( void )
|
|||
|
||||
float flReduction = flTimeDelta;
|
||||
if ( CaptureModeScalesWithPlayers() )
|
||||
{
|
||||
// Diminishing returns for successive players.
|
||||
for ( int i = 1; i < m_TeamData[m_nTeamInZone].iNumTouching && i < MAX_TRANSMIT_CAPPERS; i++ )
|
||||
{
|
||||
#ifdef TF_DLL
|
||||
// Diminishing returns for successive players. MAX_TRANSMIT_CAPPERS prevents overflow
|
||||
for (int i = 1; i < m_TeamData[m_nTeamInZone].iNumTouching && i < MAX_TRANSMIT_CAPPERS; i++)
|
||||
{
|
||||
flReduction += (flTimeDelta / (float)(i+1));
|
||||
flReduction += (flTimeDelta / (float)(i + 1));
|
||||
}
|
||||
#else
|
||||
// Diminishing returns for successive players
|
||||
for (int i = 1; i < m_TeamData[m_nTeamInZone].iNumTouching; i++)
|
||||
{
|
||||
flReduction += (flTimeDelta / (float)(i + 1));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
m_flLastReductionTime = gpGlobals->curtime;
|
||||
|
||||
|
|
|
@ -24,7 +24,9 @@ class CTeamTrainWatcher;
|
|||
#define CAPTURE_CATCHUP_ALIVEPLAYERS 1
|
||||
|
||||
#define MAX_CLIENT_AREAS 128
|
||||
#define MAX_AREA_CAPPERS 9
|
||||
// Max number of cappers the server will transmit to the client as entity ids (for killfeed notification)
|
||||
// not to be confused with MAX_TRANSMIT_CAPPERS in team_objectiveresource.h
|
||||
#define MAX_AREA_CAPPERS 9
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: An area entity that players must remain in in order to active another entity
|
||||
|
|
Loading…
Reference in a new issue