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

Function bz_Load

plugins/customflagsample/customflagsample.cpp:77–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75CustomFlagSampleHandler cfs;
76
77BZF_PLUGIN_CALL int bz_Load(const char* /*commandLine*/) {
78 bz_debugMessage(4, "customflagsample plugin loaded");
79
80 // register our special custom flag
81 bz_RegisterCustomFlag("CF", "Custom Flag", "A simple sample custom flag from the customflagsample plugin", eSuperShot, eGoodFlag);
82
83 // register events for pick up, drop, transfer, and fire
84 bz_registerEvent(bz_eFlagTransferredEvent, &cfs);
85 bz_registerEvent(bz_eFlagGrabbedEvent, &cfs);
86 bz_registerEvent(bz_eFlagDroppedEvent, &cfs);
87 bz_registerEvent(bz_eShotFiredEvent, &cfs);
88
89 return 0;
90}
91
92BZF_PLUGIN_CALL int bz_Unload(void) {
93 // unregister our events

Callers

nothing calls this directly

Calls 3

bz_debugMessageFunction · 0.85
bz_RegisterCustomFlagFunction · 0.85
bz_registerEventFunction · 0.85

Tested by

no test coverage detected