| 1823 | } |
| 1824 | |
| 1825 | void DemoReadPlayerTypeChange(void) { |
| 1826 | int slot; |
| 1827 | int type; |
| 1828 | |
| 1829 | slot = cf_ReadByte(Demo_cfp); |
| 1830 | type = cf_ReadByte(Demo_cfp); |
| 1831 | |
| 1832 | switch (type) { |
| 1833 | case OBJ_PLAYER: |
| 1834 | if (cf_ReadByte(Demo_cfp)) |
| 1835 | PlayerStopObserving(slot); |
| 1836 | else |
| 1837 | MultiMakePlayerReal(slot); |
| 1838 | break; |
| 1839 | case OBJ_GHOST: |
| 1840 | MultiMakePlayerGhost(slot); |
| 1841 | break; |
| 1842 | case OBJ_OBSERVER: { |
| 1843 | int obs_mode = cf_ReadInt(Demo_cfp); |
| 1844 | int objnum = -1; |
| 1845 | |
| 1846 | if (obs_mode == OBSERVER_MODE_PIGGYBACK) { |
| 1847 | objnum = Demo_obj_map[cf_ReadInt(Demo_cfp)]; |
| 1848 | } |
| 1849 | |
| 1850 | PlayerSwitchToObserver(slot, obs_mode, objnum); |
| 1851 | |
| 1852 | } break; |
| 1853 | }; |
| 1854 | } |
| 1855 | |
| 1856 | void DemoWriteObjLifeLeft(object *obj) { |
| 1857 | if (Demo_flags == DF_RECORDING) { |
no test coverage detected