| 631 | } |
| 632 | |
| 633 | void DemoReadKillObject(void) { |
| 634 | int16_t hit_objnum = cf_ReadShort(Demo_cfp); |
| 635 | int16_t killer = cf_ReadShort(Demo_cfp); |
| 636 | float damage = cf_ReadFloat(Demo_cfp); |
| 637 | int death_flags = cf_ReadInt(Demo_cfp); |
| 638 | float delay = cf_ReadFloat(Demo_cfp); |
| 639 | int16_t seed = cf_ReadShort(Demo_cfp); |
| 640 | |
| 641 | if (!(IS_GENERIC(Objects[hit_objnum].type) || (Objects[hit_objnum].type == OBJ_DOOR))) |
| 642 | return; // bail if invalid object type |
| 643 | |
| 644 | ps_srand(seed); |
| 645 | KillObject(&Objects[hit_objnum], (killer != 65535) ? &Objects[killer] : NULL, damage, death_flags, delay); |
| 646 | } |
| 647 | |
| 648 | void DemoWritePlayerDeath(object *player, bool melee, int fate) { |
| 649 | cf_WriteByte(Demo_cfp, DT_PLAYER_DEATH); |
no test coverage detected