Raised This Month: $ Target: $400
 0% 

Hostage following the player


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-07-2014 , 16:56   Re: Hostage following the player
Reply With Quote #5

Woohoo triple post.

Well, I'm too dumb. It does a simple check in IDA (like return *(m_improv+ 56) == m_improv+ 252)), one line, but the thing it calls members of a class which is derived of another class, etc. It's confusing and I'm not sure what it checks exactly. It probably checks m_followState and m_behavior from CHostageImprov, like: return m_improv->m_behavior.m_state.something (m_parent?) == m_improv->m_followState.something. Unless there is more decompiled code, it's hard to picture (at least for me, but I'm a noob).

Just wondering, why you don't just call these functions directly? For example to check if an hostage follows, you just call: CHostage::IsFollowingSomeone() or to make hostage to follow, calling DoFollow(). Your code would be way more efficient, reliable and readable. You will have to deal with signatures and symbols, but I believe it's worth.

As bonus, some classes header (at right, it's the real offset under linux (real = char-based)) :

CHostage

CHostageImprov

HostageFollowState

HostageStateMachine

SimpleStateMachine

HostageState

SimpleState
__________________

Last edited by Arkshine; 05-07-2014 at 16:58.
Arkshine is offline
 



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 19:38.


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