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

Function CreatePlayerObject

Descent3/object.cpp:1346–1357  ·  view source on GitHub ↗

Creates the player object in the center of the given room

Source from the content-addressed store, hash-verified

1344
1345// Creates the player object in the center of the given room
1346void CreatePlayerObject(int roomnum) {
1347 int objnum;
1348 vector pos;
1349
1350 ComputeRoomCenter(&pos, &Rooms[roomnum]);
1351
1352 objnum = ObjCreate(OBJ_PLAYER, 0, roomnum, &pos, NULL);
1353
1354 ASSERT(objnum == 0); // player must be object 0
1355
1356 Player_object = Viewer_object = &Objects[objnum];
1357}
1358
1359void InitBigObjects() { Num_big_objects = 0; }
1360

Callers 1

CreateNewMineFunction · 0.85

Calls 2

ComputeRoomCenterFunction · 0.85
ObjCreateFunction · 0.85

Tested by

no test coverage detected