There is some difference between source code and actual binary.
Console log:
Code:
] lua_run PrintTable(physics)
> PrintTable(physics)...
SetAirDensity = function: 03807B90
GetPerformanceSettings = function: 03807B30
SetPerformanceSettings = function: 03807B48
GetGravity = function: 03807B78
SetGravity = function: 03807B60
GetAirDensity = function: 03807BA8
] lua_run PrintTable(_R["PhysEnv"])
> PrintTable(_R["PhysEnv"])...
includes\util.lua:35: bad argument #1 to 'pairs' (table expected, got nil)
(_R is table for metatables. _R["Entity"] is FindMetaTable("Entity"))
And C++ code:
Code:
// physics methods
phys->SetMember( "GetAirDensity", GetAirDensity );
phys->SetMember( "SetAirDensity", SetAirDensity );
phys->SetMember( "GetGravity", GetGravity );
phys->SetMember( "SetGravity", SetGravity );
phys->SetMember( "SetPerformanceSettings", SetPerformanceSettings );
phys->SetMember( "GetPerformanceSettings", GetPerformanceSettings );
phys->SetMember( "GetSimulationTimestep", GetSimulationTimestep );
phys->SetMember( "SetSimulationTimestep", SetSimulationTimestep );
phys->SetMember( "CreateEnvironment", CreateEnvironment );
//phys->SetMember( "DestroyEnvironment", DestroyEnvironment );
// phys environment
ILuaObject* PhysEnv = Lua()->GetMetaTable( "PhysEnv", TYPE_PHYSENV );
if( PhysEnv )
{
// __gc
PhysEnv->SetMember( "__gc", DestroyEnvironment );
}
Also there are no PhysObj functions TransferObject() and Scale().
I can't recompile it because Visual C++ Express 2008 gives a bunch of errors like this:
Code:
1>c:\hlsrc1\public\tier0\dbg.h(463) : error C2664: 'Msg' : cannot convert parameter 1 from 'const char [6]' to 'const tchar *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Can anyone recompile it and upload somewhere?