| 868 | return 1; |
| 869 | } |
| 870 | int 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 |
| 888 | int ObjInitLine(object *objp) { |
| 889 | ASSERT(objp->type == OBJ_DEBUG_LINE); |
no test coverage detected