Zandronum Chat on our Discord Server Get the latest version: 3.1
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002548Zandronum[All Projects] Bugpublic2015-12-12 23:092018-09-30 21:52
ReporterDusk 
Assigned ToDusk 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version3.0-beta 
Target Version3.0Fixed in Version3.0 
Summary0002548: Potential bandwidth waste in P_DamageMobj
DescriptionLet's observe this code block P_DamageMobj:

    // [BC] Tell clients that this thing was damaged.
    if ( NETWORK_GetState( ) == NETSTATE_SERVER )
    {
        if ( player )
            SERVERCOMMANDS_DamagePlayer( ULONG( player - players ));
        else
            // Is this even necessary?
            SERVERCOMMANDS_DamageThing( target );
    }


SERVERCOMMANDS_DamageThing sends a 3 byte packet for each non-player actor that gets damaged. On the client end, all this does is call

P_DamageMobj( pActor, NULL, NULL, 0, NAME_None );


Analyzing P_DamageMobj's source, it seems apparent that such a call, considering that damage==0 and pActor->player==NULL, only can have 2 effects:
* flashing stealth monsters
* shattering ice corpses.

If these indeed are the only effects, we could shave off some bandwidth use by replacing this server command with two separate server commands for flashing stealth monsters and shattering ice corpses, respectively.
Attached Files

- Relationships

-  Notes
User avatar (0013968)
Dusk (developer)
2015-12-13 00:04

It appears that ice corpses still work after removing the SERVERCOMMANDS_DamageThing call. The stealth monster thing is real though and needs a new SVC2 to be addressed.

'https://bitbucket.org/crimsondusk/zandronum-sandbox/commits/3473fb14b508 [^]'
User avatar (0014000)
Torr Samaho (administrator)
2015-12-20 17:26

Looks good. I added your patch.
User avatar (0014040)
cobalt (updater)
2016-01-03 18:35

Issue addressed by commit e8e5c287a91c: Removed the mostly useless SVC_DAMAGETHING, added SVC2_FLASHSTEALTHMONSTER to cover the stealth monster case. This should save some traffic. (fixes 2548)
Committed by Teemu Piippo [Dusk] on Sunday 13 December 2015 02:02:46

Changes in files:

 src/cl_main.cpp | 46 ++++++++++++----------------------------------
 src/network_enums.h | 2 +-
 src/p_interaction.cpp | 7 ++++---
 src/sv_commands.cpp | 24 ++++++++++++------------
 src/sv_commands.h | 2 +-
 5 files changed, 30 insertions(+), 51 deletions(-)

User avatar (0016512)
Ru5tK1ng (updater)
2016-12-17 01:37

The shattering ice corpses from Hexen and the StealthZombies seem to work without issues.

Issue Community Support
This issue is already marked as resolved.
If you feel that is not the case, please reopen it and explain why.
Supporters: No one explicitly supports this issue yet.
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2015-12-12 23:09 Dusk New Issue
2015-12-13 00:04 Dusk Note Added: 0013968
2015-12-13 00:04 Dusk Assigned To => Dusk
2015-12-13 00:04 Dusk Status new => needs review
2015-12-20 17:26 Torr Samaho Note Added: 0014000
2015-12-20 17:26 Torr Samaho Status needs review => needs testing
2016-01-03 18:35 cobalt Target Version => 3.0
2016-01-03 18:35 cobalt Description Updated View Revisions
2016-01-03 18:35 cobalt Note Added: 0014040
2016-12-17 01:37 Ru5tK1ng Note Added: 0016512
2016-12-17 01:37 Ru5tK1ng Status needs testing => resolved
2016-12-17 01:37 Ru5tK1ng Resolution open => fixed
2016-12-17 01:37 Ru5tK1ng Fixed in Version => 3.0
2016-12-17 01:37 Ru5tK1ng Description Updated View Revisions
2018-09-30 21:52 Blzut3 Status resolved => closed






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker