fixed grenade launcher physics

This commit is contained in:
q3rally 2021-02-19 22:13:57 +00:00
parent 7cb3f10b46
commit 931f952063
4 changed files with 11 additions and 11 deletions

View file

@ -872,7 +872,7 @@ gentity_t *fire_grenade (gentity_t *self, vec3_t start, vec3_t dir) {
bolt = G_Spawn();
bolt->classname = "grenade";
bolt->nextthink = level.time + 2500;
bolt->nextthink = level.time + 500;
bolt->think = G_ExplodeMissile;
bolt->s.eType = ET_MISSILE;
bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN;
@ -893,7 +893,7 @@ gentity_t *fire_grenade (gentity_t *self, vec3_t start, vec3_t dir) {
bolt->s.pos.trType = TR_GRAVITY;
bolt->s.pos.trTime = level.time - MISSILE_PRESTEP_TIME; // move a bit on the very first frame
VectorCopy( start, bolt->s.pos.trBase );
VectorScale( dir, 800, bolt->s.pos.trDelta );
VectorScale( dir, 1200, bolt->s.pos.trDelta );
SnapVector( bolt->s.pos.trDelta ); // save net bandwidth
VectorCopy (start, bolt->r.currentOrigin);
@ -913,7 +913,7 @@ gentity_t *fire_cluster_grenade (gentity_t *self, vec3_t start, vec3_t dir) {
bolt = G_Spawn();
bolt->classname = "fire_cluster_grenade";
bolt->nextthink = level.time + 1000;
bolt->nextthink = level.time + 500;
bolt->think = G_ExplodeMissile;
bolt->s.eType = ET_MISSILE;
bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN;
@ -934,7 +934,7 @@ gentity_t *fire_cluster_grenade (gentity_t *self, vec3_t start, vec3_t dir) {
bolt->s.pos.trType = TR_GRAVITY;
bolt->s.pos.trTime = level.time - MISSILE_PRESTEP_TIME; // move a bit on the very first frame
VectorCopy( start, bolt->s.pos.trBase );
VectorScale( dir, 800, bolt->s.pos.trDelta ); //TBB - speed is 2000 in g_weapon.c
VectorScale( dir, 1200, bolt->s.pos.trDelta ); //TBB - speed is 2000 in g_weapon.c
SnapVector( bolt->s.pos.trDelta ); // save net bandwidth
VectorCopy (start, bolt->r.currentOrigin);

View file

@ -439,7 +439,7 @@ void weapon_grenadelauncher_fire (gentity_t *ent) {
gentity_t *m;
// extra vertical velocity
forward[2] += 0.2f;
forward[2] += 0.0f;
VectorNormalize( forward );
m = fire_grenade (ent, muzzle, forward);
@ -461,7 +461,7 @@ void weapon_cluster_grenadelauncher_fire (gentity_t *ent) {
gentity_t *m;
// extra vertical velocity
forward[2] += 0.2f;
forward[2] += 0.15f;
VectorNormalize( forward );
m = fire_cluster_grenade (ent, muzzle, forward);

View file

@ -67,7 +67,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define BASETA "missionpack"
#ifndef PRODUCT_VERSION
#define PRODUCT_VERSION "v0.0.3.0_r293"
#define PRODUCT_VERSION "v0.0.3.0_r294"
#endif

View file

@ -880,14 +880,14 @@ Selected=engine\code\qcommon\q_shared.h
TopLine=3681
Caret=1,3695
[engine\code\game\g_weapon.c]
TopLine=593
Caret=13,612
TopLine=444
Caret=20,464
[engine\code\cgame\cg_weapons.c]
TopLine=677
Caret=1,692
[engine\code\game\g_missile.c]
TopLine=201
Caret=1,201
TopLine=906
Caret=34,916
[engine\code\qcommon\q_shared.h]
TopLine=55
Caret=39,70