From 98aa493e54ee005e8e6a80d8e86050c78d3051b7 Mon Sep 17 00:00:00 2001 From: mszulecki Date: Thu, 29 Mar 2007 15:33:17 +0000 Subject: Change servermessage indexing to hex and add more cstrike related game message structures. git-svn-id: http://svn.sukimashita.com/repos/hldemo/trunk@7 e98d5eb1-5f28-0410-b569-d5a1ad2e6e54 --- doc/hl1-demofile-spec-cstrike.txt | 228 ++++++++++++++++++++++++++++++-------- 1 file changed, 179 insertions(+), 49 deletions(-) (limited to 'doc/hl1-demofile-spec-cstrike.txt') diff --git a/doc/hl1-demofile-spec-cstrike.txt b/doc/hl1-demofile-spec-cstrike.txt index 86ec4d6..ee64f14 100644 --- a/doc/hl1-demofile-spec-cstrike.txt +++ b/doc/hl1-demofile-spec-cstrike.txt @@ -1,140 +1,270 @@ -{64} '', // Radio Command? +1. List of known game messages: +-------------------------------------------------------------------------------- +'HudText' - uint8 uk_b1; - uint8 uk_b2; - char* uk_s1; - uint8 uk_b3; - uint8 uk_b4; - uint8 uk_b5; - char* uk_s2; - char* playername; - char* command; + uint8 message_length; + uint8 slot; + char* text; -{} 'ScoreInfo', +'SayText' - uint8 entindex; - sint16 frags; - sint16 deaths; + uint8 message_length; + uint8 slot; + char* text; + + +'TextMsg' + + uint8 message_length; + uint8 slot; + char* text; + char* params[4]; + +'ScoreInfo' + + uint8 slot; + int16 frags; + int16 deaths; uint16 uk_s1; uint16 team_index; + +'TeamInfo' + + uint8 message_length; + uint8 slot; + char* team_name; + +'TeamScore' + + uint8 message_length; + char* team_name; + uint16 score; + +'DeathMsg' + + uint8 uk_b1; + uint8 slot_killer; + uint8 slot_victim; + uint8 uk_b2; // Headshot indicator? + char* weapon; + +'Health' + + uint8 health; -{} 'Health', +'StatusText' - uint8 health; + uint8 message_length; + uint8 uk_b1; + char* status_text; -{} 'FlashLight', +'StatusValue' - uint8 state; // 1/0 on/off + uint8 message_length; + uint8 value_index; + int16 value; + +'Flashlight' + + uint8 state; // boolean on/off uint8 flash_battery; -{} 'CurWeapon', (67) +'AmmoPickup' + + uint8 ammo_index; + uint8 amount; + +'AmmoX' + + uint8 ammo_index; + uint8 amount; + +'Battery' + + int16 armorvalue; + +'Damage' + + uint8 dmg_save; + uint8 dmg_take; + uint32 visibleDamageBits; + int16 damageorigin_x; + int16 damageorigin_y; + int16 damageorigin_z; + +'RoundTime' + + int16 round_seconds; + +'BarTime' + + uint16 bar_time; + +'Money' + + uint32 money; + uint8 uk_b1; // Sign to use? 0:+money 1: -money? + +'InitHUD' // Empty +'ResetHUD' // Empty +'ScoreAttrib' + + uint8 uk_b1; + uint8 uk_b2; + +'ClCorpse' + + uint8 message_length; + char* model; + +'BombPickup' // Emtpy (?) +'WeapPickup' + + uint8 weapon; + +'ScreenFade' + + float32 duration; // 7.9 Fixed point + float32 hold_time; // 7.9 Fixed point + uint16 fade_flags; + uint8 col_rgba[4]; // 4 bytes r,g,b,a color1 (fade color) + +2. Further game messages which are incomplete/not fully reversed/partly unknown: +-------------------------------------------------------------------------------- +These messages are assigned with the newusermsg servermessage, thus you can add +them to your dynamic table and (in most cases) skip them due to the +default_msg_length field. Once their structure is know we can add them to the +supported list and properly parse their information. + +'WeaponList' + + uint8 message_length; + uint8 num_weapons; + Weapon* weaponlist[num_weapons]; + +struct Weapon { + char* name; + uint8 ammo_type; + uint8 ammo_max; + uint8 ammo2_type; + uint8 ammo2_max; + uint8 bucket; + uint8 bucket_pos; + uint8 id; + uint8 flags; +} + +'' (0x40) // Radio Command? + + uint8 uk_b1; + uint8 uk_b2; + char* uk_s1; + uint8 uk_b3; + uint8 uk_b4; + uint8 uk_b5; + char* uk_s2; + char* playername; + char* command; + +'CurWeapon' (0x43) uint8 uk_b1; uint8 uk_b2; uint8 uk_b3; -{} '', (73) +'' (0x49) uint8 uk_b1; uint8 uk_b2; -{} 'SayText', (75) +'SayText' (0x4b) uint8 message_length; uint8 slot; uint8 uk_b1; // if slot!=0 char* uk_string; -{} '', (76) +'' (0x4c) uint8 message_length; uint8 slot; uint8 uk_b1; // if slot!=0 char* uk_string; -{} '', (77) +'' (0x4d) uint8 message_length; uint8 slot; uint8 uk_b1; // if slot!=0 char* uk_string; - // Strings containing with # is some sort of command, also "#C1#C2" + // Strings containing # are some sort of command, also "#C1#C2" -{} '', (78) +'' (0x4e) uint8 uk_b1; char* weapon; char[8] uk_b2; -{} '', (87) +'' (0x57) uint8 uk_b1; char* team; char[9] uk_b2; -{} 'ShowMenu', (96) +'ShowMenu' (0x60) uint8 message_length; uint8[4] uk_b1; char* uk_string; // #DCT_BuyItem -{} 'SendAudio', (100) +'SendAudio' (0x64) uint8 message_length; uint8 slot; uint8 uk_b1; char* uk_string; // %!MRAD_LOCKNLOAD -{} 'RoundTime', (101) - - uint16 round_sec; - -{} 'Money', (102) - - uint32 money_amount; - uint8 uk_b2; // ? Add 0 /Substract 1? - -{} 'StatusIcon', (107) +'StatusIcon' (0x6b) uint8 message_length; uint8 uk_b1; char* icon; -{} 'StatusText', (107) +'StatusText' (0x6b) uint8 message_length; uint8 uk_b1; - char* uk_string; // message_length points to space after strings end \0 byte?? + char* uk_string; // message_length points to space after strings null-byte?? uint8 uk_b2; // ? uint8 uk_b3; // ? -{} 'Radar', (112) // ? +'Radar' (0x70) // ? - char[8] uk_b1; + uint8 uk_b1[8]; -{} 'VGUIMenu', (114) // ? +'VGUIMenu' (0x72) // ? -{} 'WClose', (115) +'WClose' (0x73) uint8 message_length; char* uk_string; // found aimbot stuff in here in some demos -{} '', (118) +'' (0x76) uint8 message_length; char* uk_string; -{128} '', // ? +'' (0x80) // ? char* delta_name; -{143} '', // ? +'' (0x8f) // ? -{217} '', // ? +'' (0xd9) // ? // usercmd_t - 440 bytes - skipped !OK! -{249} '', // ? deltadata? +'' (0xf9) // ? deltadata? // ID: 43 - clientdata_t - 1332 >< 1346 bytes (next block unknown) - 1343 ? // ID: 03 - entity_state_t - 1430 bytes - skipped !OK! // ID: 03 - entity_state_player_t - 1314 bytes - count varies -- cgit v1.1-32-gdbae