#ifndef P_EFFECTS_H #define P_EFFECTS_H #ifdef CSQC void Read_Effect(bool is_new); #elif defined(SVQC) void Send_Effect(entity eff, vector eff_loc, vector eff_vel, int eff_cnt); void Send_Effect_(string eff_name, vector eff_loc, vector eff_vel, int eff_cnt); #endif #define particleeffectnum(e) _particleeffectnum(e.eent_eff_name) REGISTRY(Effects, BIT(8)) REGISTER_REGISTRY(RegisterEffects) #define EFFECT(istrail, name, realname) \ REGISTER(RegisterEffects, EFFECT, Effects, name, m_id, Create_Effect_Entity(realname, istrail)); .int m_id; .string eent_eff_name; .int eent_eff_trail; .vector eent_net_location; .vector eent_net_velocity; .int eent_net_count; entity Create_Effect_Entity(string eff_name, bool eff_trail) { entity this = new(effect_entity); this.eent_eff_name = eff_name; this.eent_eff_trail = eff_trail; return this; } void RegisterEffects_First() { #ifdef SVQC #define dedi (server_is_dedicated ? "a dedicated " : "") #else #define dedi "" #endif LOG_TRACEF("Beginning effect initialization on %s%s program...\n", dedi, PROGNAME); #undef dedi } void RegisterEffects_Done() { LOG_TRACE("Effects initialization successful!\n"); } // NOW we actually activate the declarations ACCUMULATE_FUNCTION(RegisterEffects, RegisterEffects_First) EFFECT(0, Null, string_null) #include "effects.inc" ACCUMULATE_FUNCTION(RegisterEffects, RegisterEffects_Done) #endif