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

Function GetNumberPlayerObjs

editor/ObjectClipboard.cpp:53–64  ·  view source on GitHub ↗

Returns the number if OBJ_PLAYER in the Objects list

Source from the content-addressed store, hash-verified

51
52// Returns the number if OBJ_PLAYER in the Objects list
53int GetNumberPlayerObjs() {
54 int count;
55 int i;
56 count = 0;
57
58 for (i = 0; i <= Highest_object_index; i++) {
59 if (Objects[i].type == OBJ_PLAYER)
60 count++;
61 }
62 mprintf(0, "GetNumberPlayerObjs returns %d\n", count);
63 return count;
64}
65
66// Makes a copy of the current object to the clipboard object, then deletes this object
67// Returns true on success

Callers 2

ObjectCutFunction · 0.85
ObjectDeleteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected