MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / DeleteObject

Function DeleteObject

Source/objects.cpp:1003–1014  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1001}
1002
1003void DeleteObject(int oi, int i)
1004{
1005 const Object &object = Objects[oi];
1006 Point position = object.position;
1007 dObject[position.x][position.y] = 0;
1008 AvailableObjects[-ActiveObjectCount + MAXOBJECTS] = oi;
1009 ActiveObjectCount--;
1010 if (ObjectUnderCursor == &object) // Unselect object if this was highlighted by player
1011 ObjectUnderCursor = nullptr;
1012 if (ActiveObjectCount > 0 && i != ActiveObjectCount)
1013 ActiveObjects[i] = ActiveObjects[ActiveObjectCount];
1014}
1015
1016void AddChest(Object &chest)
1017{

Callers 1

ProcessObjectsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected