Raised This Month: $ Target: $400
 0% 

Access to model struct


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 12-21-2009 , 09:55   Access to model struct
Reply With Quote #1

Is there a way to access to model struct as defined in hlsdk?

I mean to access this info

PHP Code:
typedef struct model_s
{
    
char            nameMAX_MODEL_NAME ];
    
qboolean        needload;           // bmodels and sprites don't cache normally
    
modtype_t       type;
    
int             numframes;
    
synctype_t      synctype;
    
int             flags;

//
// volume occupied by the model
//          
    
vec3_t          minsmaxs;
    
float           radius;

//
// brush model
//
    
int             firstmodelsurfacenummodelsurfaces;
    
int             numsubmodels;
    
dmodel_t        *submodels;
...
... 
I guess it's possible via entity pdata, but I'm not sure

PHP Code:
struct cl_entity_s
        qboolean                        player
;     // True if this entity is a "player"
        
int                             index;      // Index into cl_entities ( should match actual slot, but not necessarily )
        
entity_state_t                  baseline;   // The original state from which to delta during an uncompressed message
        
entity_state_t                  prevstate;  // The state information from the penultimate message received from the server
        
entity_state_t                  curstate;   // The state information from the last message received from server
...
...
...
        
struct model_s                  *model;     // cl.model_precache[ curstate.modelindes ];  all visible entities have a model
        
struct efrag_s                  *efrag;     // linked list of efrags
...
... 
Thanks
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-21-2009 , 10:01   Re: Access to model struct
Reply With Quote #2

It's possible with Orpheu. In the latest version there is already 2 or 3 structures added. But without orpheu, I have no idea.
__________________
Arkshine is offline
Old 12-21-2009, 10:02
xPaw
This message has been deleted by xPaw. Reason: Hi arkie!
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 12-21-2009 , 10:18   Re: Access to model struct
Reply With Quote #3

Yes, I know with orpheu I can but I'm looking for somethink more standard.

I don't know but I guess combining FM get_pdata and HAM get_pdata_cbase there's a way...
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-21-2009 , 10:23   Re: Access to model struct
Reply With Quote #4

Soon Orpheu will become the standart.
__________________
Arkshine is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 12-21-2009 , 11:56   Re: Access to model struct
Reply With Quote #5

Just a question, how can I access, for example, this offsets in an CBaseAnimation entity (ex: func_illusionary)?

Sub-Class Table (1 Deep): DT_BaseAnimating
Sub-Class Table (2 Deep): DT_BaseEntity
Sub-Class Table (3 Deep): DT_CollisionProperty
-Member: m_nSolidType (offset 41)
-Member: m_usSolidFlags (offset 36)

PHP Code:
CBaseAnimating:
 
Sub-Class Table (1 Deep): DT_BaseAnimating
  Sub
-Class Table (2 Deep): DT_BaseEntity
   Sub
-Class Table (3 Deep): DT_AnimTimeMustBeFirst
   
-Memberm_flAnimTime (offset 40)
  -
MemberAnimTimeMustBeFirst (offset 0)
  -
Memberm_flSimulationTime (offset 44)
  -
Memberm_vecOrigin (offset 796)
  -
Memberm_nModelIndex (offset 30)
   
Sub-Class Table (3 Deep): DT_CollisionProperty
   
-Memberm_vecMins (offset 8)
   -
Memberm_vecMaxs (offset 20)
   -
Memberm_nSolidType (offset 41)
   -
Memberm_usSolidFlags (offset 36)
   -
Memberm_nSurroundType (offset 40)
   -
Memberm_triggerBloat (offset 42)
   -
Memberm_vecSpecifiedSurroundingMins (offset 44)
   -
Memberm_vecSpecifiedSurroundingMaxs (offset 56
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
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 04:06.


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