MCPcopy Create free account
hub / github.com/LARG/HFO / updatePlayerSendTime

Method updatePlayerSendTime

src/sample_communication.cpp:329–350  ·  view source on GitHub ↗

-------------------------------------------------------------------*/ ! */

Source from the content-addressed store, hash-verified

327
328 */
329void
330SampleCommunication::updatePlayerSendTime( const WorldModel & wm,
331 const SideID side,
332 const int unum )
333{
334 if ( unum < 1 || 11 < unum )
335 {
336 std::cerr << __FILE__ << ':' << __LINE__
337 << ": Illegal player number. " << unum
338 << std::endl;
339 return;
340 }
341
342 if ( side == wm.ourSide() )
343 {
344 M_teammate_send_time[unum] = wm.time();
345 }
346 else
347 {
348 M_opponent_send_time[unum] = wm.time();
349 }
350}
351
352/*-------------------------------------------------------------------*/
353/*!

Callers

nothing calls this directly

Calls 1

ourSideMethod · 0.80

Tested by

no test coverage detected