6
10
Fork
You've already forked mobs_redo
12

Don't update object properties when nothing changed #11

Closed
whosit wants to merge 1 commit from whosit/mobs_redo:master into master
pull from: whosit/mobs_redo:master
merge into: tenplus1:master
tenplus1:master
First-time contributor
Copy link

Avoid calling object:set_properties every second, because it
generates AO_CMD_SET_PROPERTIES network packets without actual need.

Some wireshark graphs where I just tried commenting set_properties() lines out, while having 1, 2 and more kittens:
Screenshot 2024年01月30日 074643

Basically, MT is dumb, and if you change any property (even to same value), it will just re-send all info about the object, including mesh name, textures, etc.
Can be problematic if there's lots of mobs...

Avoid calling object:set_properties every second, because it generates AO_CMD_SET_PROPERTIES network packets without actual need. Some wireshark graphs where I just tried commenting `set_properties()` lines out, while having 1, 2 and more kittens: ![Screenshot 2024年01月30日 074643](/attachments/758a0e58-79eb-4482-a79c-cc316ceab1e4) Basically, MT is dumb, and if you change any property (even to same value), it will just re-send all info about the object, including mesh name, textures, etc. Can be problematic if there's lots of mobs...
Avoid calling object:set_properties every second, because it
generates AO_CMD_SET_PROPERTIES network packets without actual need.

Always love ways to improve code, has been added, thanks :)

Always love ways to improve code, has been added, thanks :)
tenplus1 closed this pull request 2024年01月31日 11:00:47 +01:00

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tenplus1/mobs_redo!11
Reference in a new issue
tenplus1/mobs_redo
No description provided.
Delete branch "whosit/mobs_redo:master"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?