MCPcopy Create free account
hub / github.com/GlobedGD/globed2 / link

Method link

src/modules/two-player/TwoPlayerModule.cpp:184–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184bool TwoPlayerModule::link(int id, bool player2) {
185 if (m_linkAttempt || m_linkedPlayer) {
186 globed::toastError("Cannot link while already linked to a player");
187 return false;
188 }
189
190 m_linkAttempt = id;
191
192 // send an link event
193 this->sendLinkEventTo(id, player2);
194
195 return true;
196}
197
198void TwoPlayerModule::cancelLink() {
199 m_linkAttempt.reset();

Callers 1

getShaderFunction · 0.45

Calls 2

sendLinkEventToMethod · 0.95
toastErrorFunction · 0.85

Tested by

no test coverage detected