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

Function ObjInitFireball

Descent3/ObjInit.cpp:1034–1054  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1032 return ret;
1033}
1034int ObjInitFireball(object *objp) {
1035 int ret = 1;
1036 ASSERT(objp->type == OBJ_FIREBALL);
1037 // Set size & shields
1038 objp->shields = 0;
1039 objp->size = 0;
1040 // Set up control info
1041 SetObjectControlType(objp, CT_EXPLOSION);
1042 // Set up physics info
1043 objp->movement_type = MT_NONE;
1044 objp->mtype.phys_info.num_bounces = PHYSICS_UNLIMITED_BOUNCE;
1045
1046 // Set up render info
1047 objp->render_type = RT_FIREBALL;
1048 objp->size = Fireballs[objp->id].size;
1049 objp->flags |= OF_USES_LIFELEFT;
1050 objp->lifeleft = Fireballs[objp->id].total_life;
1051 objp->lighting_render_type = LRT_STATIC;
1052 objp->lm_object.used = 0;
1053 return ret;
1054}
1055int ObjInitMarker(object *objp) {
1056 int ret = 1;
1057 static int first = 1;

Callers 1

ObjInitTypeSpecificFunction · 0.85

Calls 1

SetObjectControlTypeFunction · 0.85

Tested by

no test coverage detected