nade bounces on local player

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1656 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2008-02-16 21:37:58 +00:00
parent 5e01857f19
commit cea995662b
2 changed files with 9 additions and 5 deletions
+6 -2
View File
@@ -769,9 +769,13 @@ struct grenades : weapon
const float speed = cosf(RAD*owner->pitch);
vec vel(sinf(RAD*owner->yaw)*speed, -cosf(RAD*owner->yaw)*speed, sinf(RAD*owner->pitch));
vel.mul(1.5f);
vec from(vel);
from.mul(1.1f*owner->radius);
from.add(owner->o);
from.normalize();
from.mul(owner->radius+inhandnade->radius);
from.mul(1.8f);
from.add(owner->o);
thrownade(from, vel, inhandnade);
owner->attacking = false;
}