Skip to content

Commit

Permalink
Make fireWeaponAtLoc() use a different player in campaign.
Browse files Browse the repository at this point in the history
So the lassat in Gamma can damage player droids.

Also make campaign lassat more powerful.
  • Loading branch information
KJeff01 committed Feb 11, 2018
1 parent 21ad2f9 commit 00731ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions data/base/stats/weapons.json
Expand Up @@ -1393,9 +1393,9 @@
"muzzleGfx": "FXHBLas.PIE",
"name": "LasSat",
"numExplosions": 1,
"periodicalDamage": 360,
"periodicalDamageRadius": 384,
"periodicalDamageTime": 45,
"periodicalDamage": 380,
"periodicalDamageRadius": 425,
"periodicalDamageTime": 50,
"radius": 256,
"radiusDamage": 3000,
"rotate": 180,
Expand Down
5 changes: 3 additions & 2 deletions src/qtscriptfuncs.cpp
Expand Up @@ -4465,8 +4465,9 @@ static QScriptValue js_fireWeaponAtLoc(QScriptContext *context, QScriptEngine *)

WEAPON sWeapon;
sWeapon.nStat = weapon;
// send the projectile using the selectedPlayer so that it can always be seen
proj_SendProjectile(&sWeapon, nullptr, selectedPlayer, target, nullptr, true, 0);
// Send the projectile using the selectedPlayer so that it can always be seen.
// A player other than selectedPlayer is needed for the campaign lassat to damage player droids.
proj_SendProjectile(&sWeapon, nullptr, bMultiPlayer ? selectedPlayer : 8, target, nullptr, true, 0);
return QScriptValue();
}

Expand Down

0 comments on commit 00731ba

Please sign in to comment.