Javelin exits the clonk on throw in the right height now

Tobias Zwick 2010-12-08 16:34:53 +01:00
parent f2018cc4e7
commit 87faf5c0b5
1 changed files with 1 additions and 6 deletions

View File

@ -97,12 +97,6 @@ public func DoThrow(object clonk, int angle)
{
var javelin=TakeObject();
// how fast the javelin is thrown depends very much on
// the speed of the clonk
//var speed = 1200 * clonk->GetPhysical("Throw") / 12000 + 150 * Abs(clonk->GetXDir());
//var xdir = Sin(angle,+speed);
//var ydir = Cos(angle,-speed);
// The clonk can convert some, indicated by div in percentages, of its own kinetic energy to change the momenta of the javelin, a miracle.
var div = 60; // 40% is converted to the direction of the throwing angle.
var xdir = clonk->GetXDir(1000);
var ydir = clonk->GetYDir(1000);
@ -112,6 +106,7 @@ public func DoThrow(object clonk, int angle)
javelin->SetXDir(jav_x, 1000);
javelin->SetYDir(jav_y, 1000);
javelin->SetPosition(javelin->GetX(),javelin->GetY()+6);
SetController(clonk->GetController());
javelin->AddEffect("Flight",javelin,1,1,javelin,nil);