MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / FindPrevTrigInRoom

Function FindPrevTrigInRoom

editor/TriggerDialog.cpp:246–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244}
245
246int FindPrevTrigInRoom(int roomnum, int start) {
247 if (Triggers[start].roomnum != roomnum)
248 start = 0;
249 else
250 start--;
251
252 for (int i = Num_triggers; i > 0; i--) {
253 int n = (start + i) % Num_triggers;
254
255 if (Triggers[n].roomnum == roomnum)
256 return n;
257 }
258
259 // Couldn't find one
260 return -1;
261}
262
263void CTriggerDialog::UpdateDialog() {
264 bool portal = 0, floating = 0;

Callers 1

OnTrigPrevInRoomMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected