Raised This Month: $32 Target: $400
 8% 

NPC in CS:S


Post New Thread Reply   
 
Thread Tools Display Modes
pRED*
Join Date: Dec 2006
Old 05-09-2011 , 04:37   Re: NPC in CS:S
Reply With Quote #51

You shouldn't need to detour anything new.

Modify the CEntity::AcceptEntityInput handler to do what you want. Which I assume is exactly a copy paste of the sdk version, with a fallback (if the prop name isn't found) to the actual CBaseEntity code.

That should be more or less it. The macros to generate datamaps for a CEntity should work directly from the sdk (I think, maybe) and you don't need to do anything special with them. Code left in there to inject them into the CBaseEntity datamap table needs to be deleted, not sure if that's still in there
pRED* is offline
raydan
Senior Member
Join Date: Aug 2006
Old 05-09-2011 , 05:02   Re: NPC in CS:S
Reply With Quote #52

Quote:
Originally Posted by pRED* View Post
You shouldn't need to detour anything new.

Modify the CEntity::AcceptEntityInput handler to do what you want. Which I assume is exactly a copy paste of the sdk version, with a fallback (if the prop name isn't found) to the actual CBaseEntity code.

That should be more or less it. The macros to generate datamaps for a CEntity should work directly from the sdk (I think, maybe) and you don't need to do anything special with them. Code left in there to inject them into the CBaseEntity datamap table needs to be deleted, not sure if that's still in there

the macros to generate datamaps is work
Code:
BEGIN_DATADESC( CBaseNPCMaker )
    DEFINE_KEYFIELD( m_nMaxLiveChildren,        FIELD_INTEGER,    "MaxLiveChildren" ),
...
LINK_ENTITY_TO_CUSTOM_CLASS( npc_maker, info_target, CNPCMaker );
the game will parse "MaxLiveChildren" keyvalue to "info_target" - "m_nMaxLiveChildren"
the problem is "m_nMaxLiveChildren" no exist in that CBaseEntity, and it will overwrite a random memory address in that CBaseEntity. Not the custom entity.

know keyvalues problem now?
raydan is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 05-09-2011 , 07:35   Re: NPC in CS:S
Reply With Quote #53

If you had read the quote I posted, why that happens and how to fix it is explained in there.
__________________
asherkin is offline
raydan
Senior Member
Join Date: Aug 2006
Old 05-09-2011 , 11:48   Re: NPC in CS:S
Reply With Quote #54

parse keyvales & acceptinput already work now. how about custom output event?
raydan is offline
Nail
BANNED
Join Date: May 2008
Location: PetrovЪ GradЪ
Old 05-13-2011 , 12:52   Re: NPC in CS:S
Reply With Quote #55

raydan, could you upload the latest source?
Will these npcs be 'released' in the official package eventually? or are they always going to be part of a private version?
Nail is offline
raydan
Senior Member
Join Date: Aug 2006
Old 05-15-2011 , 00:56   Re: NPC in CS:S
Reply With Quote #56

i already open full function coop server for testing, same ip, port change to 27016.
don't ask me server ip
raydan is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 05-15-2011 , 04:51   Re: NPC in CS:S
Reply With Quote #57

Quote:
Originally Posted by raydan View Post
i already open full function coop server for testing, same ip, port change to 27016.
Very cool, you've done a great job
KyleS is offline
Nail
BANNED
Join Date: May 2008
Location: PetrovЪ GradЪ
Old 05-20-2011 , 12:24   Re: NPC in CS:S
Reply With Quote #58

A very long time no news. This means that the project is private and closed to all?
Nail is offline
SimonTheOne
Member
Join Date: Apr 2010
Old 06-02-2011 , 03:15   Re: NPC in CS:S
Reply With Quote #59

Could this also be used to fix the fast zombies in HL2DM?
SimonTheOne is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 06-02-2011 , 20:25   Re: NPC in CS:S
Reply With Quote #60

Quote:
Originally Posted by SimonTheOne View Post
Could this also be used to fix the fast zombies in HL2DM?
Do you mean the crashing? if so: https://forums.alliedmods.net/showthread.php?t=134536
KyleS 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 22:50.


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