vbot = (clienttype(self) == CLIENTTYPE_BOT);
valid_damage_for_weaponstats = 0;
+ awep = 0;
+
if(vbot || clienttype(self) == CLIENTTYPE_REAL)
if(abot || clienttype(attacker) == CLIENTTYPE_REAL)
if(attacker && self != attacker)
awep = DEATH_WEAPONOF(deathtype);
valid_damage_for_weaponstats = 1;
}
- else
- awep = 0;
if(valid_damage_for_weaponstats)
{
// 0 = reject
// -1 = fake accept
{
- string msgstr, colorstr, cmsgstr, namestr, fullmsgstr, sourcemsgstr, fullcmsgstr, sourcecmsgstr, privatemsgprefix;
- float flood, privatemsgprefixlen;
+ string msgstr, colorstr, cmsgstr, namestr, fullmsgstr, sourcemsgstr, fullcmsgstr, sourcecmsgstr;
+ float flood;
var .float flood_field;
entity head;
float ret;
+ string privatemsgprefix = string_null; float privatemsgprefixlen = 0;
if(!teamsay && !privatesay)
if(substring(msgin, 0, 1) == " ")
// x = 0..1 relative to hitbox; y = 0..1 relative to hitbox; z = distance
+ mi = ma = targ.origin + 0.5 * (targ.mins + targ.maxs);
for(i = 0; i < 2; ++i) for(j = 0; j < 2; ++j) for(k = 0; k < 2; ++k)
{
thisv = targ.origin;
attacker.taunt_soundtime = time + 1;
- // TODO: fix this?
- if (deathtype == DEATH_CUSTOM)
+ if (deathtype == DEATH_HURTTRIGGER && inflictor.message2 != "")
+ msg = inflictor.message2;
+ else if (deathtype == DEATH_CUSTOM)
msg = deathmessage;
else
- msg = inflictor.message2;
+ msg = "";
if(strstrofs(msg, "%", 0) < 0)
msg = strcat("%s ", msg, " by %s");
msg = inflictor.message;
else if (deathtype == DEATH_CUSTOM)
msg = deathmessage;
+ else
+ msg = "";
if(strstrofs(msg, "%", 0) < 0)
msg = strcat("%s ", msg);
else if(team1_score + team2_score + team3_score + team4_score == 1)
{
float t, i;
- if(team1_score) t = COLOR_TEAM1;
- if(team2_score) t = COLOR_TEAM2;
- if(team3_score) t = COLOR_TEAM3;
- if(team4_score) t = COLOR_TEAM4;
+ if(team1_score)
+ t = COLOR_TEAM1;
+ else if(team2_score)
+ t = COLOR_TEAM2;
+ else if(team3_score)
+ t = COLOR_TEAM3;
+ else // if(team4_score)
+ t = COLOR_TEAM4;
CheckAllowedTeams(world);
for(i = 0; i < MAX_TEAMSCORE; ++i)
{
org = world.mins;
delta = world.maxs - world.mins;
- start = org;
+ start = end = org;
for (i = 0; i < attempts; ++i)
{
p.velocity = WarpZone_RefSys_TransformVelocity(e, p, avg_velocity);
UpdateCSQCProjectile(p);
}
+ targ_origin = avg_origin + 1000000000 * normalize(avg_velocity); // HUUUUUUGE
}
else
{
shots = autocvar_g_balance_crylink_primary_shots;
pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots);
- proj = world;
- while (counter < shots)
+ proj = prevproj = firstproj = world;
+ for(counter = 0; counter < shots; ++counter)
{
proj = spawn ();
proj.reset = W_Crylink_Reset;
CSQCProjectile(proj, TRUE, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), TRUE);
other = proj; MUTATOR_CALLHOOK(EditProjectile);
-
- counter = counter + 1;
}
if(autocvar_g_balance_crylink_primary_joinspread != 0 || autocvar_g_balance_crylink_primary_jointime != 0)
{
shots = autocvar_g_balance_crylink_secondary_shots;
pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots);
- proj = world;
- while (counter < shots)
+ proj = prevproj = firstproj = world;
+ for(counter = 0; counter < shots; ++counter)
{
proj = spawn ();
proj.reset = W_Crylink_Reset;
CSQCProjectile(proj, TRUE, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), TRUE);
other = proj; MUTATOR_CALLHOOK(EditProjectile);
-
- counter = counter + 1;
}
if(autocvar_g_balance_crylink_secondary_joinspread != 0 || autocvar_g_balance_crylink_secondary_jointime != 0)
{
shots = self.hagar_load;
missile = world;
- while (counter < shots)
+ for(counter = 0; counter < shots; ++counter)
{
missile = spawn ();
missile.owner = missile.realowner = self;
CSQCProjectile(missile, TRUE, PROJECTILE_HAGAR, TRUE);
other = missile; MUTATOR_CALLHOOK(EditProjectile);
-
- counter = counter + 1;
}
weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_hagar_secondary_load_animtime, w_ready);
float W_Mine_Count(entity e)
{
- float minecount;
+ float minecount = 0;
entity mine;
for(mine = world; (mine = find(mine, classname, "mine")); ) if(mine.realowner == e)
minecount += 1;
float W_PlacedMines(float detonate)
{
entity mine;
- float minfound;
+ float minfound = 0;
for(mine = world; (mine = find(mine, classname, "mine")); ) if(mine.realowner == self)
{
o0 = e.origin;
v0 = e.velocity;
+ g = cvar("sv_gravity") * e.gravity;
WarpZone_trace_forent = forent;
WarpZone_trace_firstzone = world;
e.velocity = WarpZone_TransformVelocity(wz, e.velocity);
}
WarpZone_MakeAllSolid();
- g = cvar("sv_gravity") * e.gravity;
i = 16;
for(;;)
{
float WarpZone_Camera_Send(entity to, float sendflags)
{
- float f;
+ float f = 0;
WriteByte(MSG_ENTITY, ENT_CLIENT_WARPZONE_CAMERA);
if(self.warpzone_fadestart)