update with upstream

This commit is contained in:
Robin Appelman 2022-04-18 23:50:51 +02:00
commit 2d2d732bfd
7 changed files with 16 additions and 14 deletions

View file

@ -8,6 +8,7 @@
},
"scripts": {
"build": "NODE_ENV=production webpack --config webpack.config.js",
"dev": "NODE_ENV=development webpack --config webpack.config.js",
"start": "webpack serve --hot"
},
"dependencies": {

2
www/src/header.d.ts vendored
View file

@ -9,5 +9,5 @@ export interface Header {
duration: number,
ticks: number,
frames: number,
sigon: number
signon: number
}

View file

@ -22,7 +22,7 @@ export function MessageInfo({msg, prop_names, class_names, search}: MessageInfoP
return <>{msg.reliable ? 'reliable' : 'unreliable'} {msg.num} sounds: {msg.length} bits</>
case "VoiceInit":
return <>{msg.codec} at quality {msg.quality} and sampling rage {msg.sampling_rate}</>
case "SigOnState":
case "SignOnState":
return <>state: {msg.state}, count: {msg.count}</>
case "SetConVar":
return <>{msg.vars.map(cvar => `${cvar.key}=${cvar.value}`).join(', ')}</>
@ -96,7 +96,7 @@ function formatEntity(entity: PacketEntity, prop_names: Map<number, { table: Str
return `[unknown prop]=${prop.value}`;
}
})
return `entity ${entity.entity_index}(${class_name}) ${entity.pvs}: ` + baseline.concat(props).join(', ');
return `entity ${entity.entity_index}(${class_name}) ${entity.update_type}: ` + baseline.concat(props).join(', ');
}
function formatEventDefinition(event: GameEventDefinition): string {

15
www/src/parser.d.ts vendored
View file

@ -10,7 +10,7 @@ export type Packet =
messages: Message[];
meta: MessagePacketMeta;
tick: number;
type: "Sigon";
type: "Signon";
[k: string]: unknown;
}
| {
@ -88,8 +88,8 @@ export type Message =
}
| {
count: number;
state: number;
type: "SigOnState";
state: SignOnState;
type: "SignOnState";
[k: string]: unknown;
}
| {
@ -309,6 +309,7 @@ export type Message =
type: "CmdKeyValues";
[k: string]: unknown;
};
export type SignOnState = "None" | "Challenge" | "Connected" | "New" | "PreSpawn" | "Spawn" | "Full" | "ChangeLevel";
export type ChatMessageKind =
| "TF_Chat_All"
| "TF_Chat_Team"
@ -3211,11 +3212,11 @@ export type GameEventValue =
Boolean: boolean;
};
export type GameEventTypeId = number;
export type EntityId = number;
export type SendPropIdentifier = number;
export type SendPropValue = Vector | VectorXY | number | number | string | SendPropValue[];
export type PVS = "Preserve" | "Leave" | "Enter" | "Delete";
export type EntityId = number;
export type ClassId = number;
export type UpdateType = "Preserve" | "Leave" | "Enter" | "Delete";
export type GameEventValueType = "None" | "String" | "Float" | "Long" | "Short" | "Byte" | "Boolean" | "Local";
export type SendTableName = string;
export type ServerClassName = string;
@ -3278,14 +3279,14 @@ export interface Vector {
[k: string]: unknown;
}
export interface PacketEntity {
baseline_props: SendProp[];
delay?: number | null;
entity_index: EntityId;
in_pvs: boolean;
baseline_props: SendProp[];
props: SendProp[];
pvs: PVS;
serial_number: number;
server_class: ClassId;
update_type: UpdateType;
[k: string]: unknown;
}
export interface SendProp {

View file

@ -73,7 +73,7 @@ export function filterPacket(
search: Search,
): boolean {
switch (packet.type) {
case "Sigon":
case "Signon":
case "Message":
return packet.messages.some(msg => filterMessage(msg, search))
case "SyncTick":

View file

@ -37,7 +37,7 @@ interface RowProps {
export function PacketRow({packet}: RowProps) {
switch (packet.type) {
case "Sigon":
case "Signon":
case "Message":
return <>
<span className="tick">{packet.tick}</span>
@ -93,7 +93,7 @@ function filteredMessages(messages: Message[], search: Search) {
export function PacketDetails({packet, prop_names, class_names, search}: DetailProps) {
switch (packet.type) {
case "Sigon":
case "Signon":
case "Message":
let rows = filteredMessages(packet.messages, search).map((message, y) => <tr key={y}>
<td className="type">{message.type}</td>