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

Method add

scripts/DallasFuncs.cpp:4565–4584  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4563}
4564
4565void CKillRobotList::add(tKillObjectItem *data) {
4566 tKillRobotListNode *curr = list;
4567
4568 if (!curr) {
4569 list = curr = (tKillRobotListNode *)malloc(sizeof(tKillRobotListNode));
4570 } else {
4571 while (curr->next) {
4572 curr = curr->next;
4573 }
4574
4575 curr->next = (tKillRobotListNode *)malloc(sizeof(tKillRobotListNode));
4576 curr = curr->next;
4577 }
4578
4579 if (!curr)
4580 return;
4581
4582 curr->next = NULL;
4583 memcpy(&curr->item, data, sizeof(tKillObjectItem));
4584}
4585
4586/*
4587$$ACTION

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected