View Single Post
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 10-22-2021 , 06:12   Re: How to hook CBaseEntity SetModel using Orpheu
Reply With Quote #8

No difference. edict means entity dictionary, it contains data about entities that are networked to the client.
"s" means structure so "entity dictionary structure". This struct is defined here: https://github.com/alliedmodders/hls...ne/edict.h#L19 (think of it like "enum" in pawn).

"t" in edict_t comes from "type". edict_t is an "alias" of "struct edict_s". https://github.com/dreamstalker/rehl...n/const.h#L786

In C, when you declare a structure and want to use it as a data type, you have to specify "struct struct_name" everywhere, which gets annoying. It is a common practice to define a type like "edict_t" which is a synonym of "struct edict_s". It is cleaner and shorter.

tl;dr
Code:
struct edict_s* my_var;
edict_t *my_other_var;
these are equivalent
__________________

Last edited by HamletEagle; 10-22-2021 at 06:13.
HamletEagle is offline