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

Rage SubModule: ColorChat


Post New Thread Reply   
 
Thread Tools Display Modes
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 05-29-2012 , 04:12   Re: Rage SubModule: ColorChat
Reply With Quote #21

so if I made a plugin with your older colorchat include (which I dont know why you call 'fake'), can I just put and replace this new .inc? I did and still code compiles, so I guess the syntax of the commands didn't change.
Is there anything I need to worry about or look at?
__________________
My Projects:

Auto-Mix (Pug): 100%

Joined the Military (a soldier now) - Inactive
Diegorkable is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-29-2012 , 10:59   Re: Rage SubModule: ColorChat
Reply With Quote #22

Yes it's ok, if you install module and files, you don't even need to recompile unless the library name has changed (don't remember).
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 06-14-2012 , 12:37   Re: Rage SubModule: ColorChat
Reply With Quote #23

What's the difference between edict_t and entvars_t?
Is it better to use entvars_t?

Code:
    entvars_t*pev;         if (params[1] == 0)     {         for (int i = 1; i <= gpGlobals->maxClients; ++i)         {             if( MF_IsPlayerIngame(i) )             {                 pev = Rage->index_to_entvar(i);                 if( pev->flags & FL_FAKECLIENT )                 {                     continue;                 }

I know there are a few conversions, but I don't know if is more safely to use entvars_t
__________________

Last edited by claudiuhks; 06-14-2012 at 13:09.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-14-2012 , 15:37   Re: Rage SubModule: ColorChat
Reply With Quote #24

They are 2 different structs.
But one member of edict_s is entvars_s v, that's all, no conversion, use the more convenient one.
As rage offers index_to_entvars (basically if you have CBaseEntity*pEntity it retrieved pEntity->pev), i felt easier to use that one.


See last member :
Code:
struct edict_s
{
	qboolean	free;
	int			serialnumber;
	link_t		area;				// linked to a division node or leaf
	
	int			headnode;			// -1 to use normal leaf check
	int			num_leafs;
	short		leafnums[MAX_ENT_LEAFS];

	float		freetime;			// sv.time when the object was freed

	void*		pvPrivateData;		// Alloced and freed by engine, used by DLLs

	entvars_t	v;					// C exported fields from progs

	// other fields from progs come immediately after
};
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 06-14-2012 at 15:39.
ConnorMcLeod is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 06-14-2012 , 20:42   Re: Rage SubModule: ColorChat
Reply With Quote #25

Yep, that's right.
Thanks in advance.
__________________
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-15-2012 , 01:14   Re: Rage SubModule: ColorChat
Reply With Quote #26

Quote:
Originally Posted by claudiuhks View Post
Thanks in advance.
In advance of what ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 06-15-2012 , 03:14   Re: Rage SubModule: ColorChat
Reply With Quote #27

Whats the difference with the old version?
__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-15-2012 , 04:02   Re: Rage SubModule: ColorChat
Reply With Quote #28

More efficient to use a module.
__________________
Arkshine is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 06-15-2012 , 05:44   Re: Rage SubModule: ColorChat
Reply With Quote #29

Quote:
Originally Posted by ConnorMcLeod View Post
In advance of what ?
For every information you gave me, of course.
I didn't ask without purpose, so every answer may be greatly appreciated though.

By the way, I made a few conversions, maybe someone needs that:

Code:
/* ** CPP file should contain */ extern edict_t *g_eNullEdict; /* ** H file should contain */ edict_t *g_eNullEdict; /* ** At ServerActivate_Post, g_eNullEdict will be pEdictList, which is the first argument from the DLL function */ /* ** Returns edict from index */ #define INT_TO_EDICT( i ) \     ( ( edict_t * ) ( g_eNullEdict + i ) ) /* ** Returns entvar from index */ #define INT_TO_ENTVAR( i ) \     ( &( INT_TO_EDICT( i ) -> v ) ) /* ** Returns index from edict */ #define EDICT_TO_INT( i ) \     ( ( int ) ( i - g_eNullEdict ) ) /* ** Returns entvar from edict */ #define EDICT_TO_ENTVAR( i ) \     ( &( i -> v ) ) /* ** Returns index from entvar */ #define ENTVAR_TO_INT( i ) \     ( EDICT_TO_INT( i -> pContainingEntity ) ) /* ** Returns edict from entvar */ #define ENTVAR_TO_EDICT( i ) \     ( i -> pContainingEntity )
__________________

Last edited by claudiuhks; 06-15-2012 at 05:48.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-15-2012 , 11:28   Re: Rage SubModule: ColorChat
Reply With Quote #30

You can fill g_eNullEdict on world spawn, so the first DispatchSpawn, then you can use it during precache and spawns.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Reply


Thread Tools
Display Modes

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:39.


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