Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

Gameplay.GloraxMeleeWeapon


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
class GloraxMeleeWeapon extends Weapon;

var() int range;
var() int damageAmt;

var() float knockBackVelocity;

function useAmmo()
{
}

simulated function bool hasAmmo()
{
	return true;
}

simulated function bool canFire()
{
	return true;
}

simulated function Vector calcProjectileSpawnLocation(Rotator fireRot)
{
	return rookMotor.getFirstPersonEquippableLocation(self) + (projectileSpawnOffset >> fireRot);
}

protected function Projectile makeProjectile(Rotator fireRot, Vector fireLoc)
{
	local Vector hitLocation;
	local Vector hitNormal;
	local Vector traceEnd;
	local Material hitMaterial;
	local Actor victim;

	useAmmo();
	fireCount++;

	traceEnd = Owner.Location + Vector(fireRot) * range;

	victim = Trace(hitLocation, hitNormal, traceEnd, Owner.Location, true, Vect(0.0, 0.0, 0.0), hitMaterial);

	if (victim != None)
	{
		TriggerEffectEvent('Hit', None, hitMaterial, hitLocation, Rotator(hitNormal));

		victim.TakeDamage(damageAmt, rookOwner, hitLocation, Normal(traceEnd - Owner.Location) * knockBackVelocity, class'DamageType');
	}

	return None;
}

defaultproperties
{
	damageAmt = 20.0

	firstPersonOffset = (X=-15,Y=22,Z=-15)

	roundsPerSecond = 0.5

	ammoUsage = 0

	range = 200

	knockBackVelocity = 5000

	aimClass = class'AimProjectileWeapons'
	animClass = class'CharacterEquippableAnimator'

	bMelee = true
	fireAnimSubString = "Weapon_Melee"
	animPrefix = "GloraxMelee"
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: ne 5.9.2004 15:53:12.000 - Creation time: st 23.5.2018 00:10:43.564 - Created with UnCodeX