mergebuf = (loadmodel->brushq3.deluxemapping && (i & 1)) ? mergeddeluxepixels : mergedpixels;
mergebuf += 4 * (realindex & (mergedcolumns-1))*size + 4 * ((realindex >> powerx) & (mergedrows-1))*mergedwidth*size;
if ((i & 1) == 0 || !loadmodel->brushq3.deluxemapping)
- Con_Printf("copying original lightmap %i (%ix%i) to %i (at %i,%i)\n", i, size, size, lightmapindex, (realindex & (mergedcolumns-1))*size, ((realindex >> powerx) & (mergedrows-1))*size);
+ Con_DPrintf("copying original lightmap %i (%ix%i) to %i (at %i,%i)\n", i, size, size, lightmapindex, (realindex & (mergedcolumns-1))*size, ((realindex >> powerx) & (mergedrows-1))*size);
// convert pixels from RGB or BGRA while copying them into the destination rectangle
for (j = 0;j < size;j++)
#define SOLID_PHYSICS_BOX 32 ///< physics object (mins, maxs, mass, origin, axis_forward, axis_left, axis_up, velocity, spinvelocity)
#define SOLID_PHYSICS_SPHERE 33 ///< physics object (mins, maxs, mass, origin, axis_forward, axis_left, axis_up, velocity, spinvelocity)
#define SOLID_PHYSICS_CAPSULE 34 ///< physics object (mins, maxs, mass, origin, axis_forward, axis_left, axis_up, velocity, spinvelocity)
+#define SOLID_PHYSICS_TRIMESH 35 ///< physics object (mins, maxs, mass, origin, axis_forward, axis_left, axis_up, velocity, spinvelocity)
// edict->deadflag values
#define DEAD_NO 0
cvar_t physics_ode_world_damping_linear_threshold = {0, "physics_ode_world_damping_linear_threshold", "0.01", "world linear damping threshold (see ODE User Guide); use defaults when set to -1"};
cvar_t physics_ode_world_damping_angular = {0, "physics_ode_world_damping_angular", "0.005", "world angular damping scale (see ODE User Guide); use defaults when set to -1"};
cvar_t physics_ode_world_damping_angular_threshold = {0, "physics_ode_world_damping_angular_threshold", "0.01", "world angular damping threshold (see ODE User Guide); use defaults when set to -1"};
+cvar_t physics_ode_world_gravitymod = {0, "physics_ode_world_gravitymod", "1", "multiplies gravity got from sv_gravity, this may be needed to tweak if strong damping is used"};
cvar_t physics_ode_iterationsperframe = {0, "physics_ode_iterationsperframe", "1", "divisor for time step, runs multiple physics steps per frame"};
cvar_t physics_ode_constantstep = {0, "physics_ode_constantstep", "1", "use constant step (sys_ticrate value) instead of variable step which tends to increase stability"};
cvar_t physics_ode_autodisable = {0, "physics_ode_autodisable", "1", "automatic disabling of objects which dont move for long period of time, makes object stacking a lot faster"};
Cvar_RegisterVariable(&physics_ode_world_damping_linear_threshold);
Cvar_RegisterVariable(&physics_ode_world_damping_angular);
Cvar_RegisterVariable(&physics_ode_world_damping_angular_threshold);
+ Cvar_RegisterVariable(&physics_ode_world_gravitymod);
Cvar_RegisterVariable(&physics_ode_iterationsperframe);
Cvar_RegisterVariable(&physics_ode_constantstep);
Cvar_RegisterVariable(&physics_ode_movelimit);
switch(solid)
{
case SOLID_BSP:
+ case SOLID_PHYSICS_TRIMESH:
modelindex = (int)PRVM_gameedictfloat(ed, modelindex);
if (world == &sv.world)
model = SV_GetModelByIndex(modelindex);
switch(solid)
{
case SOLID_BSP:
+ case SOLID_PHYSICS_TRIMESH:
ed->priv.server->ode_offsetmatrix = identitymatrix;
if (!model)
{
for (i = 0;i < world->physics.ode_iterations;i++)
{
// set the gravity
- dWorldSetGravity((dWorldID)world->physics.ode_world, 0, 0, -gravity);
+ dWorldSetGravity((dWorldID)world->physics.ode_world, 0, 0, -gravity * physics_ode_world_gravitymod.value);
// set the tolerance for closeness of objects
dWorldSetContactSurfaceLayer((dWorldID)world->physics.ode_world, max(0, physics_ode_contactsurfacelayer.value));