Added code for demo system. #16
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "anomaly/iw6-mod:demo_system"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This pr adds demo support to IW6 by way of 9 user commands (7 for client, 2 for server) and 5 cvars (3 for client, 2 for server).
user commands:
demostart
:<filename>
is used as demo file nameoverwrite
to indicate that overwriting an existing demo file is allowed,this only applies if the user provided the file name
demostop
:demoplay
:fullpath
to indicate that the second argument is not the demo file name but "path/filename.extension"repeat
to keep playing the demo, instead of stopping the playback the demo will rewind to the beginningdemoinstantplay
:demoplay
but experimentalwithout spending time on disconnecting or map (re)loading
demoreplay
:demoforward
:demorewind
:sv_demostart
:demoplay
<client_num | player_name>
<filename>
andoverwrite
are optionalpidX
likepid10
,there can be any number of zeroes between
pid
andX
(pid0010
)to differentiate between actual pids and player names
sv_demostop
:<client_num | player_name>
argument behavior is the same assv_demostart
cvars:
demotimescale
:demoautorecord
:demovision
:0 "disabled", 1 "no vision", 2 "default",
3 "ac130", 4 "ac130_enhanced_mp", 5 "ac130_inverted", 6 "aftermath",
7 "aftermath_glow", 8 "aftermath_post", 9 "black_bw", 10 "cheat_bw",
11 "coup_sunblind", 12 "default_night", 13 "default_night_mp", 14 "end_game",
15 "missilecam", 16 "mpintro", 17 "mpnuke", 18 "mpnuke_aftermath", 19 "mpoutro",
20 "near_death", 21 "near_death_mp", 22 "nuke_global_flash", 23 "thermal_mp",
24 "thermal_snowlevel_mp", 25 "aftermath_map" (only available for a small number of maps)
sv_demos
:then that match cannot be recorded for that player
sv_demoautorecord
:Some notes (in no particular order):
extinction mode appears to work but is mostly untested
.dm_iw6
(part of the general header):
(part of the mod header):
fs_game
)(part of the map header):
(this is known to happen with other Call of Duty games, and gets worse with slower hard drives and more demo files)
when a user starts a demo, a second demo file is created that contains the entire match up until that point
this means that if a user never records a demo, no files are created,
but as soon as the user starts recording a demo,
the data for the first part of the match is stored in a secondary demo file as backup
the second file contains everything from the match start to end
but they can be worked around by restarting the demo, which is also quite fast
iw6-mod.exe
this makes it easier to parse the demo as well as add new data later if needed
but the proper way to do this, i.e. imitating the logic inside
SV_SendClientGameStateInternal
,requires significantly more effort and time, and possibly make the code more game specific
Known issues (at this point):
e.g. with the Helo Pilot ksr, the view of the chopper inside and the bullet fire / tracers will look a bit different
the replay of modded vehicles is untested and may not work properly,
only the Trinity Rocket, Gryphon, Helo Pilot and Loki / Odin have been tested
[FS] Startup Error: Couldn't load player animation script mp/playeranim_al_defines.script
[FS] Startup Error: Couldn't load player animation script mp/playeranim_mp_defines.script
Checkout
From your project repository, check out a new branch and test the changes.