| 892 | } |
| 893 | |
| 894 | void DemoReadObj() { |
| 895 | int16_t objnum; |
| 896 | object *obj; |
| 897 | vector pos; |
| 898 | matrix orient; |
| 899 | ASSERT(Demo_flags == DF_PLAYBACK); |
| 900 | objnum = cf_ReadShort(Demo_cfp); |
| 901 | |
| 902 | obj = &Objects[Demo_obj_map[objnum]]; |
| 903 | // ASSERT(obj->type!=OBJ_NONE); |
| 904 | |
| 905 | int roomnum = cf_ReadInt(Demo_cfp); |
| 906 | gs_ReadVector(Demo_cfp, pos); |
| 907 | gs_ReadMatrix(Demo_cfp, orient); |
| 908 | if (obj->type == OBJ_PLAYER || obj->type == OBJ_OBSERVER) { |
| 909 | if (obj->id != Player_num) |
| 910 | is_multi_demo = true; |
| 911 | Players[obj->id].flags = cf_ReadInt(Demo_cfp); |
| 912 | |
| 913 | if (!(Players[obj->id].flags & PLAYER_FLAGS_DEAD)) |
| 914 | ResetPersistentHUDMessage(); |
| 915 | } |
| 916 | // if((!((obj->flags&OF_DYING)||(obj->flags&OF_EXPLODING)||(obj->flags&OF_DEAD)))&&obj->type!=255) |
| 917 | |
| 918 | if (obj->type != OBJ_NONE) { |
| 919 | obj->mtype.phys_info.velocity = Zero_vector; |
| 920 | obj->mtype.phys_info.rotvel = Zero_vector; |
| 921 | ObjSetPos(obj, &pos, roomnum, &orient, true); |
| 922 | poly_model *pm = &Poly_models[obj->rtype.pobj_info.model_num]; |
| 923 | if ((!(obj->flags & OF_ATTACHED)) && (pm->n_attach)) |
| 924 | AttachUpdateSubObjects(obj); |
| 925 | } |
| 926 | } |
| 927 | |
| 928 | void DemoReadHudMessage() { |
| 929 | char msg[HUD_MESSAGE_LENGTH]; |
no test coverage detected