mirror of
https://github.com/bearstonem/openmohaa-vr.git
synced 2026-10-23 07:00:22 +02:00
Fixed floats being interpreted as integers sometimes
This commit is contained in:
1 file changed
-5
@@ -518,11 +518,6 @@ void ScriptCompiler::EmitField(sval_t listener_val, sval_t field_val, unsigned i
|
||||
|
||||
void ScriptCompiler::EmitFloat(float value, unsigned int sourcePos)
|
||||
{
|
||||
// ley0k: optimization
|
||||
if (value == (float)(int)value) {
|
||||
return EmitInteger((unsigned int)value, sourcePos);
|
||||
}
|
||||
|
||||
EmitOpcode(OP_STORE_FLOAT, sourcePos);
|
||||
|
||||
EmitOpcodeValue(value, sizeof(float));
|
||||
|
||||
Reference in new issue
Block a user