MCPcopy Create free account
hub / github.com/bwapi/bwapi / getLatencyFrames

Method getLatencyFrames

bwapi/BWAPI/Source/BWAPI/GameImpl.cpp:781–793  ·  view source on GitHub ↗

--------------------------------------------------- LATENCY ----------------------------------------------

Source from the content-addressed store, hash-verified

779 }
780 //--------------------------------------------------- LATENCY ----------------------------------------------
781 int GameImpl::getLatencyFrames() const
782 {
783 DWORD dwCallDelay = 1;
784 if ( BW::BWDATA::NetMode )
785 {
786 CAPS caps;
787 caps.dwSize = sizeof(CAPS);
788 SNetGetProviderCaps(&caps);
789
790 dwCallDelay = Util::clamp<int>(caps.dwCallDelay, 2, 8);
791 }
792 return (BW::BWDATA::LatencyFrames[BW::BWDATA::GameSpeed]) * (BW::BWDATA::Latency + dwCallDelay + 1);
793 }
794 int GameImpl::getLatencyTime() const
795 {
796 return getLatencyFrames() * BW::BWDATA::GameSpeedModifiers.gameSpeedModifiers[BW::BWDATA::GameSpeed];

Callers 3

EmulateOrderMethod · 0.45
updateSharedMemoryMethod · 0.45
onFrameMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected