1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-19 03:05:29 +02:00

Properly use time_from_last_punch for limiting PvP punch damage

This commit is contained in:
Perttu Ahola
2011-12-04 14:43:01 +02:00
parent ceaf8edade
commit 4cc117ddf6
5 changed files with 21 additions and 7 deletions

View File

@@ -104,9 +104,9 @@ HittingProperties getHittingProperties(const MaterialProperties *mp,
time_from_last_punch);
// If digging time would be 1 second, 2 hearts go in 1 second.
s16 hp = 2.0 * 2.0 / digprop.time + 0.5;
s16 hp = 2.0 * 2.0 / digprop.time;
// Wear is the same as for digging a single node
s16 wear = (float)digprop.wear + 0.5;
s16 wear = (float)digprop.wear;
return HittingProperties(hp, wear);
}