Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 09-20-2009, 10:34 PM
EvoZak
Sarnak
 
Join Date: May 2008
Location: Midwest
Posts: 72
Default sending the client PC HP updates... why?

From what I understand, the client does its own calcs for player HP regen. The server does a pretty good job of approximating that. Not perfect, but then live probably wasn't either.

So why does the server send out SpawnHPUpdate_Struct packets with precise values? I can send out wildly inaccurate values and the client happily ignores it and uses its own regen rates. So does anyone know why the server bothers at all? Just curious. Thx.
Reply With Quote
  #2  
Old 09-20-2009, 10:48 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

If you look deep enough, I am sure you would find a ton of things that we calculate and check for and send updates on regularly that in a perfect world, we wouldn't need to. The problem is that it isn't a perfect world. Another problem is that a large number of hacks would be possible if we didn't at least try to keep the client in check and do everything server-side that we do currently. In the case of HP updates, they are needed for both clients as well as for NPCs. The client does not ignore them, though it might try to do it's own calculations on it's own, it will still ultimately do what the server says. Also, you need to take into consideration that not all servers try to emulate Live exactly, which means that the server might not calculate stuff exactly the same as the client. We have a rule that allows server admins to decide when Out of Combat Regen starts happening and what rate it recovers at. So, without sending HP Updates, the client would never be in sync with the server in that particular case.

I am sure there are plenty of other good reasons, but I think that one alone should answer your question.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 09-21-2009, 09:38 PM
EvoZak
Sarnak
 
Join Date: May 2008
Location: Midwest
Posts: 72
Default

That makes sense. I wasn't saying it shouldn't be done, but rather asking if it was necessary. Maybe it was something I wasn't doing right but the client was regenerating a lot faster than the server was tracking.

So when you say the client will still ultimately do what the server says... how does that work for HPs? Cuz when the HP packet is sent, the HP bar isn't respecting it. Is it tracked somewhere else?
Reply With Quote
  #4  
Old 09-23-2009, 07:55 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Well, the HP Updates should show up directly in your health bar and character/inventory window. When the case happens that the server and client don't match up for how many HPs you currently have as max hps, you will see your hps bouncing up and down a bit due to the packet update for HPs.

Maybe you have some other factor affecting your regen rates if that is what you are concerned with. Have you checked your rule_values table to see if you have out of combat regen enabled and if so, what value you have it set to regen at?
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #5  
Old 09-29-2009, 10:20 PM
EvoZak
Sarnak
 
Join Date: May 2008
Location: Midwest
Posts: 72
Default

Thanks for clearing this up for me. I thought I was seeing the client ignore HP updates I was sending it. Turns out I was using the wrong OpCode.
Reply With Quote
Reply


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 04:12 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3