nanoMMO 0.97.8
Building an MMO: The Engineering Series
Loading...
Searching...
No Matches
nanommo::Hits Class Reference

#include <measure.h>

Public Member Functions

void Add (double at, uint32_t amount)
 A hit that did the amount, at the time, in seconds on our clock.
float PerSecond (double now) const
 Over the last five seconds to now, as a swing takes about one.
float DamagePerSecond (double now) const

Detailed Description

The hits a player lands, and their damage, from the events the server sends: what a client that breaks the rules gets for it in a fight.

Definition at line 32 of file measure.h.

Member Function Documentation

◆ Add()

void nanommo::Hits::Add ( double at,
uint32_t amount )

A hit that did the amount, at the time, in seconds on our clock.

Definition at line 40 of file measure.cc.

◆ DamagePerSecond()

float nanommo::Hits::DamagePerSecond ( double now) const

Definition at line 55 of file measure.cc.

◆ PerSecond()

float nanommo::Hits::PerSecond ( double now) const

Over the last five seconds to now, as a swing takes about one.

Definition at line 47 of file measure.cc.


The documentation for this class was generated from the following files: