fixed bool_masked (#2708)
This commit is contained in:
parent
1a0fbd3dea
commit
ec7735cb3a
@ -66,7 +66,7 @@ namespace lua::stats
|
|||||||
static bool get_bool_masked_hash(Hash stat_hash, int bit_index)
|
static bool get_bool_masked_hash(Hash stat_hash, int bit_index)
|
||||||
{
|
{
|
||||||
int out_value;
|
int out_value;
|
||||||
constexpr int bit_count = 8;
|
constexpr int bit_count = 1;
|
||||||
STATS::STAT_GET_MASKED_INT(stat_hash, &out_value, bit_index, bit_count, -1);
|
STATS::STAT_GET_MASKED_INT(stat_hash, &out_value, bit_index, bit_count, -1);
|
||||||
|
|
||||||
return out_value;
|
return out_value;
|
||||||
@ -187,7 +187,7 @@ namespace lua::stats
|
|||||||
// Returns: boolean: True if succeeded.
|
// Returns: boolean: True if succeeded.
|
||||||
static bool set_bool_masked_hash(Hash stat_hash, bool new_value, int bit_index)
|
static bool set_bool_masked_hash(Hash stat_hash, bool new_value, int bit_index)
|
||||||
{
|
{
|
||||||
constexpr int bit_count = 8;
|
constexpr int bit_count = 1;
|
||||||
return STATS::STAT_SET_MASKED_INT(stat_hash, new_value, bit_index, bit_count, true);
|
return STATS::STAT_SET_MASKED_INT(stat_hash, new_value, bit_index, bit_count, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -335,4 +335,4 @@ namespace lua::stats
|
|||||||
ns["set_packed_stat_bool"] = set_packed_stat_bool;
|
ns["set_packed_stat_bool"] = set_packed_stat_bool;
|
||||||
ns["set_packed_stat_int"] = set_packed_stat_int;
|
ns["set_packed_stat_int"] = set_packed_stat_int;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user