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

Function ObjInitDoor

Descent3/ObjInit.cpp:1072–1090  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1070 return ret;
1071}
1072int ObjInitDoor(object *objp, bool reinit) {
1073 // Set up movement info
1074 objp->movement_type = MT_NONE;
1075 SetObjectControlType(objp, CT_NONE);
1076 // Set up render info
1077 ObjSetRenderPolyobj(objp, GetDoorImage(objp->id));
1078 PageInPolymodel(objp->rtype.pobj_info.model_num);
1079 ComputeDefaultSize(OBJ_DOOR, objp->rtype.pobj_info.model_num, &objp->size);
1080 objp->lighting_render_type = LRT_LIGHTMAPS;
1081 // Set shields
1082 if (Doors[objp->id].flags & DF_BLASTABLE) {
1083 objp->flags |= OF_DESTROYABLE;
1084 objp->shields = Doors[objp->id].hit_points;
1085 }
1086 if (!reinit)
1087 objp->lm_object.used = 0;
1088
1089 return 1;
1090}
1091int ObjInitRoom(object *objp) {
1092 // Set up movement info
1093 objp->movement_type = MT_NONE;

Callers 1

ObjInitTypeSpecificFunction · 0.85

Calls 5

SetObjectControlTypeFunction · 0.85
ObjSetRenderPolyobjFunction · 0.85
GetDoorImageFunction · 0.85
PageInPolymodelFunction · 0.85
ComputeDefaultSizeFunction · 0.85

Tested by

no test coverage detected