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

Method process

plugins/koth/koth.cpp:551–568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

549}
550
551void KOTHPlayerPaused::process(bz_EventData* eventData) {
552 if (eventData->eventType != bz_ePlayerPausedEvent || !koth.enabled) {
553 return;
554 }
555
556 bz_PlayerPausedEventData_V1* PauseData = (bz_PlayerPausedEventData_V1*) eventData;
557 bz_BasePlayerRecord* player = bz_getPlayerByIndex(PauseData->playerID);
558
559 if (player) {
560 if (kothzone.pointIn(player->currentState.pos)) {
561 bz_killPlayer(PauseData->playerID, true, BZ_SERVER);
562 bz_sendTextMessage(BZ_SERVER, PauseData->playerID, "Cannot pause while on the Hill.");
563 }
564 }
565 bz_freePlayerRecord(player);
566
567 return;
568}
569
570void KOTHPlayerJoined::process(bz_EventData* eventData) {
571 if (eventData->eventType != bz_ePlayerJoinEvent || !koth.enabled) {

Callers

nothing calls this directly

Calls 13

bz_killPlayerFunction · 0.85
bz_sendTextMessageFunction · 0.85
bz_freePlayerRecordFunction · 0.85
onePlayerFunction · 0.85
teamClearFunction · 0.85
initiatekothFunction · 0.85
bz_getCurrentTimeFunction · 0.85
autoTimeFunction · 0.70
killTeamsFunction · 0.70
killPlayersFunction · 0.70
sendWarningsFunction · 0.70
getTeamColorFunction · 0.70

Tested by

no test coverage detected