if(self.crouch)
animbits |= ANIMSTATE_DUCK;
animdecide_setstate(self, animbits, false);
- animdecide_setimplicitstate(self, (self.flags & FL_ONGROUND));
+ animdecide_setimplicitstate(self, (IS_ONGROUND(self)));
}
void PlayerCorpseDamage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
self.solid = SOLID_CORPSE;
self.ballistics_density = autocvar_g_ballistics_density_corpse;
// don't stick to the floor
- self.flags &= ~FL_ONGROUND;
+ UNSET_ONGROUND(self);
// dying animation
self.deadflag = DEAD_DYING;
string msgstr, colorstr, cmsgstr, namestr, fullmsgstr, sourcemsgstr, fullcmsgstr, sourcecmsgstr, colorprefix;
float flood;
var .float flood_field;
- entity head;
float ret;
string privatemsgprefix = string_null; float privatemsgprefixlen = 0;
{
sprint(source, sourcemsgstr);
dedicated_print(msgstr); // send to server console too
- FOR_EACH_REALCLIENT(head)
- if(head != source)
- if(head.active_minigame == source.active_minigame)
- sprint(head, msgstr);
+ FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != source && it.active_minigame == source.active_minigame, LAMBDA(sprint(it, msgstr)));
}
else if(teamsay > 0) // team message, only sent to team mates
{
dedicated_print(msgstr); // send to server console too
if(sourcecmsgstr != "")
centerprint(source, sourcecmsgstr);
- FOR_EACH_REALPLAYER(head) if(head.team == source.team)
- if(head != source)
- {
- sprint(head, msgstr);
- if(cmsgstr != "")
- centerprint(head, cmsgstr);
- }
+ FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it) && it != source && it.team == source.team, LAMBDA(
+ sprint(it, msgstr);
+ if(cmsgstr != "")
+ centerprint(it, cmsgstr);
+ ));
}
else if(teamsay < 0) // spectator message, only sent to spectators
{
sprint(source, sourcemsgstr);
dedicated_print(msgstr); // send to server console too
- FOR_EACH_REALCLIENT(head) if (!IS_PLAYER(head))
- if(head != source)
- sprint(head, msgstr);
+ FOREACH_CLIENT(!IS_PLAYER(it) && IS_REAL_CLIENT(it) && it != source, LAMBDA(sprint(it, msgstr)));
}
else if(sourcemsgstr != msgstr) // trimmed/server fixed message, sent to all players
{
sprint(source, sourcemsgstr);
dedicated_print(msgstr); // send to server console too
- FOR_EACH_REALCLIENT(head)
- if(head != source)
- sprint(head, msgstr);
+ FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != source, LAMBDA(sprint(it, msgstr)));
}
else
bprint(msgstr); // entirely normal message, sent to all players -- bprint sends to server console too.