mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-23 11:04:02 +02:00
pistol adjustments
This commit is contained in:
parent
4c663b9d18
commit
d258c9ed7f
1 changed files with 4 additions and 4 deletions
|
@ -22,7 +22,7 @@
|
||||||
Controller.Standard.LT,
|
Controller.Standard.LT,
|
||||||
Controller.Standard.RT,
|
Controller.Standard.RT,
|
||||||
];
|
];
|
||||||
var RELOAD_THRESHOLD = 0.95;
|
var RELOAD_THRESHOLD = 0.90;
|
||||||
|
|
||||||
Pistol = function() {
|
Pistol = function() {
|
||||||
_this = this;
|
_this = this;
|
||||||
|
@ -81,11 +81,11 @@
|
||||||
},
|
},
|
||||||
toggleWithTriggerPressure: function() {
|
toggleWithTriggerPressure: function() {
|
||||||
this.triggerValue = Controller.getValue(TRIGGER_CONTROLS[this.hand]);
|
this.triggerValue = Controller.getValue(TRIGGER_CONTROLS[this.hand]);
|
||||||
|
|
||||||
if (this.triggerValue < RELOAD_THRESHOLD) {
|
if (this.triggerValue < RELOAD_THRESHOLD) {
|
||||||
this.canShoot = true;
|
this.canShoot = true;
|
||||||
}
|
}
|
||||||
if (this.canShoot === true && this.triggerValue === 1) {
|
if (this.canShoot === true && this.triggerValue >= RELOAD_THRESHOLD) {
|
||||||
this.fire();
|
this.fire();
|
||||||
this.canShoot = false;
|
this.canShoot = false;
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,7 @@
|
||||||
direction: this.firingDirection
|
direction: this.firingDirection
|
||||||
};
|
};
|
||||||
this.createGunFireEffect(this.barrelPoint)
|
this.createGunFireEffect(this.barrelPoint)
|
||||||
var intersection = Entities.findRayIntersectionBlocking(pickRay, true);
|
var intersection = Entities.findRayIntersection(pickRay, true);
|
||||||
if (intersection.intersects) {
|
if (intersection.intersects) {
|
||||||
this.createEntityHitEffect(intersection.intersection);
|
this.createEntityHitEffect(intersection.intersection);
|
||||||
if (Math.random() < this.playRichochetSoundChance) {
|
if (Math.random() < this.playRichochetSoundChance) {
|
||||||
|
|
Loading…
Reference in a new issue