self.origin_x = ReadShort();
self.origin_y = ReadShort();
self.origin_z = ReadShort();
+ setorigin(self, self.origin);
}
if(sf & 4)
{
casing.origin_x = ReadCoord();
casing.origin_y = ReadCoord();
casing.origin_z = ReadCoord();
+ setorigin(casing, casing.origin);
casing.velocity = decompressShortVector(ReadShort());
casing.angles_x = ReadByte() * 360 / 256;
casing.angles_y = ReadByte() * 360 / 256;
org = trace_endpos;
}
- gib.move_origin = gib.origin = org;
+ gib.move_origin = org;
+ setorigin(gib, org);
gib.move_velocity = vconst * autocvar_cl_gibs_velocity_scale + vrand * autocvar_cl_gibs_velocity_random + '0 0 1' * autocvar_cl_gibs_velocity_up;
gib.move_avelocity = prandomvec() * vlen(gib.move_velocity) * autocvar_cl_gibs_avelocity_scale;
gib.move_time = time;
if(amount <= 0 || !isNew)
return;
- self.origin = org; // for the sounds
+ setorigin(self, org); // for the sounds
specnum = (type & 0x78) / 8; // blood/gibmodel type: using four bits (0..7, bit indexes 3,4,5)
issilent = (type & 0x40);
self.origin_x = ReadCoord();
self.origin_y = ReadCoord();
self.origin_z = ReadCoord();
+ setorigin(self, self.origin);
}
if(f & 8)
{
void ModelEffect_Draw()
{
self.angles = self.angles + frametime * self.avelocity;
- self.origin = self.origin + frametime * self.velocity;
+ setorigin(self, self.origin + frametime * self.velocity);
self.scale = self.scale1 + (self.scale2 - self.scale1) * (time - self.teleport_time) / (self.lifetime + self.fadetime - self.teleport_time);
self.alpha = self.cnt * bound(0, 1 - (time - self.lifetime) / self.fadetime, 1);
if(self.alpha < ALPHA_MIN_VISIBLE)
e.origin_x = ReadCoord();
e.origin_y = ReadCoord();
e.origin_z = ReadCoord();
+ setorigin(e, e.origin);
if(f & 1)
{
e.velocity_x = ReadCoord();
}
if(self.noise != "")
{
- self.origin = p;
+ setorigin(self, p);
sound(self, CH_AMBIENT, self.noise, VOL_BASE * self.volume, self.atten);
}
self.just_toggled = 0;
--i;
}
}
- self.origin = o;
+ setorigin(self, o);
}
void Ent_PointParticles_Remove()
self.origin_x = ReadCoord();
self.origin_y = ReadCoord();
self.origin_z = ReadCoord();
+ setorigin(self, self.origin);
if(self.count & 0x80)
{
self.velocity_x = ReadCoord();
default:
break;
}
+ setsize(self, self.mins, self.maxs);
}
if(self.gravity)
e.sameteam = 0;
}
- e.origin = getplayerorigin(i);
+ setorigin(e, getplayerorigin(i));
if(e.origin == GETPLAYERORIGIN_ERROR)
continue;
self.origin_x = ReadCoord();
self.origin_y = ReadCoord();
self.origin_z = ReadCoord();
+ setorigin(self, self.origin);
}
if(sendflags & 2)
gib.gravity = 1;
gib.move_movetype = MOVETYPE_BOUNCE;
- gib.move_origin = gib.origin = _from;
+ gib.move_origin = _from;
+ setorigin(gib, _from);
gib.move_velocity = _to;
gib.move_avelocity = prandomvec() * 32;
gib.move_time = time;
self.origin_x = ReadCoord();
self.origin_y = ReadCoord();
self.origin_z = ReadCoord();
+ setorigin(self, self.origin);
self.angles_x = ReadAngle();
self.angles_y = ReadAngle();
self.origin_x = ReadCoord();
self.origin_y = ReadCoord();
self.origin_z = ReadCoord();
+ setorigin(self, self.origin);
}
if(f & 4)
}
else
self.mins = self.maxs = '0 0 0';
+ setsize(self, self.mins, self.maxs);
if(self.bgmscript)
strunzone(self.bgmscript);
self.origin_x = ReadCoord();
self.origin_y = ReadCoord();
self.origin_z = ReadCoord();
+ setorigin(self, self.origin);
}
if(sendflags & 1)
return;
s = db_get(_MapInfo_Cache_DB_NameToIndex, MapInfo_Map_bspname);
- if(s != "")
+ if(s == "")
{
i = buf_getsize(_MapInfo_Cache_Buf_IndexToMapData);
db_put(_MapInfo_Cache_DB_NameToIndex, MapInfo_Map_bspname, ftos(i));
}
void InterpolateOrigin_Undo()
{
- self.origin = self.iorigin2;
+ setorigin(self, self.iorigin2);
if(self.iflags & IFLAG_ANGLES)
self.angles = fixedvectoangles2(self.iforward2, self.iup2);
if(self.iflags & IFLAG_VELOCITY)
if(substring(readfile, 0, 1) == "#")
continue;
tokens = tokenizebyseparator(readfile, "\t");
+ if(tokens == 0)
+ continue;
s = argv(0);
prio = 1;
FOR_EACH_CLIENT(p)
p.playerstats_id = string_null;
}
+.float visual_rank;
void PlayerStats_EndMatch(float finished)
{
- entity p, winner;
- winner = PlayerScore_Sort(score_dummyfield, 0);
+ entity p;
+ PlayerScore_Sort(score_dummyfield, 0);
+ PlayerScore_Sort(visual_rank, 1);
FOR_EACH_CLIENT(p) // spectators intentionally not included
{
//PlayerStats_Accuracy(p); // stats are already written with PlayerStats_AddGlobalInfo(entity), don't double them up.
PlayerStats_Event(p, PLAYERSTATS_WINS, p.winning);
PlayerStats_Event(p, PLAYERSTATS_MATCHES, 1);
PlayerStats_Event(p, PLAYERSTATS_RANK, p.score_dummyfield);
+ PlayerStats_Event(p, PLAYERSTATS_VISUAL_RANK, p.visual_rank);
}
}
}
string PLAYERSTATS_JOINS = "joins";
string PLAYERSTATS_SCOREBOARD_VALID = "scoreboardvalid";
string PLAYERSTATS_RANK = "rank";
+string PLAYERSTATS_VISUAL_RANK = "visual-rank";
string PLAYERSTATS_TOTAL = "total-";
string PLAYERSTATS_SCOREBOARD = "scoreboard-";
if(!plast || PlayerTeamScore_Compare(plast, pbest, 0))
j = i;
- pbest.field = ++i;
+ pbest.field = j;
if not(pfirst)
pfirst = pbest;
{
self.dmgtime = time + autocvar_g_balance_contents_damagerate;
- if (!projectile)
+ if (projectile)
+ {
+ if (self.watertype == CONTENT_LAVA)
+ {
+ Damage (self, world, world, autocvar_g_balance_contents_projectiledamage * autocvar_g_balance_contents_damagerate * self.waterlevel, DEATH_LAVA, self.origin, '0 0 0');
+ }
+ else if (self.watertype == CONTENT_SLIME)
+ {
+ Damage (self, world, world, autocvar_g_balance_contents_projectiledamage * autocvar_g_balance_contents_damagerate * self.waterlevel, DEATH_SLIME, self.origin, '0 0 0');
+ }
+ }
+ else
{
if (self.watertype == CONTENT_LAVA)
{
Damage (self, world, world, autocvar_g_balance_contents_playerdamage_slime * autocvar_g_balance_contents_damagerate * self.waterlevel, DEATH_SLIME, self.origin, '0 0 0');
}
}
- else if ((self.watertype == CONTENT_LAVA) || (self.watertype == CONTENT_SLIME))
- {
- Damage (self, world, world, autocvar_g_balance_contents_projectiledamage * autocvar_g_balance_contents_damagerate * self.waterlevel, DEATH_SLIME, self.origin, '0 0 0');
- }
}
}
else