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

Function ObjInitDebris

Descent3/ObjInit.cpp:852–869  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

850 return ret;
851}
852int ObjInitDebris(object *objp) {
853 ASSERT(objp->type == OBJ_DEBRIS);
854 objp->movement_type = MT_PHYSICS;
855 SetObjectControlType(objp, CT_DEBRIS);
856 objp->lifeleft = DEBRIS_LIFE;
857 objp->flags |= OF_USES_LIFELEFT;
858 objp->ctype.debris_info.death_flags = 0;
859 // Set up render info
860 ObjSetRenderPolyobj(objp, -1);
861 objp->lighting_render_type = LRT_GOURAUD;
862 objp->lm_object.used = 0;
863 // Allocate effect memory
864 ObjCreateEffectInfo(objp);
865
866 objp->effect_info->type_flags = EF_VOLUME_LIT;
867
868 return 1;
869}
870int ObjInitShard(object *objp) {
871 ASSERT(objp->type == OBJ_SHARD);
872 objp->movement_type = MT_PHYSICS;

Callers 1

ObjInitTypeSpecificFunction · 0.85

Calls 3

SetObjectControlTypeFunction · 0.85
ObjSetRenderPolyobjFunction · 0.85
ObjCreateEffectInfoFunction · 0.85

Tested by

no test coverage detected