Skip to content

Commit

Permalink
update network natives
Browse files Browse the repository at this point in the history
  • Loading branch information
coalaura committed Oct 27, 2024
1 parent 9690545 commit afb5951
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
6 changes: 4 additions & 2 deletions NETWORK/NetworkDisableProximityMigration.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ aliases: ["0x407091CF6037118E"]

```c
// 0x407091CF6037118E 0x9F82917F
void NETWORK_DISABLE_PROXIMITY_MIGRATION(int netID);
void NETWORK_DISABLE_PROXIMITY_MIGRATION(int networkId);
```
Prevents the entity dynamically migrating to nearby players, it can still migrate by other means. You need to call this every tick while you need it disabled.
## Parameters
* **netID**:
* **networkId**: The network id of the entity.
4 changes: 3 additions & 1 deletion NETWORK/NetworkRequestControlOfEntity.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ ns: NETWORK
BOOL NETWORK_REQUEST_CONTROL_OF_ENTITY(Entity entity);
```
Request ownership of the entity with the specified entity index from the current owner.
## Parameters
* **entity**:
* **entity**: The entity handle.
## Return value
Returns true if the entity is already owned by us.
6 changes: 4 additions & 2 deletions NETWORK/NetworkRequestControlOfNetworkId.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ ns: NETWORK

```c
// 0xA670B3662FAFFBD0 0x9262A60A
BOOL NETWORK_REQUEST_CONTROL_OF_NETWORK_ID(int netId);
BOOL NETWORK_REQUEST_CONTROL_OF_NETWORK_ID(int networkId);
```
Request ownership of the object with the specified network ID from the current owner.
## Parameters
* **netId**:
* **networkId**: The network id of the entity.
## Return value
Returns true if the networkId is already owned by us.
11 changes: 4 additions & 7 deletions NETWORK/SetNetworkIdCanMigrate.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@ ns: NETWORK

```c
// 0x299EEB23175895FC 0x47C8E5FF
void SET_NETWORK_ID_CAN_MIGRATE(int netId, BOOL toggle);
void SET_NETWORK_ID_CAN_MIGRATE(int networkId, BOOL canMigrate);
```
```
Whether or not another player is allowed to take control of the entity
```
Sets the `GLOBALFLAG_PERSISTENTOWNER` global flag for the specified network id. Disallows proximity or other common ownership changes to this networkId. Ownership can only be altered via explicit means.
## Parameters
* **netId**:
* **toggle**:
* **networkId**: The network id of the entity.
* **canMigrate**: Whether the network id can be migrated.

0 comments on commit afb5951

Please sign in to comment.