tagged with // chx
I have done this so far:
- Code: Select all
struct objectparams_t
{
Vector *massCenterOverride;
int magnet; //chx
float mass;
float inertia;
float damping;
float rotdamping;
float rotInertiaLimit;
const char *pName; // used only for debugging
void *pGameData;
float volume;
float dragCoefficient;
bool enableCollisions;
};
- Code: Select all
const objectparams_t g_PhysDefaultObjectParams =
{
NULL,
0, // chx - magnet
1.0, //mass
1.0, // inertia
0.1f, // damping
0.1f, // rotdamping
0.05f, // rotIntertiaLimit
"DEFAULT",
NULL,// game data
0.f, // volume (leave 0 if you don't have one or call physcollision->CollideVolume() to compute it)
1.0f, // drag coefficient
true,// enable collisions?
};
Which create the params and their default values.
(Also added the getters and setters:)
virtual void SetMagnet( int magnet ) = 0;
virtual int GetMagnet( void ) const = 0;
Now, this is all I added. It builds fine.
When you load the level, I think it calls these but then overrides the values based on a script/code. The game then crashes.
Does anyone have any insight into this shiz?