From: vortex Date: Wed, 9 Nov 2011 00:37:52 +0000 (+0000) Subject: DDS with DXT1a: was not correctly detected if r_texture_dds_load_alphamod == 0 (it... X-Git-Tag: xonotic-v0.6.0~167 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3ba30f3b2a8de0f30de76d6ff511ad575fd6eac6;p=xonotic%2Fdarkplaces.git DDS with DXT1a: was not correctly detected if r_texture_dds_load_alphamod == 0 (it does not really check for DDPF_ALPHAPIXELS), fixing. ODE: physics_ode_constantstep now can be fractional, in this case ODE will run at this tickrate instead of using sys_ticrate, so ODE run at different framerate than server (may be useful for high values, such like running ODE at 100 fps and server at 40fps). git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11541 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=776e54e8acfdf32471b292143d3be2a541e1867b --- diff --git a/gl_textures.c b/gl_textures.c index c9714ef2..c51713b3 100644 --- a/gl_textures.c +++ b/gl_textures.c @@ -2121,9 +2121,9 @@ rtexture_t *R_LoadTextureDDSFile(rtexturepool_t *rtexturepool, const char *filen Con_Printf("^1%s: invalid DXT1 DDS image\n", filename); return NULL; } - if(r_texture_dds_load_alphamode.integer && (flags & TEXF_ALPHA)) + if (flags & TEXF_ALPHA) { - if(r_texture_dds_load_alphamode.integer == 1) + if (r_texture_dds_load_alphamode.integer == 1) { // check alpha for (i = 0;i < size;i += bytesperblock) @@ -2140,6 +2140,8 @@ rtexture_t *R_LoadTextureDDSFile(rtexturepool_t *rtexturepool, const char *filen else flags &= ~TEXF_ALPHA; } + else if (r_texture_dds_load_alphamode.integer == 0) + textype = TEXTYPE_DXT1A; else { flags &= ~TEXF_ALPHA; diff --git a/world.c b/world.c index c8e47ccd..27351c89 100644 --- a/world.c +++ b/world.c @@ -346,7 +346,7 @@ cvar_t physics_ode_world_damping_angular = {0, "physics_ode_world_damping_angula 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_constantstep = {0, "physics_ode_constantstep", "1", "use constant step instead of variable step which tends to increase stability, if set to 1 uses sys_ticrate, instead uses it's own value"}; 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_t physics_ode_autodisable_steps = {0, "physics_ode_autodisable_steps", "10", "how many steps object should be dormant to be autodisabled"}; cvar_t physics_ode_autodisable_time = {0, "physics_ode_autodisable_time", "0", "how many seconds object should be dormant to be autodisabled"}; @@ -2631,8 +2631,10 @@ void World_Physics_Frame(world_t *world, double frametime, double gravity) prvm_edict_t *ed; world->physics.ode_iterations = bound(1, physics_ode_iterationsperframe.integer, 1000); - if (physics_ode_constantstep.integer) - world->physics.ode_step = sys_ticrate.value / world->physics.ode_iterations; + if (physics_ode_constantstep.integer > 0 && physics_ode_constantstep.integer < 1) + world->physics.ode_step = physics_ode_constantstep.integer / world->physics.ode_iterations; + else if (physics_ode_constantstep.integer) + world->physics.ode_step = sys_ticrate.integer / world->physics.ode_iterations; else world->physics.ode_step = frametime / world->physics.ode_iterations; world->physics.ode_movelimit = physics_ode_movelimit.value / world->physics.ode_step;