MantisBT - Zandronum | ||||||||||
View Issue Details | ||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||
0001609 | Zandronum | [All Projects] Suggestion | public | 2013-12-09 23:13 | 2017-04-17 18:36 | |||||
Reporter | Ijon Tichy | |||||||||
Assigned To | Torr Samaho | |||||||||
Priority | normal | Severity | tweak | Reproducibility | N/A | |||||
Status | assigned | Resolution | fixed | |||||||
Platform | OS | OS Version | ||||||||
Product Version | 1.2 | |||||||||
Target Version | Fixed in Version | 2.0 | ||||||||
Summary | 0001609: Don't report inventory/actor property changes if they haven't actually changed | |||||||||
Description | As it stands, all TakeInventory, GiveInventory, and SetActorProperty changes (among other things, I'm sure) are broadcasted to the client(s) regardless of if anything actually changed. If you TakeInventory a Clip and you're out of bullets, that will be sent to the client regardless of anything having actually changed. This causes ACS scripts that don't do a CheckInventory/CheckActorProperty before every Take/GiveInventory/SetActorProperty call to cause unnecessary traffic, and in severe cases, needless lag. What I suggest is to keep track of these changes for the tic they're made when in an actual netgame. When an inventory count or actor/player/etc property is changed, store its original value in an array, as well as a reference to the item or property in particular, however that may be. At the end of that tic, check the original value against the new value. If they're the same, there is no need to tell the client that anything changed, and so nothing is sent regarding that value. Otherwise, send an update as usual. Mods like Samsara do many inventory modifications and actor property changes per tic, according to both clientside CVars (for stuff like classic Wolfenstein movement, classic weapon animations, etc), serverside CVars (jetpack banning, no custom gravity, etc), whether certain items are present (extra life for Blazko, jetpack for Duke, many powerup timers for Ranger), and whatnot. As a result, the mod poorly scales up to player count, and while wrapping code with "if (CheckInventory(things)) { stuff }" blocks is surely possible, it's cumbersome and trades off net friendliness for unnecessary code bloat, ugliness, and wasted cycles. Something like this would help drastically. | |||||||||
Steps To Reproduce | ||||||||||
Additional Information | ||||||||||
Tags | No tags attached. | |||||||||
Relationships |
| |||||||||
Attached Files | tooptimize.pk3 (1,186) 2013-12-20 02:18 https://zandronum.com/tracker/file_download.php?file_id=1119&type=bug | |||||||||
Issue History | ||||||||||
Date Modified | Username | Field | Change | |||||||
2013-12-09 23:13 | Ijon Tichy | New Issue | ||||||||
2013-12-15 17:38 | Torr Samaho | Note Added: 0007699 | ||||||||
2013-12-15 18:09 | Torr Samaho | Assigned To | => Torr Samaho | |||||||
2013-12-15 18:09 | Torr Samaho | Status | new => assigned | |||||||
2013-12-16 07:02 | Torr Samaho | Status | assigned => feedback | |||||||
2013-12-20 02:18 | Ijon Tichy | File Added: tooptimize.pk3 | ||||||||
2013-12-20 02:19 | Ijon Tichy | Note Added: 0007716 | ||||||||
2013-12-20 02:19 | Ijon Tichy | Status | feedback => assigned | |||||||
2013-12-22 21:35 | Torr Samaho | Note Added: 0007718 | ||||||||
2013-12-22 21:35 | Torr Samaho | Status | assigned => needs testing | |||||||
2013-12-23 03:25 | Ijon Tichy | Note Added: 0007719 | ||||||||
2013-12-23 04:33 | Qent | Status | needs testing => resolved | |||||||
2013-12-23 04:33 | Qent | Fixed in Version | => 2.0-beta | |||||||
2013-12-23 04:33 | Qent | Resolution | open => fixed | |||||||
2013-12-30 18:25 | Torr Samaho | Relationship added | parent of 0001628 | |||||||
2013-12-30 18:31 | Torr Samaho | Note Added: 0007768 | ||||||||
2013-12-30 18:31 | Torr Samaho | Status | resolved => assigned | |||||||
2015-01-23 04:56 | Blzut3 | Fixed in Version | 2.0-beta => 2.0 | |||||||
2017-04-17 18:36 | Korshun | Note Added: 0017174 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|