Adjusted D1 Lifter collision damage according to D2 to scale with FPS as Melee combats can happen in every frame; Actually set velocity from movement when colliding with objects
This commit is contained in:
parent
680a1527a7
commit
8c4d0f62df
|
@ -1,8 +1,13 @@
|
||||||
D2X-Rebirth Changelog
|
D2X-Rebirth Changelog
|
||||||
|
|
||||||
|
20090113
|
||||||
|
--------
|
||||||
|
main/physics.c: Actually set velocity from movement when colliding with objects
|
||||||
|
|
||||||
20090108
|
20090108
|
||||||
--------
|
--------
|
||||||
main/network.c: Fixed condition for protocol version checking when joining a game - must be allowed for both original and D2X version
|
main/network.c: Fixed condition for protocol version checking when joining a game - must be allowed for both original and D2X version
|
||||||
|
|
||||||
20081230
|
20081230
|
||||||
--------
|
--------
|
||||||
SConstruct: prefix is now an argument (useful for auto-builds)
|
SConstruct: prefix is now an argument (useful for auto-builds)
|
||||||
|
|
|
@ -745,7 +745,8 @@ void do_physics_sim(object *obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
// After collision with objects and walls, set velocity from actual movement
|
// After collision with objects and walls, set velocity from actual movement
|
||||||
if (!obj_stopped && !bounced && ((fate == HIT_WALL) || (fate == HIT_BAD_P0))) {
|
if (!obj_stopped && !bounced && ((fate == HIT_WALL) || (fate == HIT_OBJECT) || (fate == HIT_BAD_P0)))
|
||||||
|
{
|
||||||
vms_vector moved_vec;
|
vms_vector moved_vec;
|
||||||
vm_vec_sub(&moved_vec,&obj->pos,&start_pos);
|
vm_vec_sub(&moved_vec,&obj->pos,&start_pos);
|
||||||
vm_vec_copy_scale(&obj->mtype.phys_info.velocity,&moved_vec,fixdiv(f1_0,FrameTime));
|
vm_vec_copy_scale(&obj->mtype.phys_info.velocity,&moved_vec,fixdiv(f1_0,FrameTime));
|
||||||
|
@ -756,7 +757,7 @@ void do_physics_sim(object *obj)
|
||||||
and "bump" back by the value saying how far we are in already.
|
and "bump" back by the value saying how far we are in already.
|
||||||
*/
|
*/
|
||||||
if (
|
if (
|
||||||
obj==ConsoleObject && (obj->mtype.phys_info.velocity.x==0 && obj->mtype.phys_info.velocity.y==0 && obj->mtype.phys_info.velocity.z==0) &&
|
obj==ConsoleObject && fate == HIT_WALL && (obj->mtype.phys_info.velocity.x==0 && obj->mtype.phys_info.velocity.y==0 && obj->mtype.phys_info.velocity.z==0) &&
|
||||||
!(obj->mtype.phys_info.thrust.x==0 && obj->mtype.phys_info.thrust.y==0 && obj->mtype.phys_info.thrust.z==0))
|
!(obj->mtype.phys_info.thrust.x==0 && obj->mtype.phys_info.thrust.y==0 && obj->mtype.phys_info.thrust.z==0))
|
||||||
{
|
{
|
||||||
vms_vector center,bump_vec;
|
vms_vector center,bump_vec;
|
||||||
|
|
Loading…
Reference in a new issue