prop_vehicle_driveable: change dmg and velocity calculation for when you collide with an object that feels pain.
This commit is contained in:
parent
c4c84dbdf3
commit
4d33098716
2 changed files with 4 additions and 5 deletions
|
@ -400,15 +400,16 @@ prop_vehicle_driveable_wheel::Accel(float flMoveTime, float m_flTurn)
|
|||
|
||||
tracebox(origin, mins * 4.0, maxs * 4.0, origin, MOVE_NORMAL, owner);
|
||||
if (trace_ent && trace_ent != vehParent.m_eDriver) {
|
||||
int iImpactDamage = vlen(velocity) / 100;
|
||||
int iImpactDamage = vlen(velocity) / 10;
|
||||
|
||||
if (iImpactDamage > 10) {
|
||||
trace_ent.velocity = velocity;
|
||||
trace_ent.velocity = velocity * 2.0 + [0,0,500];
|
||||
velocity *= 0.25f;
|
||||
#ifdef SERVER
|
||||
if (trace_ent.takedamage) {
|
||||
NSSurfacePropEntity foo = (NSSurfacePropEntity)trace_ent;
|
||||
Damage_Apply(foo, vehParent.m_eDriver, iImpactDamage, 0, DMG_VEHICLE);
|
||||
print(sprintf("Delivering %i impact damage\n", iImpactDamage));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ This entity was introduced in Quake (1996).
|
|||
|
||||
#ifdef CLIENT
|
||||
/* High Dynamic Range - Iris Adaption */
|
||||
var float g_flHDRIrisMinValue = 0.0;
|
||||
var float g_flHDRIrisMinValue = 1.0;
|
||||
var float g_flHDRIrisMaxValue = 2.0;
|
||||
var float g_flHDRIrisMultiplier = 1.0;
|
||||
var float g_flHDRIrisFadeUp = 0.1;
|
||||
|
@ -74,8 +74,6 @@ worldspawn::Initialized(void)
|
|||
cvar_set("r_hdr_irisadaptation_multiplier", ftos(g_flHDRIrisMultiplier));
|
||||
cvar_set("r_hdr_irisadaptation_fade_up", ftos(g_flHDRIrisFadeUp));
|
||||
cvar_set("r_hdr_irisadaptation_fade_down", ftos(g_flHDRIrisFadeDown));
|
||||
|
||||
remove(this);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue