mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
commit
98296d91ee
2 changed files with 14 additions and 11 deletions
|
|
@ -66,8 +66,9 @@ function on_sensor_enter(index, oid)
|
|||
local stack = item.stack_size(dropitem.id)
|
||||
local sum = dropitem.count + odrop.count
|
||||
if sum <= stack then
|
||||
dropitem.count = sum
|
||||
other:despawn()
|
||||
dropitem.count = 0
|
||||
odrop.count = sum
|
||||
entity:despawn()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -435,19 +435,21 @@ dv::value BasicParser<CharT>::parseNumber(int sign) {
|
|||
static_cast<int64_t>(std::log10(afterdot) + 1)
|
||||
)
|
||||
);
|
||||
c = source[pos];
|
||||
|
||||
double dvalue = (value + (afterdot / (double)expo));
|
||||
if (c == 'e' || c == 'E') {
|
||||
pos++;
|
||||
int s = 1;
|
||||
if (peek() == '-') {
|
||||
s = -1;
|
||||
pos++;
|
||||
} else if (peek() == '+') {
|
||||
if (hasNext()){
|
||||
c = source[pos];
|
||||
if (c == 'e' || c == 'E') {
|
||||
pos++;
|
||||
int s = 1;
|
||||
if (peek() == '-') {
|
||||
s = -1;
|
||||
pos++;
|
||||
} else if (peek() == '+') {
|
||||
pos++;
|
||||
}
|
||||
return sign * dvalue * power(10.0, s * parseSimpleInt(10));
|
||||
}
|
||||
return sign * dvalue * power(10.0, s * parseSimpleInt(10));
|
||||
}
|
||||
return sign * dvalue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue