Raised This Month: $51 Target: $400
 12% 

[TF2] How to tell if player is kritzkrieged?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Pawn 3-pg
Senior Member
Join Date: Jul 2009
Old 12-02-2010 , 19:10   [TF2] How to tell if player is kritzkrieged?
Reply With Quote #1

Since some time around the Halloween update, m_nPlayerCond no longer reports when a player is under a kritzkrieg effect (either from the medic weapon or the heavy KGB). Has anyone found a way to detect this?

Last edited by Pawn 3-pg; 12-02-2010 at 19:36. Reason: got my timing wrong
Pawn 3-pg is offline
Thrawn2
Veteran Member
Join Date: Apr 2009
Old 12-03-2010 , 01:22   Re: [TF2] How to tell if player is kritzkrieged?
Reply With Quote #2

you could use tEntDev to find any related netprops

load up that plugin, spawn a bot on a map without nav paths so he stands still, join his team, heal him, save his netprops, charge him, compare the netprops.
something should light up.
__________________
einmal mit profis arbeiten. einmal.
Thrawn2 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 12-03-2010 , 02:08   Re: [TF2] How to tell if player is kritzkrieged?
Reply With Quote #3

If m_nPlayerCond changes at all, it's probably just that Valve reordered the conditions again.
__________________
asherkin is offline
Pawn 3-pg
Senior Member
Join Date: Jul 2009
Old 12-03-2010 , 07:44   Re: [TF2] How to tell if player is kritzkrieged?
Reply With Quote #4

Quote:
Originally Posted by [AAA] Thrawn View Post
you could use tEntDev to find any related netprops
I tried it, but I couldn't get it to work right. I'll give it another try this weekend.

Quote:
Originally Posted by asherkin View Post
If m_nPlayerCond changes at all, it's probably just that Valve reordered the conditions again.
The value does not change at all. At first I was testing each condition, but then I switched to just outputting the int value and I saw that it didn't change. The other flags I tested still seem to work fine.
Pawn 3-pg is offline
AltPluzF4
Senior Member
Join Date: Aug 2007
Old 12-03-2010 , 11:00   Re: [TF2] How to tell if player is kritzkrieged?
Reply With Quote #5

I did a quick test with my dumper extension...
Here's the difference found:

Here is the pre.txt (while healing a stationary scout with kritzkrieg)
PHP Code:
  Sub-Class Table (2 Deep): DT_TFPlayerConditionListExclusive (offset 5724)
  -
Member_condition_bits (offset 5748) (type integer) (bits 28) - Value
Here is the during.txt (while the kritz is active)
PHP Code:
  Sub-Class Table (2 Deep): DT_TFPlayerConditionListExclusive (offset 5724)
  -
Member_condition_bits (offset 5748) (type integer) (bits 28) - Value2048 
Interestingly... m_nPlayerCond stayed:
PHP Code:
 Sub-Class Table (1 Deep): DT_TFPlayerShared (offset 5432)
 -
Memberm_nPlayerCond (offset 5608) (type integer) (bits 28) - Value10485760 
Not sure why. Anyway, it appears they've decided to use a new DataTable (DT_TFPlayerConditionListExclusive) that just has one field (_condition_bits)

Hopefully this helps you. I wasn't able to test with the KGB right now, but I believe it should be the same.
__________________
AltPluzF4 is offline
Thrawn2
Veteran Member
Join Date: Apr 2009
Old 12-03-2010 , 11:47   Re: [TF2] How to tell if player is kritzkrieged?
Reply With Quote #6

ack.

start: m_ConditionList->_condition_bits (5748) changed from 0 to 2048
end: m_ConditionList->_condition_bits (5748) changed from 2048 to 0

ergo
PHP Code:
bool:IsClientKritzed(client) {
    return (
GetEntData(clientFindSendPropInfo("CTFPlayer""_condition_bits")) & TF_CONDFLAG_KRITZKRIEGED);

__________________
einmal mit profis arbeiten. einmal.

Last edited by Thrawn2; 12-03-2010 at 11:50.
Thrawn2 is offline
psychonic

BAFFLED
Join Date: May 2008
Old 12-03-2010 , 12:02   Re: [TF2] How to tell if player is kritzkrieged?
Reply With Quote #7

Quote:
Originally Posted by [AAA] Thrawn View Post
ack.

start: m_ConditionList->_condition_bits (5748) changed from 0 to 2048
end: m_ConditionList->_condition_bits (5748) changed from 2048 to 0

ergo
PHP Code:
bool:IsClientKritzed(client) {
    return (
GetEntData(clientFindSendPropInfo("CTFPlayer""_condition_bits")) & TF_CONDFLAG_KRITZKRIEGED);

Code:
bool:IsClientKritzed(client) {     return (((GetEntProp(client, Prop_Send, "m_nPlayerCond")|GetEntProp(client, Prop_Send, "_condition_bits")) & TF_CONDFLAG_KRITZKRIEGED) == TF_CONDFLAG_KRITZKRIEGED); }

Last edited by psychonic; 12-03-2010 at 13:35.
psychonic is offline
Pawn 3-pg
Senior Member
Join Date: Jul 2009
Old 12-03-2010 , 15:32   Re: [TF2] How to tell if player is kritzkrieged?
Reply With Quote #8

Thanks for the help!

Quote:
Originally Posted by psychonic View Post
PHP Code:
bool:IsClientKritzed(client)
{
    return (((
GetEntProp(clientProp_Send"m_nPlayerCond")|GetEntProp(clientProp_Send"_condition_bits")) & TF_CONDFLAG_KRITZKRIEGED) == TF_CONDFLAG_KRITZKRIEGED);

Is there a reason you are checking both props at the same time instead of just the new one?
Pawn 3-pg is offline
psychonic

BAFFLED
Join Date: May 2008
Old 12-03-2010 , 15:38   Re: [TF2] How to tell if player is kritzkrieged?
Reply With Quote #9

Quote:
Originally Posted by Pawn 3-pg View Post
Is there a reason you are checking both props at the same time instead of just the new one?
Yes. That's how TF2 does it internally in CTFPlayerShared::InCond.
psychonic is offline
BrutalGoerge
AlliedModders Donor
Join Date: Jul 2007
Old 12-03-2010 , 16:36   Re: [TF2] How to tell if player is kritzkrieged?
Reply With Quote #10

so i gotta do this?
PHP Code:
// so do i do this now? 
if (((GetEntProp(clientProp_Send"m_nPlayerCond")|GetEntProp(clientProp_Send"_condition_bits")) & TF_CONDFLAG_UBERCHARGED) == TF_CONDFLAG_UBERCHARGED)  
{
// the duder is ubercharged

__________________
My Pluggies If you like, consider to me.

Last edited by BrutalGoerge; 12-03-2010 at 16:40.
BrutalGoerge is offline
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 11:21.


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