Raised This Month: $ Target: $400
 0% 

Zombie plague bug


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Emp0wer
Member
Join Date: Jul 2010
Location: Ukraine mother
Old 08-06-2010 , 04:55   Zombie plague bug
Reply With Quote #1

Hello. In zombie plague this message is sent every 0.1second for players to update nemesis aura.
PHP Code:
    engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
    
write_byte(TE_DLIGHT// TE id
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y
    
engfunc(EngFunc_WriteCoordoriginF[2]) // z
    
write_byte(20// radius
    
write_byte((g_nemesis[id] || g_nodamage[id]) ? get_pcvar_num(cvar_nemnvgcolor[0]) : get_pcvar_num(cvar_nvgcolor[0])) // r
    
write_byte((g_nemesis[id] || g_nodamage[id]) ? get_pcvar_num(cvar_nemnvgcolor[1]) : get_pcvar_num(cvar_nvgcolor[1])) // g
    
write_byte((g_nemesis[id] || g_nodamage[id]) ? get_pcvar_num(cvar_nemnvgcolor[2]) : get_pcvar_num(cvar_nvgcolor[2])) // b
    
write_byte(2// life
    
write_byte(0// decay rate
    
message_end() 
If there is 1 nemesis my players ping go up, if there are a lot of them my players is just kicked "reliable channel overflowed", or start lagging very much.

I attached aura to nemesis player entity(so we don't need to update origin every 0.1s) and made longer life, so now we don't need to send that messages every 0.1s, but I don't why this message only glows entity id, but not all around in the radius like that should be:
PHP Code:
    engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
    
write_byte(TE_ELIGHT// TE id
    
write_short(id)
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y
    
engfunc(EngFunc_WriteCoordoriginF[2]) // z
    
write_coord20 )  // radius
    
write_byte(150// r
    
write_byte(0// g
    
write_byte(0// b
    
write_byte(255// life
    
write_coord)  // decay rate
    
message_end() 
Maybe there is other option to make red aura without updating it every 0.1second?

Also it's possible to set bright aura like this:
PHP Code:
set_pev(idpev_effectspev(idpev_effects) | EF_BRIGHTLIGHT
So maybe we can change it's color to red? Maybe this light is an entity so can find it and change the color? But what classname would it have?

Last edited by Emp0wer; 08-06-2010 at 10:49.
Emp0wer is offline
Send a message via ICQ to Emp0wer Send a message via Skype™ to Emp0wer
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:10.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode