Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/bright-coins-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'node-insim': minor
---

Add `ObjectFlags` enum with `FLOATING` value (0x80)
1 change: 1 addition & 0 deletions src/packets/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ export {
CompCar,
HInfo,
NodeLap,
ObjectFlags,
ObjectInfo,
PlayerHCap,
PlayerHCapFlags,
Expand Down
11 changes: 10 additions & 1 deletion src/packets/structs/ObjectInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class ObjectInfo extends SendableStruct {
@byte() Zbyte = 0;

/** Flags - see NOTE1 at {@link https://www.lfs.net/programmer/lyt} */
@byte() Flags = 0;
@byte() Flags: ObjectFlags | number = 0;

/**
* Object index
Expand Down Expand Up @@ -58,3 +58,12 @@ export class ObjectInfo extends SendableStruct {
this.initialize(data);
}
}

export enum ObjectFlags {
/**
* Floating object - remains at altitude specified by Zbyte.
*
* For all objects except the concrete objects {@link AXO_CONCRETE_SLAB} etc.
*/
FLOATING = 0x80,
}
2 changes: 1 addition & 1 deletion src/packets/structs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ export { CompCarFlags } from './CompCar';
export { HInfo } from './HInfo';
export { HostInfoFlags } from './HInfo';
export { NodeLap } from './NodeLap';
export { ObjectInfo } from './ObjectInfo';
export { ObjectFlags, ObjectInfo } from './ObjectInfo';
export { PlayerHCap, PlayerHCapFlags } from './PlayerHCap';
Loading