@@ -31,15 +31,8 @@ G_DivideProjectile_Fire
3131*/
3232static void G_DivideProjectile_Fire ( gentity_t * ent , vec3_t start , vec3_t dir ) {
3333 gentity_t * m ;
34- float s_quadFactor = 1 ;
35-
36- if ( ent -> client -> ps .powerups [PW_QUAD ] ) {
37- s_quadFactor = g_quadfactor .value ;
38- }
3934
4035 m = fire_plasma ( ent , start , dir );
41- m -> damage *= s_quadFactor ;
42- m -> splashDamage *= s_quadFactor ;
4336 m -> enabledivide = qtrue ; // handle divided ki ball, otherwise crashes (in DLL/SO)
4437
4538// VectorAdd( m->s.pos.trDelta, ent->client->ps.velocity, m->s.pos.trDelta ); // "real" physics
@@ -53,7 +46,7 @@ G_HandleDivideKiBall
5346static void G_HandleDivideKiBall ( gentity_t * ent , gclient_t * client ) { // BFP - WP_PLASMAGUN would be that dividing ball, when pressing the attack key again, divides by the number of balls depending on the ki attack charge points had
5447 vec3_t dir , angles ;
5548 int i ;
56- int chargePoints = client -> divideBallKiCharged ;
49+ int chargePoints = client -> kiChargePoints ;
5750 int projectiles_to_spawn = 0 ;
5851 int yawAdjustments [6 ] = {
5952 // if charge attack is 2:
@@ -533,16 +526,18 @@ void G_RunMissile( gentity_t *ent ) {
533526 // if just died, then stop
534527 if ( client -> ps .pm_type == PM_DEAD ) {
535528 G_BFPBeamStop ( ent );
529+ return ;
536530 }
537531
538532 if ( tr .surfaceFlags & SURF_NOIMPACT ) {
539533 G_BFPBeamStop ( ent );
534+ return ;
540535 }
541536
542537 if ( tr .fraction != 1 ) {
543538 G_BFPBeamStop ( ent );
539+ return ;
544540 }
545- return ;
546541 }
547542
548543 if ( tr .fraction != 1 ) {
@@ -711,6 +706,8 @@ fire_rocket
711706*/
712707gentity_t * fire_rocket (gentity_t * self , vec3_t start , vec3_t dir ) {
713708 gentity_t * bolt ;
709+ // BFP - Projectile radius
710+ float radius = 20 ;
714711
715712 VectorNormalize (dir );
716713
@@ -738,6 +735,10 @@ gentity_t *fire_rocket (gentity_t *self, vec3_t start, vec3_t dir) {
738735 SnapVector ( bolt -> s .pos .trDelta ); // save net bandwidth
739736 VectorCopy (start , bolt -> r .currentOrigin );
740737
738+ // BFP - Collision radius
739+ VectorSet ( bolt -> r .mins , - radius , - radius , - radius );
740+ VectorSet ( bolt -> r .maxs , radius , radius , radius );
741+
741742 return bolt ;
742743}
743744// BFP - no hook
@@ -786,6 +787,8 @@ fire_bfpbeam
786787*/
787788gentity_t * fire_bfpbeam (gentity_t * self , vec3_t start , vec3_t dir ) {
788789 gentity_t * beam ;
790+ // BFP - Projectile radius
791+ float radius = 30 ;
789792
790793 VectorNormalize ( dir );
791794
@@ -798,7 +801,8 @@ gentity_t *fire_bfpbeam (gentity_t *self, vec3_t start, vec3_t dir) {
798801 beam -> s .weapon = WP_GRAPPLING_HOOK ;
799802 beam -> r .ownerNum = self -> s .number ;
800803 beam -> methodOfDeath = MOD_KI_ATTACK ;
801- beam -> clipmask = MASK_SHOT ;
804+ // BFP - Beams should collide with other entities including other beams
805+ beam -> clipmask = MASK_SHOT | CONTENTS_BODY ;
802806 beam -> parent = self ;
803807 beam -> target_ent = NULL ;
804808
@@ -807,13 +811,19 @@ gentity_t *fire_bfpbeam (gentity_t *self, vec3_t start, vec3_t dir) {
807811 beam -> splashRadius = 120 ;
808812 beam -> splashMethodOfDeath = MOD_KI_ATTACK ;
809813
814+ beam -> speed = 2000 ;
815+
810816 beam -> s .pos .trType = TR_LINEAR ;
811817 beam -> s .pos .trTime = level .time - MISSILE_PRESTEP_TIME ; // move a bit on the very first frame
812818 beam -> s .otherEntityNum = self -> s .number ; // use to match beam in client
813819 VectorCopy ( start , beam -> s .pos .trBase );
814- VectorScale ( dir , 800 , beam -> s .pos .trDelta );
820+ VectorScale ( dir , beam -> speed , beam -> s .pos .trDelta ); // speed
815821 SnapVector ( beam -> s .pos .trDelta ); // save net bandwidth
816822 VectorCopy ( start , beam -> r .currentOrigin );
817823
824+ // BFP - Collision radius
825+ VectorSet ( beam -> r .mins , - radius , - radius , - radius );
826+ VectorSet ( beam -> r .maxs , radius , radius , radius );
827+
818828 return beam ;
819829}
0 commit comments