input desynchro, rollback to instant handle.

This commit is contained in:
LuckyLaszlo
2022-11-30 04:00:55 +01:00
parent 01023d67b5
commit 68e529fec2
14 changed files with 123 additions and 66 deletions

View File

@@ -66,7 +66,7 @@ class EventMatchEnd extends ServerEvent {
/* From Client */
class ClientEvent {
type: en.EventTypes;
type: en.EventTypes; // readonly ?
constructor(type: en.EventTypes = 0) {
this.type = type;
}
@@ -74,21 +74,21 @@ class ClientEvent {
class ClientAnnounce extends ClientEvent {
role: en.ClientRole;
id: string;
constructor(role: en.ClientRole, id: string = "") {
clientId: string;
constructor(role: en.ClientRole, clientId: string = "") {
super(en.EventTypes.clientAnnounce);
this.role = role;
this.id = id;
this.clientId = clientId;
}
}
class EventInput extends ClientEvent {
input: en.InputEnum;
inputId: number;
constructor(input: en.InputEnum = 0, inputId: number = 0) {
id: number;
constructor(input: en.InputEnum = en.InputEnum.noInput, id: number = 0) {
super(en.EventTypes.clientInput);
this.input = input;
this.inputId = inputId;
this.id = id;
}
}