|
@@ -641,8 +641,14 @@ bool SQVM::CLASS_OP(SQObjectPtr &target,SQInteger baseclass,SQInteger attributes
|
|
|
|
|
|
|
|
bool SQVM::IsEqual(const SQObjectPtr &o1,const SQObjectPtr &o2,bool &res)
|
|
bool SQVM::IsEqual(const SQObjectPtr &o1,const SQObjectPtr &o2,bool &res)
|
|
|
{
|
|
{
|
|
|
- if(sq_type(o1) == sq_type(o2)) {
|
|
|
|
|
- res = (_rawval(o1) == _rawval(o2));
|
|
|
|
|
|
|
+ SQObjectType t1 = sq_type(o1), t2 = sq_type(o2);
|
|
|
|
|
+ if(t1 == t2) {
|
|
|
|
|
+ if (t1 == OT_FLOAT) {
|
|
|
|
|
+ res = (_float(o1) == _float(o2));
|
|
|
|
|
+ }
|
|
|
|
|
+ else {
|
|
|
|
|
+ res = (_rawval(o1) == _rawval(o2));
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
|
if(sq_isnumeric(o1) && sq_isnumeric(o2)) {
|
|
if(sq_isnumeric(o1) && sq_isnumeric(o2)) {
|