Fix bug in disallowedDockingCollides (SVN5698)

This commit is contained in:
cim 2013-09-12 22:44:34 +01:00
parent daa0e54b70
commit 94178d5bbd

View File

@ -708,11 +708,14 @@ MA 02110-1301, USA.
{
if ([ship status] != STATUS_LAUNCHING && !allow_docking_thisship)
{ // launch-only dock: will collide!
[ship takeScrapeDamage: 5 * [UNIVERSE getTimeDelta]*[ship flightSpeed] from:station];
// and bounce
HPVector rel = HPvector_subtract([ship position],port_pos);
rel = HPvector_multiply_scalar(HPvector_normal(rel),[ship flightSpeed]*0.4);
[ship adjustVelocity:HPVectorToVector(rel)];
if (arbb.min.z < dd)
{
[ship takeScrapeDamage: 5 * [UNIVERSE getTimeDelta]*[ship flightSpeed] from:station];
// and bounce
HPVector rel = HPvector_subtract([ship position],port_pos);
rel = HPvector_multiply_scalar(HPvector_normal(rel),[ship flightSpeed]*0.4);
[ship adjustVelocity:HPVectorToVector(rel)];
}
if (arbb.max.z < 0.0)
{ // give some warning before exploding...