MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / checkForServerBail

Function checkForServerBail

src/bzrobots/botplaying.cpp:1665–1678  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1663
1664
1665void checkForServerBail(void) {
1666 // if server died then leave the game (note that this may cause
1667 // further server errors but that's okay).
1668 if (serverError || (serverLink && serverLink->getState() == ServerLink::Hungup)) {
1669 // if we haven't reported the death yet then do so now
1670 if (serverDied || (serverLink && serverLink->getState() == ServerLink::Hungup)) {
1671 printError("Server has unexpectedly disconnected");
1672 }
1673 else {
1674 printError("We were disconencted from the server, quitting.");
1675 }
1676 CommandsStandard::quit();
1677 }
1678}
1679
1680
1681void doTankMotions(const float /*dt*/) {

Callers 1

playingLoopFunction · 0.70

Calls 2

printErrorFunction · 0.70
getStateMethod · 0.45

Tested by

no test coverage detected