Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update network natives #1218

Closed
wants to merge 1 commit into from
Closed
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
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.
Loading