Results 1 to 3 of 3
  1. #1
    supercarz1991's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    6,285
    Reputation
    435
    Thanks
    3,715
    My Mood
    Doh

    CharacterHitBox Strut/ Info on Object.LTO

    this is from the base source of NOLF2, and knowing nexon, they probably didn't change it much thinking we would never get it

    Code:
    #ifndef __CHARACTER_HIT_BOX_H__
    #define __CHARACTER_HIT_BOX_H__
    
    #include "GameBase.h"
    #include "ModelButeMgr.h"
    #include "TemplateList.h"
    
    class CProjectile;
    class CAttachments;
    struct IHitBoxUser;
    
    LINKTO_MODULE( CharacterHitBox );
    
    struct NodeRadiusStruct
    {
    	NodeRadiusStruct()
    	{
            hModel = LTNULL;
    		eNode = eModelNodeInvalid;
    	}
    
    	~NodeRadiusStruct()
    	{
    		if (hModel)
    		{
                g_pLTServer->RemoveObject(hModel);
    		}
    	}
    
    	LTObjRef hModel;
    	ModelNode eNode;
    };
    
    class CCharacterHitBox : public GameBase
    {
    	public :
    
    		CCharacterHitBox();
    		virtual ~CCharacterHitBox();
    
    		LTBOOL   Init(HOBJECT hModel, IHitBoxUser* pUser);
            void  SetOffset(LTVector vOffset) { m_vOffset = vOffset; }
    		const LTVector& GetOffset() const { return m_vOffset; }
    
    		void  Update();
    
            LTBOOL HandleImpact(CProjectile* pProj, IntersectInfo & iInfo,
                LTVector vDir, LTVector & vFrom);
    
            LTBOOL DidProjectileImpact(CProjectile* pProjectile);
    
    		HOBJECT	GetModelObject() const { return m_hModel; }
    
    		LTBOOL CanActivate() const { return m_bCanActivate; }
    		void SetCanActivate(LTBOOL b) { m_bCanActivate = b; }
    
    		bool CanBeSearched() const { return m_bCanBeSearched; }
    		void SetCanBeSearched(bool b);
    
            virtual uint32 EngineMessageFn(uint32 messageID, void *pData, LTFLOAT lData);
            virtual uint32 ObjectMessageFn(HOBJECT hSender, ILTMessage_Read *pMsg);
    
    		void	SetAnimControllingDims( bool bControls, HMODELANIM hAni ) { m_bAnimControlsDims = bControls; m_hControllingAnim = hAni; }
    		bool	IsAnimControllingDims() { return m_bAnimControlsDims; }
    
    		void	SetAnimControllingOffset( bool bControls, HMODELANIM hAni ) { m_bAnimControlsOffset = bControls; m_hControllingAnim = hAni; }	
    		bool	IsAnimControllingOffset() { return m_bAnimControlsOffset; }
    
    		void	SetDimsToModel();
    		void	GetDefaultModelDims( LTVector &vDims );
    		void	EnlargeAndSetDims( LTVector &vDims );
    
    	protected :
    
    		LTBOOL	GetNodeTransform(const char* const pszNodeName,LTransform &NodeTransform);
            virtual	LTVector GetBoundingBoxColor();
    
    		ModelNode FindHitNode( LTVector const& vDir, LTVector const& vFrom );
    
            LTBOOL  HandleVectorImpact(CProjectile* pProj, IntersectInfo& iInfo, LTVector& vDir,
                LTVector& vFrom, ModelNode& eModelNode);
    
            LTFLOAT			GetNodeRadius(ModelSkeleton eModelSkeleton, ModelNode eModelNode);
    
    		IHitBoxUser* m_pHitBoxUser;
    		LTObjRef	m_hModel;
            LTVector	m_vOffset;
    		
    		bool		m_bAnimControlsDims;
    		bool		m_bAnimControlsOffset;
    
    		HMODELANIM	m_hControllingAnim;
    
    	private :
    
    		// Debugging helper...
    		CTList<NodeRadiusStruct*>	m_NodeRadiusList;
    
    		LTBOOL	m_bCanActivate;
    		bool	m_bCanBeSearched;
    		
    		void CreateNodeRadiusModels();
    		void RemoveNodeRadiusModels();
    		void UpdateNodeRadiusModels();
    
    		void Save(ILTMessage_Write *pMsg);
    		void Load(ILTMessage_Read *pMsg);
    };
     
    
    #endif  // __CHARACTER_HIT_BOX_H__
    if u want all the Strut files from NOLF2 (which is the source code that Nexon/Doobic based CA off of) PM me, i have Object LTO full classes, and thats something (if u know the game engine as well as i do) that you should look into. Object is actually a DLL file


    OBJECT LTO—You must include all the server logic code in this file, such as artificial intelligence routines for enemies and scorekeeping for multiplayer games. This file should also define all the objects in your game. The DEdit tool can read them from this file directly. This allows a programmer to make a change to what properties a level designer can set on an object and have the changes immediately reflected in the level-editing package. This file also should house a lot of your server messaging commands for code like Hit Box, Triggers to spawn more enemies, and the kicking/banning of players.
    Last edited by supercarz1991; 03-10-2012 at 02:29 AM. Reason: added more info

    commando: You're probably the best non-coder coder I know LOL


  2. The Following 4 Users Say Thank You to supercarz1991 For This Useful Post:

    Drake (03-10-2012),[MPGH]Flengo (03-19-2012),street_21 (03-10-2012),YaaN (03-10-2012)

  3. #2
    kibbles18's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    US
    Posts
    860
    Reputation
    5
    Thanks
    127
    so much oop my head is gunna explode
    Way she fuckin goes boys

  4. #3
    0xe9's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Posts
    7
    Reputation
    10
    Thanks
    3
    Whats with posting this unneeded info, Haha. You can get the hitbox from the CharFX Class.