Skip to content

Commit

Permalink
rename clear to flush
Browse files Browse the repository at this point in the history
  • Loading branch information
AnyBananaGAME committed Feb 3, 2025
1 parent 5fd0f1c commit 981bf04
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sanctumterra/raknet",
"version": "1.3.72",
"version": "1.3.73",
"description": "",
"main": "dist/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/proto/decorators/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function Create(id: number) {

if (!properties.includes("serialize")) {
target.prototype.serialize = function () {
this.clear();
this.flush();
if (id <= 255) this.writeUint8(id);
else if (id <= 65535) this.writeUint16(id);
else if (id <= 4294967295) this.writeUint32(id);
Expand Down
2 changes: 1 addition & 1 deletion src/proto/packets/base-packet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class BasePacket extends BinaryStream {
/**
* Clears the packet.
*/
public clear(): void {
public flush(): void {
this.binary = [];
}
}

0 comments on commit 981bf04

Please sign in to comment.