5 string trigger_magicear_processmessage(
entity ear,
entity source,
float teamsay,
entity privatesay,
string msgin)
7 float domatch, dotrigger, matchstart, l;
11 magicear_matched =
false;
13 dotrigger = ((
IS_PLAYER(source)) && (!
IS_DEAD(source)) && ((ear.radius == 0) || (
vdist(source.origin - ear.origin, <=, ear.radius))));
28 if(!W_Tuba_HasPlayed(source, weaponentity, ear.message, ear.movedir_x, !(ear.spawnflags &
MAGICEAR_TUBA_EXACTPITCH), ear.movedir_y, ear.movedir_z))
32 magicear_matched =
true;
36 savemessage = ear.message;
39 ear.message = savemessage;
75 msg = strdecolorize(msgin);
94 matchstart =
strlen(msg) - l;
111 if(msg == ear.message)
119 magicear_matched =
true;
123 savemessage = ear.message;
126 ear.message = savemessage;
133 else if(ear.netname !=
"")
136 return strreplace(s, ear.netname, msg);
149 string trigger_magicear_processmessage_forallears(
entity source,
float teamsay,
entity privatesay,
string msgin)
153 for(ear = magicears; ear; ear = ear.enemy)
155 msgout = trigger_magicear_processmessage(ear, source, teamsay, privatesay, msgin);
166 this.
enemy = magicears;
const int MAGICEAR_TUBA_EXACTPITCH
const int MAGICEAR_IGNORE_INVALIDTELL
void SUB_UseTargets(entity this, entity actor, entity trigger)
spawnfunc(info_player_attacker)
const int MAGICEAR_IGNORE_SAY
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
const int MAX_WEAPONSLOTS
const int MAGICEAR_REPLACE_WHOLE_MESSAGE
const int MAGICEAR_CONTINUE
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt()
entity weaponentities[MAX_WEAPONSLOTS]
const int MAGICEAR_IGNORE_TELL
const int MAGICEAR_REPLACE_OUTSIDE
const int MAGICEAR_NODECOLORIZE
const int MAGICEAR_IGNORE_TEAMSAY