Add current, max and average velocity as stat (#912)
* Add current, max and average velocity as stat
This commit is contained in:
parent
07f8b7f61a
commit
554eb1c813
4 changed files with 19 additions and 0 deletions
|
|
@ -180,5 +180,9 @@ void P_Ticker (void)
|
|||
Level->maptime++;
|
||||
Level->totaltime++;
|
||||
}
|
||||
if (players[consoleplayer].mo != NULL) {
|
||||
if (players[consoleplayer].mo->Vel.Length() > primaryLevel->max_velocity) { primaryLevel->max_velocity = players[consoleplayer].mo->Vel.Length(); }
|
||||
primaryLevel->avg_velocity += (players[consoleplayer].mo->Vel.Length() - primaryLevel->avg_velocity) / primaryLevel->maptime;
|
||||
}
|
||||
StatusBar->CallTick(); // Status bar should tick AFTER the thinkers to properly reflect the level's state at this time.
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue