OSDN Git Service
(root)
/
hengbandforosx
/
hengbandosx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8447497
)
[Fix] #2577 松明の燃料残量が異様に大きな数値になる
author
Habu
<habu1010+github@gmail.com>
Tue, 13 Sep 2022 08:38:18 +0000
(17:38 +0900)
committer
Habu
<habu1010+github@gmail.com>
Tue, 13 Sep 2022 08:38:18 +0000
(17:38 +0900)
松明を投げつけた時に燃料残量を減らす処理で負の値になってもそのままにしているのが原因。
負の値になったときは強制的に 0 にするよう修正する。
src/specific-object/torch.cpp
patch
|
blob
|
history
diff --git
a/src/specific-object/torch.cpp
b/src/specific-object/torch.cpp
index
5920661
..
22968e7
100644
(file)
--- a/
src/specific-object/torch.cpp
+++ b/
src/specific-object/torch.cpp
@@
-76,6
+76,9
@@
void torch_lost_fuel(ObjectType *o_ptr)
}
o_ptr->fuel -= FUEL_TORCH / 25;
+ if (o_ptr->fuel < 0) {
+ o_ptr->fuel = 0;
+ }
}
/*!