func_physbox and prop_physics now respect the 'start asleep' spawnflags
they have.
This commit is contained in:
parent
1716e740cf
commit
d41c770393
3 changed files with 27 additions and 14 deletions
|
@ -87,19 +87,18 @@ varying mat3 invsurface;
|
|||
#else
|
||||
lightmaps = texture2D(s_lightmap, lm0).rgb * e_lmscale.rgb;
|
||||
#endif
|
||||
if (gl_ldr == 1.0) {
|
||||
#if gl_ldr==1
|
||||
if (lightmaps.r > 1.5)
|
||||
lightmaps.r = 1.5f;
|
||||
if (lightmaps.g > 1.5)
|
||||
lightmaps.g = 1.5f;
|
||||
if (lightmaps.b > 1.5)
|
||||
lightmaps.b = 1.5f;
|
||||
|
||||
if (lightmaps.r > 1.5)
|
||||
lightmaps.r = 1.5f;
|
||||
if (lightmaps.g > 1.5)
|
||||
lightmaps.g = 1.5f;
|
||||
if (lightmaps.b > 1.5)
|
||||
lightmaps.b = 1.5f;
|
||||
|
||||
lightmaps.rgb * 0.5f;
|
||||
lightmaps.rgb = floor(lightmaps.rgb * vec3(32,64,32))/vec3(32,64,32);
|
||||
lightmaps.rgb * 2.0f;
|
||||
}
|
||||
lightmaps.rgb * 0.5f;
|
||||
lightmaps.rgb = floor(lightmaps.rgb * vec3(32,64,32))/vec3(32,64,32);
|
||||
lightmaps.rgb * 2.0f;
|
||||
#endif
|
||||
|
||||
return lightmaps;
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/*QUAKED func_physbox (0 .5 .8) ?
|
||||
/*QUAKED func_physbox (0 .5 .8) ? x x x x x x x x x x x x FNCPHYBX_ASLEEP
|
||||
Physics brush.
|
||||
|
||||
-------- KEYS --------
|
||||
|
@ -24,6 +24,8 @@ Physics brush.
|
|||
This entity was introduced in Half-Life 2 (2004).
|
||||
*/
|
||||
|
||||
#define FNCPHYBX_ASLEEP 4096
|
||||
|
||||
class func_physbox:NSPhysicsEntity
|
||||
{
|
||||
void(void) func_physbox;
|
||||
|
@ -34,6 +36,11 @@ void
|
|||
func_physbox::Respawn(void)
|
||||
{
|
||||
NSPhysicsEntity::Respawn();
|
||||
|
||||
if (spawnflags & FNCPHYBX_ASLEEP)
|
||||
PhysicsDisable();
|
||||
else
|
||||
PhysicsEnable();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/*QUAKED prop_physics (0 0 0.8) (-16 -16 -16) (16 16 16)
|
||||
/*QUAKED prop_physics (0 0 0.8) (-16 -16 -16) (16 16 16) PRPPHYS_ASLEEP
|
||||
Physics model
|
||||
|
||||
-------- KEYS --------
|
||||
|
@ -24,6 +24,8 @@ Physics model
|
|||
This entity was introduced in Half-Life 2 (2004).
|
||||
*/
|
||||
|
||||
#define PRPPHYS_ASLEEP 1
|
||||
|
||||
class prop_physics:NSPhysicsEntity
|
||||
{
|
||||
void(void) prop_physics;
|
||||
|
@ -34,6 +36,11 @@ void
|
|||
prop_physics::Respawn(void)
|
||||
{
|
||||
NSPhysicsEntity::Respawn();
|
||||
|
||||
if (spawnflags & PRPPHYS_ASLEEP)
|
||||
PhysicsDisable();
|
||||
else
|
||||
PhysicsEnable();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue