MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / GetEvents

Method GetEvents

Source/GameData.cpp:110–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110std::vector<cEvent> sGameRecorded::GetEvents(const uint64 pTicks) {
111 std::lock_guard<std::mutex> lock(mLockMtx);
112
113 std::vector<cEvent> Events;
114
115 if (mTickDisabled)
116 return Events;
117
118 auto test = mEvents.equal_range(pTicks);
119 for (auto Event = test.first; Event != test.second; ++Event)
120 Events.push_back(Event->second);
121
122 return Events;
123}
124
125void sGameRecorded::AddState(const uint64 pTicks, const cStateRecorded& pEvent) {
126 std::lock_guard<std::mutex> lock(mLockMtx);

Callers 1

eventsProcessMethod · 0.80

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected