The hash change is due to meaningless differences in the logged total damage dealt by bots.
test_sv_game:
stage: test
script:
- - export EXPECT=14b3e3e34253d4b41325080e77317d58
+ - export EXPECT=d6d7e42bd894e2996fd58df286d0886b
- qcsrc/tools/sv_game-hashtest.sh
- exit $?
void PlayerFrame (entity this)
{
// formerly PreThink code
+
+ if (this.score_frame_dmg)
+ {
+ GameRules_scoring_add(this, DMG, this.score_frame_dmg);
+ this.score_frame_dmg = 0;
+ }
+ if (this.score_frame_dmgtaken)
+ {
+ GameRules_scoring_add(this, DMGTAKEN, this.score_frame_dmgtaken);
+ this.score_frame_dmgtaken = 0;
+ }
+
STAT(GUNALIGN, this) = CS_CVAR(this).cvar_cl_gunalign; // TODO
STAT(MOVEVARS_CL_TRACK_CANJUMP, this) = CS_CVAR(this).cvar_cl_movement_track_canjump;
if ((this != attacker || deathtype == DEATH_KILL.m_id) && realdmg && !STAT(FROZEN, this)
&& (!(round_handler_IsActive() && !round_handler_IsRoundStarted()) && time >= game_starttime))
{
+ // accumulate damage, it will be logged later in this frame
if (IS_PLAYER(attacker) && DIFF_TEAM(attacker, this) && deathtype != DEATH_KILL.m_id)
- GameRules_scoring_add(attacker, DMG, realdmg);
+ attacker.score_frame_dmg += realdmg;
if (IS_PLAYER(this))
- GameRules_scoring_add(this, DMGTAKEN, realdmg);
+ this.score_frame_dmgtaken += realdmg;
}
}
.float death_time;
+.float score_frame_dmg;
+.float score_frame_dmgtaken;
+
.float CopyBody_nextthink;
.void(entity this) CopyBody_think;
void CopyBody_Think(entity this);