musket bug fixed

Charles Spurrill 2009-12-23 00:45:37 -08:00
parent 89f0ee4ee6
commit bcde491ded
2 changed files with 3 additions and 3 deletions

View File

@ -17,10 +17,10 @@ private func Check()
{
var pVictim = FindObject(Find_OCF(OCF_Alive),Find_InRect(-15,-15,30,30),Find_NoContainer());
// If bullet is flying, hurt victim
if(GetOCF() & OCF_HitSpeed4) { if(pVictim) Wound(pVictim); }
if(GetOCF() & OCF_HitSpeed4 && GetOCF() & OCF_NotContained) { if(pVictim) BulletWound(pVictim); }
}
private func Wound(object pObj)
private func BulletWound(object pObj)
{
Message("Hit!|%d", pObj, pObj->GetEnergy()); //Remove when sound works

View File

@ -10,7 +10,7 @@ public func MuzzleVelocity() { return 300; } //Speed of projectile on launch
public func MagazineType() { return Contained()->FindContents(POCH); } //Collects bullets from this object... ie:Quiver
public func MagazineSize() { return 1; } //Amount of ammo this gun can hold
public func ProjectileType() { return MBLL; } //Object which fires from gun
public func Accuracy() { return 4; } //Spread of fired shots 0=Perfect Accuracy; 10=Horrible Accuracy;
public func Accuracy() { return 3; } //Spread of fired shots 0=Perfect Accuracy; 10=Horrible Accuracy;
protected func Initialize() { Ammo=0; }