diff options
author | Perttu Ahola <celeron55@gmail.com> | 2010-12-24 11:44:26 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2010-12-24 11:44:26 +0200 |
commit | 705de63dcdfe78157234e1b65652d5c2f762dbd4 (patch) | |
tree | 6aeac4160d1034e7f8cf9daa4232a741c367774d /src/main.cpp | |
parent | 1611f00865031e5187bd9b51d2b2e9f8307af62e (diff) | |
download | minetest-705de63dcdfe78157234e1b65652d5c2f762dbd4.tar.xz |
ProgressBarTextureMod
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index ac91b9d3d..df335ad39 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -177,7 +177,8 @@ TODO: Check if the usage of Client::isFetchingBlocks() in Doing now:
======================================================================
-TODO: Tool capability table
+TODO: Tool capability table: Which materials, at what speed, how much
+ wearing
TODO: Transferring of the table from server to client
======================================================================
@@ -2122,9 +2123,21 @@ int main(int argc, char *argv[]) }
}
}
+ else if(n.d == CONTENT_TORCH)
+ {
+ dig_time_complete = 0.0;
+ }
- dig_index = (u16)((float)CRACK_ANIMATION_LENGTH
- * dig_time/dig_time_complete);
+ if(dig_time_complete >= 0.001)
+ {
+ dig_index = (u16)((float)CRACK_ANIMATION_LENGTH
+ * dig_time/dig_time_complete);
+ }
+ // This is for torches
+ else
+ {
+ dig_index = CRACK_ANIMATION_LENGTH;
+ }
if(dig_index < CRACK_ANIMATION_LENGTH)
{
@@ -2142,6 +2155,19 @@ int main(int argc, char *argv[]) nodig_delay_counter = dig_time_complete
/ (float)CRACK_ANIMATION_LENGTH;
+
+ // We don't want a corresponding delay to
+ // very time consuming nodes
+ if(nodig_delay_counter > 0.5)
+ {
+ nodig_delay_counter = 0.5;
+ }
+ // We want a slight delay to very little
+ // time consuming nodes
+ if(nodig_delay_counter < 0.15)
+ {
+ nodig_delay_counter = 0.15;
+ }
}
dig_time += dtime;
|