Kamran: I wouldnt be surprised if this is a limitation set in the send
tables. Either your SendProp for the health doesn't have enough bits
to go up to 200, or the SendProp has a maximum value set to it, which
would make it default to 1. That's why client side it's not returning
the right value, it doesn't get sent properly.

On 7/19/05, Kamran <[EMAIL PROTECTED]> wrote:
> Alright, it works fine... health kits work, chargers, etc... I only have
> one problem.
>
> For testing, I set MaxHealth to 200 in my HL2_Player::Spawn function. If
> I send a DevMsg like this:
>
> DevMsg("Player's max health is: %d", GetMaxHealth);
>
> It returns 200, like it's supposed to. However, in hud_health.cpp which
> is under the client project:
>
> DevMsg("Player's max health is: %d",
> C_BasePlayer::GetLocalPlayer()->GetMaxHealth());
>
> It returns 1, which is the default value if an entity has no max health.
> Why is it doing this? GetHealth works fine... but GetMaxHealth doesn't.
>
> Kamran wrote:
>
> > I'll see if that works :) If it does... thank you. If not, that's
> > alright.
> >
> > LDuke wrote:
> >
> >> SetMaxHealth?
> >>
> >> On 7/17/05, Kamran <[EMAIL PROTECTED]> wrote:
> >>
> >>
> >>> For SP, I've successfully been able to change the player's health level
> >>> to 200 using my own function... however, this isn't very good because
> >>> most items that give health use the GetMaxHealth function which
> >>> seems to
> >>> be able to be used for NPCs, not just the player.
> >>>
> >>> Is there a way to override the player's max health to be a different
> >>> number other than by manually setting it in the HL2Player::Spawn
> >>> function? Otherwise I will have to create some new health items that
> >>> restore the user's health.
> >>> --
> >>> Kamran A
> >>> Get Firefox! Safer, Faster, Better.
> >>> <http://www.spreadfirefox.com/?q=affiliates&id=0&t=85>
> >>> Down with Internet Explorer! Say "NO!" to Spyware! Use Firefox
> >>>
> >>>
> >>> _______________________________________________
> >>> To unsubscribe, edit your list preferences, or view the list
> >>> archives, please visit:
> >>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >>>
> >>>
> >>>
> >>>
> >>
> >> _______________________________________________
> >> To unsubscribe, edit your list preferences, or view the list
> >> archives, please visit:
> >> http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >>
> >>
> >>
> >>
> >>
> >
> > --
> > Kamran A
> > Get Firefox! Safer, Faster, Better.
> > <http://www.spreadfirefox.com/?q=affiliates&id=0&t=85>
> > Down with Internet Explorer! Say "NO!" to Spyware! Use Firefox
> >
> > _______________________________________________
> > To unsubscribe, edit your list preferences, or view the list archives,
> > please visit:
> > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >
> >
> >
>
> --
> Kamran A
> Get Firefox! Safer, Faster, Better.
> <http://www.spreadfirefox.com/?q=affiliates&id=0&t=85>
> Down with Internet Explorer! Say "NO!" to Spyware! Use Firefox
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives, please 
> visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to