diff --git a/game/Player.cpp b/game/Player.cpp index 3f28b4c..f6d9355 100644 --- a/game/Player.cpp +++ b/game/Player.cpp @@ -8320,8 +8320,8 @@ idPlayer::SetChargeMoveState ============== */ void idPlayer::SetChargeMoveState( void ) { - //const function_t *newstate = GetScriptFunction( "ChargeMoveF" ); - const function_t *newstate; + //const function_t *newstate = GetScriptFunction( "ChargeMoveF" ); + const function_t *newstate = NULL; // DG: make sure this is initialized, so if(newstate) check below works reliably if (chargeDir == 1){ newstate = GetScriptFunction( "ChargeMoveU" ); } @@ -12319,4 +12319,4 @@ bool idPlayer::EvaluateKick( void ) { return damaged; } -//rev 2019 from rivensin end \ No newline at end of file +//rev 2019 from rivensin end diff --git a/game/Weapon.cpp b/game/Weapon.cpp index e3eb057..fca5a2d 100644 --- a/game/Weapon.cpp +++ b/game/Weapon.cpp @@ -4140,6 +4140,8 @@ void idWeapon::Event_LaunchProjectiles( int num_projectiles, float spread, float if(num_projectiles > 1){ //Example: spread = 90, num projs = 5 ang = 2*spread/(num_projectiles-1); //Spread step: 2* 90 /(5-1) = 45 degrees ang = ang/180.0f; //normalized from 0 to 1: 45/180 = 0.5 --> % of 180 degrees to use: 0, 0.25, -0.25, 0.5, -0.5 + } else { // DG: make sure ang is initialized, I hope doing the same as WP_FIREMODE_DEFAULT makes at least a bit sense + ang = idMath::Sin( spreadRad * gameLocal.random.RandomFloat() ); } } //ivan end diff --git a/game/ai/AI.cpp b/game/ai/AI.cpp index 32697e2..5c83209 100644 --- a/game/ai/AI.cpp +++ b/game/ai/AI.cpp @@ -4668,7 +4668,7 @@ idProjectile *idAI::LaunchProjectile( const char *jointname, idEntity *target, b */ noAim = spawnArgs.GetInt( "noaim" ); if ( noAim > 0 ) { - if ( target = NULL ) { + if ( target = NULL ) { // FIXME: DG: this is not good tmp = target->GetPhysics()->GetAbsBounds().GetCenter() - muzzle; tmp.Normalize(); axis = tmp.ToMat3(); diff --git a/game/ai/AI_bot.cpp b/game/ai/AI_bot.cpp index 0c83be8..02e4e4c 100644 --- a/game/ai/AI_bot.cpp +++ b/game/ai/AI_bot.cpp @@ -1376,6 +1376,7 @@ idProjectile *idAI_Bot::LaunchProjectile( const char *jointname, idEntity *targe noAim = spawnArgs.GetInt( "noaim" ); if ( noAim > 0 ) { + // FIXME: DG: the following line is not good if ( target = NULL ) { //rev 202 reverted back to = NULL. != NULL broke noaim from working. i am sure this is the wrong way to do this. :p tmp = target->GetPhysics()->GetAbsBounds().GetCenter() - muzzle; tmp.Normalize();