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

Function ObjInitShard

Descent3/ObjInit.cpp:870–886  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

868 return 1;
869}
870int ObjInitShard(object *objp) {
871 ASSERT(objp->type == OBJ_SHARD);
872 objp->movement_type = MT_PHYSICS;
873 SetObjectControlType(objp, CT_NONE);
874 objp->lifeleft = DEBRIS_LIFE * 5;
875 objp->flags |= OF_USES_LIFELEFT;
876 // Set physics info
877 objp->mtype.phys_info.flags = PF_GRAVITY + PF_BOUNCE;
878 objp->mtype.phys_info.mass = 1.0;
879 objp->mtype.phys_info.drag = 0.0001f;
880 objp->mtype.phys_info.coeff_restitution = 0.3f;
881 objp->mtype.phys_info.num_bounces = 0;
882
883 // Set up render info
884 objp->render_type = RT_SHARD;
885 return 1;
886}
887#ifdef _DEBUG
888int ObjInitLine(object *objp) {
889 ASSERT(objp->type == OBJ_DEBUG_LINE);

Callers 1

ObjInitTypeSpecificFunction · 0.85

Calls 1

SetObjectControlTypeFunction · 0.85

Tested by

no test coverage detected