mirror of
https://github.com/PhantomGamesDevelopment/TWM2.git
synced 2026-07-12 23:14:41 +00:00
Initial Commit
This commit is contained in:
commit
bd51490b14
316 changed files with 150033 additions and 0 deletions
210
scripts/weapons/Rifles/ALSWPSniper.cs
Normal file
210
scripts/weapons/Rifles/ALSWPSniper.cs
Normal file
|
|
@ -0,0 +1,210 @@
|
|||
datablock AudioProfile(ALSWPFireSound) {
|
||||
filename = "fx/weapons/cg_hard1.wav";
|
||||
description = AudioDefault3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock TracerProjectileData(ALSWPBullet){
|
||||
doDynamicClientHits = true;
|
||||
|
||||
directDamage = 0.5;
|
||||
directDamageType = $DamageType::ALSWP;
|
||||
explosion = "ChaingunExplosion";
|
||||
splash = ChaingunSplash;
|
||||
HeadMultiplier = 1.5;
|
||||
LegsMultiplier = 0.35;
|
||||
|
||||
HeadShotKill = 0;
|
||||
|
||||
ImageSource = "ALSWPSniperRifleImage";
|
||||
|
||||
kickBackStrength = 15.0;
|
||||
sound = ChaingunProjectile;
|
||||
|
||||
dryVelocity = 3000.0;
|
||||
wetVelocity = 2000.0;
|
||||
velInheritFactor = 1.0;
|
||||
fizzleTimeMS = 1000;
|
||||
lifetimeMS = 1000;
|
||||
explodeOnDeath = false;
|
||||
reflectOnWaterImpactAngle = 0.0;
|
||||
explodeOnWaterImpact = false;
|
||||
deflectionOnWaterImpact = 0.0;
|
||||
fizzleUnderwaterMS = 3000;
|
||||
|
||||
tracerLength = 20.0;
|
||||
tracerAlpha = false;
|
||||
tracerMinPixels = 6;
|
||||
tracerColor = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
|
||||
tracerTex[0] = "special/tracer00";
|
||||
tracerTex[1] = "special/tracercross";
|
||||
tracerWidth = 0.09;
|
||||
crossSize = 0.20;
|
||||
crossViewAng = 0.990;
|
||||
renderCross = true;
|
||||
|
||||
decalData[0] = ChaingunDecal1;
|
||||
decalData[1] = ChaingunDecal2;
|
||||
decalData[2] = ChaingunDecal3;
|
||||
decalData[3] = ChaingunDecal4;
|
||||
decalData[4] = ChaingunDecal5;
|
||||
decalData[5] = ChaingunDecal6;
|
||||
};
|
||||
|
||||
datablock ItemData(ALSWPSniperRifleAmmo)
|
||||
{
|
||||
className = Ammo;
|
||||
catagory = "Ammo";
|
||||
shapeFile = "ammo_chaingun.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "Some ALSWP Sniper Rifle Ammo";
|
||||
|
||||
computeCRC = true;
|
||||
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Weapon
|
||||
//--------------------------------------
|
||||
datablock ShapeBaseImageData(ALSWPSniperRifleImage) {
|
||||
|
||||
className = WeaponImage;
|
||||
shapeFile = "weapon_sniper.dts";
|
||||
mass = 10;
|
||||
item = ALSWPSniperRifle;
|
||||
ammo = ALSWPSniperRifleAmmo;
|
||||
projectile = ALSWPBullet;
|
||||
projectileType = TracerProjectile;
|
||||
emap = true;
|
||||
|
||||
armThread = looksn;
|
||||
|
||||
//ClipStuff
|
||||
ClipName = "ALSWPClip";
|
||||
ClipPickupName["ALSWPClip"] = "A Few Boxes Of ALSWP Sniper Bullets";
|
||||
ShowsClipInHud = 1;
|
||||
ClipReloadTime = 5;
|
||||
ClipReturn = 10;
|
||||
InitialClips = 6;
|
||||
//
|
||||
//Challenges
|
||||
HasChallenges = 1;
|
||||
ChallengeCt = 8;
|
||||
Challenge[1] = "ALSWP Hunter\t100\t150\tNone";
|
||||
Challenge[2] = "ALSWP Expert\t200\t250\tNone";
|
||||
Challenge[3] = "ALSWP Master\t500\t500\tLaser";
|
||||
Challenge[4] = "ALSWP God\t1000\t1000\tSilencer";
|
||||
Challenge[5] = "ALSWP Bronze Commendation\t2500\t10000\tNone";
|
||||
Challenge[6] = "ALSWP Silver Commendation\t5000\t25000\tNone";
|
||||
Challenge[7] = "ALSWP Gold Commendation\t10000\t50000\tNone";
|
||||
Challenge[8] = "ALSWP Titan Commendation\t25000\t75000\tNone";
|
||||
Upgrade[1] = "Laser";
|
||||
Upgrade[2] = "Silencer";
|
||||
GunName = "ALSWP Sniper Rifle";
|
||||
//
|
||||
|
||||
RankRequire = $TWM2::RankRequire["ALSWP"];
|
||||
|
||||
casing = ShellDebris;
|
||||
shellExitDir = "1.0 0.3 1.0";
|
||||
shellExitOffset = "0.15 -0.56 -0.1";
|
||||
shellExitVariance = 15.0;
|
||||
shellVelocity = 3.0;
|
||||
|
||||
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnTimeout[0] = "ActivateReady";
|
||||
stateTimeoutValue[0] = 0.5;
|
||||
stateSequence[0] = "Activate";
|
||||
stateSound[0] = ChaingunSwitchSound;
|
||||
|
||||
stateName[1] = "ActivateReady";
|
||||
stateTransitionOnLoaded[1] = "Ready";
|
||||
stateTransitionOnNoAmmo[1] = "NoAmmo";
|
||||
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[2] = "CheckWet";
|
||||
|
||||
stateName[3] = "Fire";
|
||||
stateTransitionOnTimeout[3] = "Reload";
|
||||
stateTimeoutValue[3] = 0.01;
|
||||
stateFire[3] = true;
|
||||
stateRecoil[3] = LightRecoil;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateScript[3] = "onFire";
|
||||
//stateSound[3] = "ALSWPFireSound";
|
||||
|
||||
stateName[4] = "Reload";
|
||||
stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||
stateTransitionOnTimeout[4] = "Ready";
|
||||
stateTimeoutValue[4] = 0.6;
|
||||
stateAllowImageChange[4] = false;
|
||||
stateSequence[4] = "Reload";
|
||||
|
||||
stateName[5] = "NoAmmo";
|
||||
stateTransitionOnAmmo[5] = "Reload";
|
||||
stateSequence[5] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[5] = "DryFire";
|
||||
|
||||
stateName[6] = "DryFire";
|
||||
stateSound[6] = ChaingunDryFireSound;
|
||||
stateTimeoutValue[6] = 1.0;
|
||||
stateTransitionOnTimeout[6] = "NoAmmo";
|
||||
|
||||
stateName[7] = "WetFire";
|
||||
stateSound[7] = PlasmaFireWetSound;
|
||||
stateTimeoutValue[7] = 1.0;
|
||||
stateTransitionOnTimeout[7] = "Ready";
|
||||
|
||||
stateName[8] = "CheckWet";
|
||||
stateTransitionOnWet[8] = "WetFire";
|
||||
stateTransitionOnNotWet[8] = "Fire";
|
||||
};
|
||||
|
||||
datablock ItemData(ALSWPSniperRifle)
|
||||
{
|
||||
className = Weapon;
|
||||
catagory = "Spawn Items";
|
||||
shapeFile = "weapon_sniper.dts";
|
||||
image = ALSWPSniperRifleImage;
|
||||
mass = 1.0;
|
||||
elasticity = 0.0;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "a ALSWP Sniper Rifle";
|
||||
|
||||
computeCRC = true;
|
||||
emap = true;
|
||||
};
|
||||
|
||||
function ALSWPSniperRifleImage::onMount(%this,%obj,%slot) {
|
||||
if(!$TWM2::AllowSnipers) {
|
||||
bottomPrint(%obj.client, "The host has disabled sniper weapons.", 2, 2);
|
||||
%obj.throwweapon(1);
|
||||
%obj.throwweapon(0);
|
||||
}
|
||||
Parent::onMount(%this, %obj, %slot);
|
||||
}
|
||||
|
||||
function ALSWPSniperRifleImage::onUnmount(%this,%obj,%slot) {
|
||||
Parent::onUnmount(%this, %obj, %slot);
|
||||
}
|
||||
|
||||
function ALSWPSniperRifleImage::onFire(%data, %obj, %slot) {
|
||||
if(!$TWM2::AllowSnipers) {
|
||||
bottomPrint(%obj.client, "The host has disabled sniper weapons.", 2, 2);
|
||||
%obj.throwweapon(1);
|
||||
%obj.throwweapon(0);
|
||||
}
|
||||
%p = Parent::onFire(%data, %obj, %slot);
|
||||
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
|
||||
//zero sound :p
|
||||
}
|
||||
else {
|
||||
ServerPlay3d(ALSWPFireSound, %obj.getPosition());
|
||||
}
|
||||
}
|
||||
225
scripts/weapons/Rifles/G17Sniper.cs
Normal file
225
scripts/weapons/Rifles/G17Sniper.cs
Normal file
|
|
@ -0,0 +1,225 @@
|
|||
datablock AudioProfile(G17FireSound) {
|
||||
filename = "fx/weapons/cg_metal4.wav";
|
||||
description = AudioDefault3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock TracerProjectileData(G17Bullet){
|
||||
doDynamicClientHits = true;
|
||||
|
||||
directDamage = 0.25;
|
||||
directDamageType = $DamageType::G17;
|
||||
explosion = "ChaingunExplosion";
|
||||
splash = ChaingunSplash;
|
||||
HeadMultiplier = 1.5;
|
||||
LegsMultiplier = 0.35;
|
||||
|
||||
HeadShotKill = 1;
|
||||
|
||||
ImageSource = "G17SniperRifleImage";
|
||||
|
||||
kickBackStrength = 15.0;
|
||||
sound = ChaingunProjectile;
|
||||
|
||||
dryVelocity = 3000.0;
|
||||
wetVelocity = 2000.0;
|
||||
velInheritFactor = 1.0;
|
||||
fizzleTimeMS = 1000;
|
||||
lifetimeMS = 1000;
|
||||
explodeOnDeath = false;
|
||||
reflectOnWaterImpactAngle = 0.0;
|
||||
explodeOnWaterImpact = false;
|
||||
deflectionOnWaterImpact = 0.0;
|
||||
fizzleUnderwaterMS = 3000;
|
||||
|
||||
tracerLength = 20.0;
|
||||
tracerAlpha = false;
|
||||
tracerMinPixels = 6;
|
||||
tracerColor = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
|
||||
tracerTex[0] = "special/tracer00";
|
||||
tracerTex[1] = "special/tracercross";
|
||||
tracerWidth = 0.09;
|
||||
crossSize = 0.20;
|
||||
crossViewAng = 0.990;
|
||||
renderCross = true;
|
||||
|
||||
decalData[0] = ChaingunDecal1;
|
||||
decalData[1] = ChaingunDecal2;
|
||||
decalData[2] = ChaingunDecal3;
|
||||
decalData[3] = ChaingunDecal4;
|
||||
decalData[4] = ChaingunDecal5;
|
||||
decalData[5] = ChaingunDecal6;
|
||||
};
|
||||
|
||||
datablock ItemData(G17SniperRifleAmmo)
|
||||
{
|
||||
className = Ammo;
|
||||
catagory = "Ammo";
|
||||
shapeFile = "ammo_chaingun.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "Some G17 Sniper Rifle Ammo";
|
||||
|
||||
computeCRC = true;
|
||||
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Weapon
|
||||
//--------------------------------------
|
||||
datablock ShapeBaseImageData(G17SniperRifleImage) {
|
||||
|
||||
className = WeaponImage;
|
||||
shapeFile = "weapon_sniper.dts";
|
||||
mass = 10;
|
||||
item = G17SniperRifle;
|
||||
ammo = G17SniperRifleAmmo;
|
||||
projectile = G17Bullet;
|
||||
projectileType = TracerProjectile;
|
||||
emap = true;
|
||||
|
||||
armThread = looksn;
|
||||
|
||||
//ClipStuff
|
||||
ClipName = "G17Clip";
|
||||
ClipPickupName["G17Clip"] = "A Few Boxes Of G17 Sniper Bullets";
|
||||
ShowsClipInHud = 1;
|
||||
ClipReloadTime = 4;
|
||||
ClipReturn = 1;
|
||||
InitialClips = 10;
|
||||
//
|
||||
//Challenges
|
||||
HasChallenges = 1;
|
||||
ChallengeCt = 8;
|
||||
Challenge[1] = "G17 Hunter\t100\t150\tNone";
|
||||
Challenge[2] = "G17 Expert\t200\t250\tNone";
|
||||
Challenge[3] = "G17 Master\t500\t500\tLaser";
|
||||
Challenge[4] = "G17 God\t1000\t1000\tSilencer";
|
||||
Challenge[5] = "G17 Bronze Commendation\t2500\t10000\tNone";
|
||||
Challenge[6] = "G17 Silver Commendation\t5000\t25000\tNone";
|
||||
Challenge[7] = "G17 Gold Commendation\t10000\t50000\tNone";
|
||||
Challenge[8] = "G17 Titan Commendation\t25000\t75000\tNone";
|
||||
Upgrade[1] = "Laser";
|
||||
Upgrade[2] = "Silencer";
|
||||
GunName = "G17 Sniper Rifle";
|
||||
//
|
||||
|
||||
casing = ShellDebris;
|
||||
shellExitDir = "1.0 0.3 1.0";
|
||||
shellExitOffset = "0.15 -0.56 -0.1";
|
||||
shellExitVariance = 15.0;
|
||||
shellVelocity = 3.0;
|
||||
|
||||
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnTimeout[0] = "ActivateReady";
|
||||
stateTimeoutValue[0] = 0.5;
|
||||
stateSequence[0] = "Activate";
|
||||
stateSound[0] = ChaingunSwitchSound;
|
||||
|
||||
stateName[1] = "ActivateReady";
|
||||
stateTransitionOnLoaded[1] = "Ready";
|
||||
stateTransitionOnNoAmmo[1] = "NoAmmo";
|
||||
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[2] = "CheckWet";
|
||||
|
||||
stateName[3] = "Fire";
|
||||
stateTransitionOnTimeout[3] = "Reload";
|
||||
stateTimeoutValue[3] = 0.01;
|
||||
stateFire[3] = true;
|
||||
stateRecoil[3] = LightRecoil;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateScript[3] = "onFire";
|
||||
//stateSound[3] = "G17FireSound";
|
||||
|
||||
stateName[4] = "Reload";
|
||||
stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||
stateTransitionOnTimeout[4] = "Ready";
|
||||
stateTimeoutValue[4] = 1.1;
|
||||
stateAllowImageChange[4] = false;
|
||||
stateSequence[4] = "Reload";
|
||||
|
||||
stateName[5] = "NoAmmo";
|
||||
stateTransitionOnAmmo[5] = "Reload";
|
||||
stateSequence[5] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[5] = "DryFire";
|
||||
|
||||
stateName[6] = "DryFire";
|
||||
stateSound[6] = ChaingunDryFireSound;
|
||||
stateTimeoutValue[6] = 1.0;
|
||||
stateTransitionOnTimeout[6] = "NoAmmo";
|
||||
|
||||
stateName[7] = "WetFire";
|
||||
stateSound[7] = PlasmaFireWetSound;
|
||||
stateTimeoutValue[7] = 1.0;
|
||||
stateTransitionOnTimeout[7] = "Ready";
|
||||
|
||||
stateName[8] = "CheckWet";
|
||||
stateTransitionOnWet[8] = "WetFire";
|
||||
stateTransitionOnNotWet[8] = "Fire";
|
||||
};
|
||||
|
||||
datablock ItemData(G17SniperRifle)
|
||||
{
|
||||
className = Weapon;
|
||||
catagory = "Spawn Items";
|
||||
shapeFile = "weapon_sniper.dts";
|
||||
image = G17SniperRifleImage;
|
||||
mass = 1.0;
|
||||
elasticity = 0.0;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "a G17 Sniper Rifle";
|
||||
|
||||
computeCRC = true;
|
||||
emap = true;
|
||||
};
|
||||
|
||||
//Two images make the scope
|
||||
datablock ShapeBaseImageData(G17ScopeImage) : G17SniperRifleImage {
|
||||
shapeFile = "turret_belly_barrell.dts";
|
||||
offset = "0 0.25 0.25";
|
||||
rotation = "1 0 0 180";
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(G17ScopeImage2) : G17SniperRifleImage {
|
||||
shapeFile = "turret_belly_barrell.dts";
|
||||
offset = "0 0.3 0.25";
|
||||
rotation = "1 0 0 0";
|
||||
};
|
||||
|
||||
function G17SniperRifleImage::onMount(%this,%obj,%slot) {
|
||||
if(!$TWM2::AllowSnipers) {
|
||||
bottomPrint(%obj.client, "The host has disabled sniper weapons.", 2, 2);
|
||||
%obj.throwweapon(1);
|
||||
%obj.throwweapon(0);
|
||||
}
|
||||
Parent::onMount(%this, %obj, %slot);
|
||||
%obj.mountImage(G17ScopeImage, 5);
|
||||
%obj.mountImage(G17ScopeImage2, 6);
|
||||
}
|
||||
|
||||
function G17SniperRifleImage::onUnmount(%this,%obj,%slot) {
|
||||
Parent::onUnmount(%this, %obj, %slot);
|
||||
%obj.unmountImage(5);
|
||||
%obj.unmountImage(6);
|
||||
}
|
||||
|
||||
function G17SniperRifleImage::onFire(%data, %obj, %slot) {
|
||||
if(!$TWM2::AllowSnipers) {
|
||||
bottomPrint(%obj.client, "The host has disabled sniper weapons.", 2, 2);
|
||||
%obj.throwweapon(1);
|
||||
%obj.throwweapon(0);
|
||||
}
|
||||
%p = Parent::onFire(%data, %obj, %slot);
|
||||
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
|
||||
//zero sound :p
|
||||
}
|
||||
else {
|
||||
ServerPlay3d(G17FireSound, %obj.getPosition());
|
||||
}
|
||||
}
|
||||
183
scripts/weapons/Rifles/G41.cs
Normal file
183
scripts/weapons/Rifles/G41.cs
Normal file
|
|
@ -0,0 +1,183 @@
|
|||
datablock TracerProjectileData(G41Bullet)
|
||||
{
|
||||
doDynamicClientHits = true;
|
||||
|
||||
directDamage = 0.3;
|
||||
directDamageType = $DamageType::G41;
|
||||
explosion = "ChaingunExplosion";
|
||||
splash = ChaingunSplash;
|
||||
HeadMultiplier = 1.1;
|
||||
LegsMultiplier = 0.35;
|
||||
|
||||
ImageSource = "G41RifleImage";
|
||||
|
||||
kickBackStrength = 15.0;
|
||||
sound = ChaingunProjectile;
|
||||
|
||||
dryVelocity = 3000.0;
|
||||
wetVelocity = 2000.0;
|
||||
velInheritFactor = 1.0;
|
||||
fizzleTimeMS = 1000;
|
||||
lifetimeMS = 1000;
|
||||
explodeOnDeath = false;
|
||||
reflectOnWaterImpactAngle = 0.0;
|
||||
explodeOnWaterImpact = false;
|
||||
deflectionOnWaterImpact = 0.0;
|
||||
fizzleUnderwaterMS = 3000;
|
||||
|
||||
tracerLength = 20.0;
|
||||
tracerAlpha = false;
|
||||
tracerMinPixels = 6;
|
||||
tracerColor = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
|
||||
tracerTex[0] = "special/tracer00";
|
||||
tracerTex[1] = "special/tracercross";
|
||||
tracerWidth = 0.09;
|
||||
crossSize = 0.20;
|
||||
crossViewAng = 0.990;
|
||||
renderCross = true;
|
||||
|
||||
decalData[0] = ChaingunDecal1;
|
||||
decalData[1] = ChaingunDecal2;
|
||||
decalData[2] = ChaingunDecal3;
|
||||
decalData[3] = ChaingunDecal4;
|
||||
decalData[4] = ChaingunDecal5;
|
||||
decalData[5] = ChaingunDecal6;
|
||||
};
|
||||
|
||||
datablock ItemData(G41RifleAmmo)
|
||||
{
|
||||
className = Ammo;
|
||||
catagory = "Ammo";
|
||||
shapeFile = "ammo_chaingun.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "Some G41 Rifle Bullets";
|
||||
|
||||
computeCRC = true;
|
||||
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(G41RifleImage)
|
||||
{
|
||||
className = WeaponImage;
|
||||
shapeFile = "weapon_sniper.dts";
|
||||
mass = 10;
|
||||
item = G41Rifle;
|
||||
ammo = G41RifleAmmo;
|
||||
projectile = G41Bullet;
|
||||
projectileType = TracerProjectile;
|
||||
emap = true;
|
||||
|
||||
//ClipStuff
|
||||
ClipName = "G41RifleClip";
|
||||
ClipPickupName["G41RifleClip"] = "some G41 Clip Cartons";
|
||||
ShowsClipInHud = 1;
|
||||
ClipReloadTime = 5;
|
||||
ClipReturn = 20;
|
||||
InitialClips = 7;
|
||||
//
|
||||
//Challenges
|
||||
HasChallenges = 1;
|
||||
ChallengeCt = 8;
|
||||
Challenge[1] = "G41 Hunter\t75\t150\tNone";
|
||||
Challenge[2] = "G41 Expert\t150\t250\tGrip";
|
||||
Challenge[3] = "G41 Master\t350\t500\tLaser";
|
||||
Challenge[4] = "G41 God\t600\t1000\tSilencer";
|
||||
Challenge[5] = "G41 Bronze Commendation\t2500\t10000\tNone";
|
||||
Challenge[6] = "G41 Silver Commendation\t5000\t25000\tNone";
|
||||
Challenge[7] = "G41 Gold Commendation\t10000\t50000\tNone";
|
||||
Challenge[8] = "G41 Titan Commendation\t25000\t75000\tNone";
|
||||
Upgrade[1] = "Grip";
|
||||
Upgrade[2] = "Laser";
|
||||
Upgrade[3] = "Silencer";
|
||||
GunName = "G41 Semi-Automatic Rifle";
|
||||
//
|
||||
|
||||
RankRequire = $TWM2::RankRequire["G41"];
|
||||
|
||||
casing = ShellDebris;
|
||||
shellExitDir = "1.0 0.3 1.0";
|
||||
shellExitOffset = "0.15 -0.56 -0.1";
|
||||
shellExitVariance = 15.0;
|
||||
shellVelocity = 3.0;
|
||||
|
||||
projectileSpread = 3.0 / 1000.0;
|
||||
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnTimeout[0] = "ActivateReady";
|
||||
stateTimeoutValue[0] = 0.5;
|
||||
stateSequence[0] = "Activate";
|
||||
stateSound[0] = ChaingunSwitchSound;
|
||||
|
||||
stateName[1] = "ActivateReady";
|
||||
stateTransitionOnLoaded[1] = "Ready";
|
||||
stateTransitionOnNoAmmo[1] = "NoAmmo";
|
||||
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[2] = "CheckWet";
|
||||
|
||||
stateName[3] = "Fire";
|
||||
stateTransitionOnTimeout[3] = "Reload";
|
||||
stateTimeoutValue[3] = 0.01;
|
||||
stateFire[3] = true;
|
||||
stateRecoil[3] = LightRecoil;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateScript[3] = "onFire";
|
||||
stateEmitterTime[3] = 0.2;
|
||||
//stateSound[3] = S3FireSound;
|
||||
|
||||
stateName[4] = "Reload";
|
||||
stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||
stateTransitionOnTimeout[4] = "Ready";
|
||||
stateTimeoutValue[4] = 0.3;
|
||||
stateAllowImageChange[4] = false;
|
||||
stateSequence[4] = "Reload";
|
||||
|
||||
stateName[5] = "NoAmmo";
|
||||
stateTransitionOnAmmo[5] = "Reload";
|
||||
stateSequence[5] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[5] = "DryFire";
|
||||
|
||||
stateName[6] = "DryFire";
|
||||
stateSound[6] = ChaingunDryFireSound;
|
||||
stateTimeoutValue[6] = 1.0;
|
||||
stateTransitionOnTimeout[6] = "NoAmmo";
|
||||
|
||||
stateName[7] = "WetFire";
|
||||
stateSound[7] = PlasmaFireWetSound;
|
||||
stateTimeoutValue[7] = 1.0;
|
||||
stateTransitionOnTimeout[7] = "Ready";
|
||||
|
||||
stateName[8] = "CheckWet";
|
||||
stateTransitionOnWet[8] = "WetFire";
|
||||
stateTransitionOnNotWet[8] = "Fire";
|
||||
};
|
||||
|
||||
datablock ItemData(G41Rifle)
|
||||
{
|
||||
className = Weapon;
|
||||
catagory = "Spawn Items";
|
||||
shapeFile = "weapon_sniper.dts";
|
||||
image = G41RifleImage;
|
||||
mass = 1.0;
|
||||
elasticity = 0.0;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "an G41 Semi-Automatic Rifle";
|
||||
|
||||
computeCRC = true;
|
||||
emap = true;
|
||||
};
|
||||
|
||||
function G41RifleImage::onFire(%data, %obj, %slot) {
|
||||
%p = Parent::onFire(%data, %obj, %slot);
|
||||
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
|
||||
//zero sound :p
|
||||
}
|
||||
else {
|
||||
ServerPlay3d(S3FireSound, %obj.getPosition());
|
||||
}
|
||||
}
|
||||
227
scripts/weapons/Rifles/M1Sniper.cs
Normal file
227
scripts/weapons/Rifles/M1Sniper.cs
Normal file
|
|
@ -0,0 +1,227 @@
|
|||
datablock AudioProfile(M1FireSound) {
|
||||
filename = "fx/weapons/cg_metal2.wav";
|
||||
description = AudioDefault3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock TracerProjectileData(M1Bullet){
|
||||
doDynamicClientHits = true;
|
||||
|
||||
directDamage = 0.3;
|
||||
directDamageType = $DamageType::M1;
|
||||
explosion = "ChaingunExplosion";
|
||||
splash = ChaingunSplash;
|
||||
HeadMultiplier = 1.5;
|
||||
LegsMultiplier = 0.35;
|
||||
|
||||
HeadShotKill = 1;
|
||||
|
||||
ImageSource = "M1SniperRifleImage";
|
||||
|
||||
kickBackStrength = 15.0;
|
||||
sound = ChaingunProjectile;
|
||||
|
||||
dryVelocity = 3000.0;
|
||||
wetVelocity = 2000.0;
|
||||
velInheritFactor = 1.0;
|
||||
fizzleTimeMS = 1000;
|
||||
lifetimeMS = 1000;
|
||||
explodeOnDeath = false;
|
||||
reflectOnWaterImpactAngle = 0.0;
|
||||
explodeOnWaterImpact = false;
|
||||
deflectionOnWaterImpact = 0.0;
|
||||
fizzleUnderwaterMS = 3000;
|
||||
|
||||
tracerLength = 20.0;
|
||||
tracerAlpha = false;
|
||||
tracerMinPixels = 6;
|
||||
tracerColor = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
|
||||
tracerTex[0] = "special/tracer00";
|
||||
tracerTex[1] = "special/tracercross";
|
||||
tracerWidth = 0.09;
|
||||
crossSize = 0.20;
|
||||
crossViewAng = 0.990;
|
||||
renderCross = true;
|
||||
|
||||
decalData[0] = ChaingunDecal1;
|
||||
decalData[1] = ChaingunDecal2;
|
||||
decalData[2] = ChaingunDecal3;
|
||||
decalData[3] = ChaingunDecal4;
|
||||
decalData[4] = ChaingunDecal5;
|
||||
decalData[5] = ChaingunDecal6;
|
||||
};
|
||||
|
||||
datablock ItemData(M1SniperRifleAmmo)
|
||||
{
|
||||
className = Ammo;
|
||||
catagory = "Ammo";
|
||||
shapeFile = "ammo_chaingun.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "Some M1 Sniper Rifle Ammo";
|
||||
|
||||
computeCRC = true;
|
||||
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Weapon
|
||||
//--------------------------------------
|
||||
datablock ShapeBaseImageData(M1SniperRifleImage) {
|
||||
|
||||
className = WeaponImage;
|
||||
shapeFile = "weapon_sniper.dts";
|
||||
mass = 10;
|
||||
item = M1SniperRifle;
|
||||
ammo = M1SniperRifleAmmo;
|
||||
projectile = M1Bullet;
|
||||
projectileType = TracerProjectile;
|
||||
emap = true;
|
||||
|
||||
armThread = looksn;
|
||||
|
||||
//ClipStuff
|
||||
ClipName = "M1Clip";
|
||||
ClipPickupName["M1Clip"] = "A Few Boxes Of M1 Sniper Bullets";
|
||||
ShowsClipInHud = 1;
|
||||
ClipReloadTime = 5;
|
||||
ClipReturn = 5;
|
||||
InitialClips = 5;
|
||||
//
|
||||
//Challenges
|
||||
HasChallenges = 1;
|
||||
ChallengeCt = 8;
|
||||
Challenge[1] = "M1 Hunter\t100\t150\tNone";
|
||||
Challenge[2] = "M1 Expert\t200\t250\tNone";
|
||||
Challenge[3] = "M1 Master\t500\t500\tLaser";
|
||||
Challenge[4] = "M1 God\t1000\t1000\tSilencer";
|
||||
Challenge[5] = "M1 Bronze Commendation\t2500\t10000\tNone";
|
||||
Challenge[6] = "M1 Silver Commendation\t5000\t25000\tNone";
|
||||
Challenge[7] = "M1 Gold Commendation\t10000\t50000\tNone";
|
||||
Challenge[8] = "M1 Titan Commendation\t25000\t75000\tNone";
|
||||
Upgrade[1] = "Laser";
|
||||
Upgrade[2] = "Silencer";
|
||||
GunName = "M1 Sniper Rifle";
|
||||
//
|
||||
|
||||
RankRequire = $TWM2::RankRequire["M1"];
|
||||
|
||||
casing = ShellDebris;
|
||||
shellExitDir = "1.0 0.3 1.0";
|
||||
shellExitOffset = "0.15 -0.56 -0.1";
|
||||
shellExitVariance = 15.0;
|
||||
shellVelocity = 3.0;
|
||||
|
||||
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnTimeout[0] = "ActivateReady";
|
||||
stateTimeoutValue[0] = 0.5;
|
||||
stateSequence[0] = "Activate";
|
||||
stateSound[0] = ChaingunSwitchSound;
|
||||
|
||||
stateName[1] = "ActivateReady";
|
||||
stateTransitionOnLoaded[1] = "Ready";
|
||||
stateTransitionOnNoAmmo[1] = "NoAmmo";
|
||||
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[2] = "CheckWet";
|
||||
|
||||
stateName[3] = "Fire";
|
||||
stateTransitionOnTimeout[3] = "Reload";
|
||||
stateTimeoutValue[3] = 0.01;
|
||||
stateFire[3] = true;
|
||||
stateRecoil[3] = LightRecoil;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateScript[3] = "onFire";
|
||||
//stateSound[3] = "M1FireSound";
|
||||
|
||||
stateName[4] = "Reload";
|
||||
stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||
stateTransitionOnTimeout[4] = "Ready";
|
||||
stateTimeoutValue[4] = 1.1;
|
||||
stateAllowImageChange[4] = false;
|
||||
stateSequence[4] = "Reload";
|
||||
|
||||
stateName[5] = "NoAmmo";
|
||||
stateTransitionOnAmmo[5] = "Reload";
|
||||
stateSequence[5] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[5] = "DryFire";
|
||||
|
||||
stateName[6] = "DryFire";
|
||||
stateSound[6] = ChaingunDryFireSound;
|
||||
stateTimeoutValue[6] = 1.0;
|
||||
stateTransitionOnTimeout[6] = "NoAmmo";
|
||||
|
||||
stateName[7] = "WetFire";
|
||||
stateSound[7] = PlasmaFireWetSound;
|
||||
stateTimeoutValue[7] = 1.0;
|
||||
stateTransitionOnTimeout[7] = "Ready";
|
||||
|
||||
stateName[8] = "CheckWet";
|
||||
stateTransitionOnWet[8] = "WetFire";
|
||||
stateTransitionOnNotWet[8] = "Fire";
|
||||
};
|
||||
|
||||
datablock ItemData(M1SniperRifle)
|
||||
{
|
||||
className = Weapon;
|
||||
catagory = "Spawn Items";
|
||||
shapeFile = "weapon_sniper.dts";
|
||||
image = M1SniperRifleImage;
|
||||
mass = 1.0;
|
||||
elasticity = 0.0;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "a M1 Sniper Rifle";
|
||||
|
||||
computeCRC = true;
|
||||
emap = true;
|
||||
};
|
||||
|
||||
//Two images make the scope
|
||||
datablock ShapeBaseImageData(M1ScopeImage) : M1SniperRifleImage {
|
||||
shapeFile = "turret_belly_barrell.dts";
|
||||
offset = "0 0.25 0.25";
|
||||
rotation = "1 0 0 180";
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(M1ScopeImage2) : M1SniperRifleImage {
|
||||
shapeFile = "turret_belly_barrell.dts";
|
||||
offset = "0 0.3 0.25";
|
||||
rotation = "1 0 0 0";
|
||||
};
|
||||
|
||||
function M1SniperRifleImage::onMount(%this,%obj,%slot) {
|
||||
if(!$TWM2::AllowSnipers) {
|
||||
bottomPrint(%obj.client, "The host has disabled sniper weapons.", 2, 2);
|
||||
%obj.throwweapon(1);
|
||||
%obj.throwweapon(0);
|
||||
}
|
||||
Parent::onMount(%this, %obj, %slot);
|
||||
%obj.mountImage(M1ScopeImage, 5);
|
||||
%obj.mountImage(M1ScopeImage2, 6);
|
||||
}
|
||||
|
||||
function M1SniperRifleImage::onUnmount(%this,%obj,%slot) {
|
||||
Parent::onUnmount(%this, %obj, %slot);
|
||||
%obj.unmountImage(5);
|
||||
%obj.unmountImage(6);
|
||||
}
|
||||
|
||||
function M1SniperRifleImage::onFire(%data, %obj, %slot) {
|
||||
if(!$TWM2::AllowSnipers) {
|
||||
bottomPrint(%obj.client, "The host has disabled sniper weapons.", 2, 2);
|
||||
%obj.throwweapon(1);
|
||||
%obj.throwweapon(0);
|
||||
}
|
||||
%p = Parent::onFire(%data, %obj, %slot);
|
||||
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
|
||||
//zero sound :p
|
||||
}
|
||||
else {
|
||||
ServerPlay3d(M1FireSound, %obj.getPosition());
|
||||
}
|
||||
}
|
||||
267
scripts/weapons/Rifles/M4A1.cs
Normal file
267
scripts/weapons/Rifles/M4A1.cs
Normal file
|
|
@ -0,0 +1,267 @@
|
|||
datablock TracerProjectileData(M4A1Bullet) {
|
||||
doDynamicClientHits = true;
|
||||
|
||||
directDamage = 0.09;
|
||||
directDamageType = $DamageType::M4A1;
|
||||
explosion = "ChaingunExplosion";
|
||||
splash = ChaingunSplash;
|
||||
HeadMultiplier = 1.25;
|
||||
LegsMultiplier = 0.75;
|
||||
|
||||
kickBackStrength = 15.0;
|
||||
sound = ChaingunProjectile;
|
||||
|
||||
ImageSource = "M4A1Image";
|
||||
|
||||
dryVelocity = 1750.0;
|
||||
wetVelocity = 1500.0;
|
||||
velInheritFactor = 0.0;
|
||||
fizzleTimeMS = 3000;
|
||||
lifetimeMS = 3000;
|
||||
explodeOnDeath = false;
|
||||
reflectOnWaterImpactAngle = 0.0;
|
||||
explodeOnWaterImpact = false;
|
||||
deflectionOnWaterImpact = 0.0;
|
||||
fizzleUnderwaterMS = 3000;
|
||||
|
||||
tracerLength = 9.0;
|
||||
tracerAlpha = false;
|
||||
tracerMinPixels = 6;
|
||||
tracerColor = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
|
||||
tracerTex[0] = "special/tracer00";
|
||||
tracerTex[1] = "special/tracercross";
|
||||
tracerWidth = 0.09;
|
||||
crossSize = 0.20;
|
||||
crossViewAng = 0.990;
|
||||
renderCross = true;
|
||||
|
||||
decalData[0] = ChaingunDecal1;
|
||||
decalData[1] = ChaingunDecal2;
|
||||
decalData[2] = ChaingunDecal3;
|
||||
decalData[3] = ChaingunDecal4;
|
||||
decalData[4] = ChaingunDecal5;
|
||||
decalData[5] = ChaingunDecal6;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Ammo
|
||||
//--------------------------------------
|
||||
|
||||
datablock ItemData(M4A1Ammo)
|
||||
{
|
||||
className = Ammo;
|
||||
catagory = "Ammo";
|
||||
shapeFile = "ammo_chaingun.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "some M4A1 ammo";
|
||||
|
||||
computeCRC = true;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Weapon
|
||||
//--------------------------------------
|
||||
datablock ShapeBaseImageData(M4A1Image)
|
||||
{
|
||||
className = WeaponImage;
|
||||
shapeFile = "weapon_energy_vehicle.dts";
|
||||
item = M4A1;
|
||||
ammo = M4A1Ammo;
|
||||
projectile = M4A1Bullet;
|
||||
projectileType = TracerProjectile;
|
||||
emap = true;
|
||||
offset = "0 0.5 0"; // L/R - F/B - T/B
|
||||
rotation = "0 1 0 180";
|
||||
mass = 11;
|
||||
|
||||
//ClipStuff
|
||||
ClipName = "M4A1Clip";
|
||||
ClipPickupName["M4A1Clip"] = "some M4A1 Magazines";
|
||||
ShowsClipInHud = 1;
|
||||
ClipReloadTime = 4;
|
||||
ClipReturn = 30;
|
||||
InitialClips = 7;
|
||||
//
|
||||
HasChallenges = 1;
|
||||
ChallengeCt = 11;
|
||||
Challenge[1] = "M4A1 Killer\t50\t100\tGrip";
|
||||
Challenge[2] = "M4A1 Hunter\t100\t250\tLaser";
|
||||
Challenge[3] = "M4A1 Expert\t250\t500\tShotgun Attachment";
|
||||
Challenge[4] = "M4A1 Master\t500\t1000\tGrenade Launcher Attachment";
|
||||
Challenge[5] = "M4A1 Legend\t750\t1500\tMini-Launcher Attachment";
|
||||
Challenge[6] = "M4A1 God\t1000\t2000\tSilencer";
|
||||
Challenge[7] = "M4A1 Supremacy\t2500\t5000\tUnlimited Attachment Ammo";
|
||||
Challenge[8] = "M4A1 Bronze Commendation\t5000\t10000\tNone";
|
||||
Challenge[9] = "M4A1 Silver Commendation\t12500\t25000\tNone";
|
||||
Challenge[10] = "M4A1 Gold Commendation\t25000\t50000\tNone";
|
||||
Challenge[11] = "M4A1 Titan Commendation\t50000\t75000\tNone";
|
||||
Upgrade[1] = "Grip";
|
||||
Upgrade[2] = "Laser";
|
||||
Upgrade[3] = "Shotgun Attachment";
|
||||
Upgrade[4] = "Grenade Launcher Attachment";
|
||||
Upgrade[5] = "Mini-Launcher Attachment";
|
||||
Upgrade[6] = "Silencer";
|
||||
GunName = "M4A1 Assault Rifle";
|
||||
|
||||
RankRequire = $TWM2::RankRequire["M4A1"];
|
||||
|
||||
|
||||
casing = ShellDebris;
|
||||
shellExitDir = "1.0 0.3 1.0";
|
||||
shellExitOffset = "0.15 -0.56 -0.1";
|
||||
shellExitVariance = 15.0;
|
||||
shellVelocity = 3.0;
|
||||
|
||||
projectileSpread = 8.0 / 1000.0;
|
||||
|
||||
//--------------------------------------
|
||||
stateName[0] = "Activate";
|
||||
stateSequence[0] = "Activate";
|
||||
stateSound[0] = ChaingunSwitchSound;
|
||||
stateAllowImageChange[0] = false;
|
||||
//
|
||||
stateTimeoutValue[0] = 0.5;
|
||||
stateTransitionOnTimeout[0] = "Ready";
|
||||
stateTransitionOnNoAmmo[0] = "NoAmmo";
|
||||
|
||||
//--------------------------------------
|
||||
stateName[1] = "Ready";
|
||||
stateSpinThread[1] = Stop;
|
||||
//
|
||||
stateTransitionOnTriggerDown[1] = "Spinup";
|
||||
stateTransitionOnNoAmmo[1] = "NoAmmo";
|
||||
|
||||
//--------------------------------------
|
||||
stateName[2] = "NoAmmo";
|
||||
stateTransitionOnAmmo[2] = "Ready";
|
||||
stateSpinThread[2] = Stop;
|
||||
stateTransitionOnTriggerDown[2] = "DryFire";
|
||||
|
||||
//--------------------------------------
|
||||
stateName[3] = "Spinup";
|
||||
stateSpinThread[3] = SpinUp;
|
||||
stateSound[3] = ChaingunSpinupSound;
|
||||
//
|
||||
stateTimeoutValue[3] = 0.01;
|
||||
stateWaitForTimeout[3] = false;
|
||||
stateTransitionOnTimeout[3] = "Fire";
|
||||
stateTransitionOnTriggerUp[3] = "Spindown";
|
||||
|
||||
//--------------------------------------
|
||||
stateName[4] = "Fire";
|
||||
stateSequence[4] = "Fire";
|
||||
stateSequenceRandomFlash[4] = true;
|
||||
stateSpinThread[4] = FullSpeed;
|
||||
//stateSound[4] = ChaingunFireSound;
|
||||
stateRecoil[4] = LightRecoil;
|
||||
stateAllowImageChange[4] = false;
|
||||
stateScript[4] = "onFire";
|
||||
stateFire[4] = true;
|
||||
stateEjectShell[4] = true;
|
||||
//
|
||||
stateTimeoutValue[4] = 0.08;
|
||||
stateTransitionOnTimeout[4] = "Fire";
|
||||
stateTransitionOnTriggerUp[4] = "Spindown";
|
||||
stateTransitionOnNoAmmo[4] = "EmptySpindown";
|
||||
|
||||
//--------------------------------------
|
||||
stateName[5] = "Spindown";
|
||||
stateSound[5] = ChaingunSpinDownSound;
|
||||
stateSpinThread[5] = SpinDown;
|
||||
//
|
||||
stateTimeoutValue[5] = 0.05;
|
||||
stateWaitForTimeout[5] = true;
|
||||
stateTransitionOnTimeout[5] = "Ready";
|
||||
stateTransitionOnTriggerDown[5] = "Spinup";
|
||||
|
||||
//--------------------------------------
|
||||
stateName[6] = "EmptySpindown";
|
||||
stateSound[6] = ChaingunSpinDownSound;
|
||||
stateSpinThread[6] = SpinDown;
|
||||
//
|
||||
stateTimeoutValue[6] = 0.5;
|
||||
stateTransitionOnTimeout[6] = "NoAmmo";
|
||||
|
||||
//--------------------------------------
|
||||
stateName[7] = "DryFire";
|
||||
stateSound[7] = ChaingunDryFireSound;
|
||||
stateTimeoutValue[7] = 0.5;
|
||||
stateTransitionOnTimeout[7] = "NoAmmo";
|
||||
};
|
||||
|
||||
datablock ItemData(M4A1)
|
||||
{
|
||||
className = Weapon;
|
||||
catagory = "Spawn Items";
|
||||
shapeFile = "weapon_energy_vehicle.dts";
|
||||
image = M4A1Image;
|
||||
mass = 1.0;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "an M4A1";
|
||||
|
||||
computeCRC = true;
|
||||
emap = true;
|
||||
};
|
||||
|
||||
function M4A1::onInventory(%this,%obj,%amount) {
|
||||
Parent::onInventory(%this, %obj, %amount);
|
||||
%obj.canUseM4A1Attachment = 1;
|
||||
if(%obj.client.UpgradeOn("Shotgun Attachment", M4A1Image)) {
|
||||
%obj.M4A1ShotgunClip = 5;
|
||||
}
|
||||
if(%obj.client.UpgradeOn("Grenade Launcher Attachment", M4A1Image)) {
|
||||
%obj.M4A1GLClip = 3;
|
||||
}
|
||||
if(%obj.client.UpgradeOn("Mini-Launcher Attachment", M4A1Image)) {
|
||||
%obj.M4A1MLClip = 3;
|
||||
}
|
||||
}
|
||||
|
||||
datablock ShapeBaseImageData(M4A1BarrelImage) {
|
||||
ammo = M4A1Ammo;
|
||||
shapeFile = "weapon_targeting.dts";
|
||||
offset = "0.0 0.0 0.0";
|
||||
emap = true;
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(M4A1ScopeImage) {
|
||||
className = WeaponImage;
|
||||
shapeFile = "weapon_targeting.dts";
|
||||
offset = "0.0 1.4 0.4";
|
||||
rotation = "180 0 0 90";
|
||||
|
||||
ammo = M4A1Ammo;
|
||||
|
||||
emap = true;
|
||||
};
|
||||
|
||||
function M4A1Image::onMount(%this,%obj,%slot) {
|
||||
Parent::onMount(%this, %obj, %slot);
|
||||
%obj.mountImage(M4A1BarrelImage, 3);
|
||||
%obj.mountImage(M4A1ScopeImage, 4);
|
||||
}
|
||||
|
||||
function M4A1Image::onUnmount(%this,%obj,%slot) {
|
||||
Parent::onUnmount(%this, %obj, %slot);
|
||||
%obj.unmountImage(3);
|
||||
%obj.unmountImage(4);
|
||||
}
|
||||
|
||||
function M4A1Image::onFire(%data, %obj, %slot) {
|
||||
%p = Parent::onFire(%data, %obj, %slot);
|
||||
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
|
||||
//zero sound :p
|
||||
}
|
||||
else {
|
||||
ServerPlay3d(ChaingunFireSound, %obj.getPosition());
|
||||
}
|
||||
}
|
||||
|
||||
function M4A1RefreshAttachment(%obj) {
|
||||
%obj.canUseM4A1Attachment = 1;
|
||||
}
|
||||
176
scripts/weapons/Rifles/PulseRifle.cs
Normal file
176
scripts/weapons/Rifles/PulseRifle.cs
Normal file
|
|
@ -0,0 +1,176 @@
|
|||
datablock TracerProjectileData(PulseRifleBullet) {
|
||||
doDynamicClientHits = true;
|
||||
|
||||
directDamage = 0.2;
|
||||
explosion = "BlasterExplosion";
|
||||
splash = ChaingunSplash;
|
||||
|
||||
directDamageType = $DamageType::ShrikeBlaster;
|
||||
kickBackStrength = 0.0;
|
||||
|
||||
sound = ShrikeBlasterProjectileSound;
|
||||
|
||||
ImageSource = "PulseRifleImage";
|
||||
|
||||
dryVelocity = 425.0;
|
||||
wetVelocity = 100.0;
|
||||
velInheritFactor = 1.0;
|
||||
fizzleTimeMS = 1000;
|
||||
lifetimeMS = 1000;
|
||||
explodeOnDeath = false;
|
||||
reflectOnWaterImpactAngle = 0.0;
|
||||
explodeOnWaterImpact = false;
|
||||
deflectionOnWaterImpact = 0.0;
|
||||
fizzleUnderwaterMS = 3000;
|
||||
|
||||
tracerLength = 45.0;
|
||||
tracerAlpha = false;
|
||||
tracerMinPixels = 6;
|
||||
tracerColor = "1.0 0.0 0.0 0.0";
|
||||
tracerTex[0] = "special/shrikeBolt";
|
||||
tracerTex[1] = "special/shrikeBoltCross";
|
||||
tracerWidth = 0.55;
|
||||
crossSize = 0.99;
|
||||
crossViewAng = 0.990;
|
||||
renderCross = true;
|
||||
|
||||
};
|
||||
|
||||
datablock ItemData(PulseRifleAmmo)
|
||||
{
|
||||
className = Ammo;
|
||||
catagory = "Ammo";
|
||||
shapeFile = "ammo_chaingun.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "Some Pulse Rifle Bullets";
|
||||
|
||||
computeCRC = true;
|
||||
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(PulseRifleImage)
|
||||
{
|
||||
className = WeaponImage;
|
||||
shapeFile = "weapon_sniper.dts";
|
||||
mass = 10;
|
||||
item = PulseRifle;
|
||||
ammo = PulseRifleAmmo;
|
||||
projectile = PulseRifleBullet;
|
||||
projectileType = TracerProjectile;
|
||||
emap = true;
|
||||
|
||||
//ClipStuff
|
||||
ClipName = "PulseRifleClip";
|
||||
ClipPickupName["PulseRifleClip"] = "some Pulse Clip Cartons";
|
||||
ShowsClipInHud = 1;
|
||||
ClipReloadTime = 5;
|
||||
ClipReturn = 20;
|
||||
InitialClips = 7;
|
||||
//
|
||||
//Challenges
|
||||
HasChallenges = 1;
|
||||
ChallengeCt = 8;
|
||||
Challenge[1] = "Pulse Hunter\t75\t150\tNone";
|
||||
Challenge[2] = "Pulse Expert\t150\t250\tGrip";
|
||||
Challenge[3] = "Pulse Master\t350\t500\tLaser";
|
||||
Challenge[4] = "Pulse God\t600\t1000\tSilencer";
|
||||
Challenge[5] = "Pulse Bronze Commendation\t2500\t10000\tNone";
|
||||
Challenge[6] = "Pulse Silver Commendation\t5000\t25000\tNone";
|
||||
Challenge[7] = "Pulse Gold Commendation\t10000\t50000\tNone";
|
||||
Challenge[8] = "Pulse Titan Commendation\t25000\t75000\tNone";
|
||||
Upgrade[1] = "Grip";
|
||||
Upgrade[2] = "Laser";
|
||||
Upgrade[3] = "Silencer";
|
||||
GunName = "Pulse Semi-Automatic Rifle";
|
||||
//
|
||||
|
||||
RankRequire = $TWM2::RankRequire["G41"];
|
||||
PrestigeRequire = 2;
|
||||
|
||||
casing = ShellDebris;
|
||||
shellExitDir = "1.0 0.3 1.0";
|
||||
shellExitOffset = "0.15 -0.56 -0.1";
|
||||
shellExitVariance = 15.0;
|
||||
shellVelocity = 3.0;
|
||||
|
||||
projectileSpread = 2.0 / 1000.0;
|
||||
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnTimeout[0] = "ActivateReady";
|
||||
stateTimeoutValue[0] = 0.5;
|
||||
stateSequence[0] = "Activate";
|
||||
stateSound[0] = ChaingunSwitchSound;
|
||||
|
||||
stateName[1] = "ActivateReady";
|
||||
stateTransitionOnLoaded[1] = "Ready";
|
||||
stateTransitionOnNoAmmo[1] = "NoAmmo";
|
||||
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[2] = "CheckWet";
|
||||
|
||||
stateName[3] = "Fire";
|
||||
stateTransitionOnTimeout[3] = "Reload";
|
||||
stateTimeoutValue[3] = 0.01;
|
||||
stateFire[3] = true;
|
||||
stateRecoil[3] = LightRecoil;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateScript[3] = "onFire";
|
||||
stateEmitterTime[3] = 0.2;
|
||||
//stateSound[3] = S3FireSound;
|
||||
|
||||
stateName[4] = "Reload";
|
||||
stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||
stateTransitionOnTimeout[4] = "Ready";
|
||||
stateTimeoutValue[4] = 0.3;
|
||||
stateAllowImageChange[4] = false;
|
||||
stateSequence[4] = "Reload";
|
||||
|
||||
stateName[5] = "NoAmmo";
|
||||
stateTransitionOnAmmo[5] = "Reload";
|
||||
stateSequence[5] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[5] = "DryFire";
|
||||
|
||||
stateName[6] = "DryFire";
|
||||
stateSound[6] = ChaingunDryFireSound;
|
||||
stateTimeoutValue[6] = 1.0;
|
||||
stateTransitionOnTimeout[6] = "NoAmmo";
|
||||
|
||||
stateName[7] = "WetFire";
|
||||
stateSound[7] = PlasmaFireWetSound;
|
||||
stateTimeoutValue[7] = 1.0;
|
||||
stateTransitionOnTimeout[7] = "Ready";
|
||||
|
||||
stateName[8] = "CheckWet";
|
||||
stateTransitionOnWet[8] = "WetFire";
|
||||
stateTransitionOnNotWet[8] = "Fire";
|
||||
};
|
||||
|
||||
datablock ItemData(PulseRifle)
|
||||
{
|
||||
className = Weapon;
|
||||
catagory = "Spawn Items";
|
||||
shapeFile = "weapon_sniper.dts";
|
||||
image = PulseRifleImage;
|
||||
mass = 1.0;
|
||||
elasticity = 0.0;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "an Pulse Semi-Automatic Rifle";
|
||||
|
||||
computeCRC = true;
|
||||
emap = true;
|
||||
};
|
||||
|
||||
function PulseRifleImage::onFire(%data, %obj, %slot) {
|
||||
%p = Parent::onFire(%data, %obj, %slot);
|
||||
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
|
||||
//zero sound :p
|
||||
}
|
||||
else {
|
||||
ServerPlay3d(S3FireSound, %obj.getPosition());
|
||||
}
|
||||
}
|
||||
268
scripts/weapons/Rifles/R700Sniper.cs
Normal file
268
scripts/weapons/Rifles/R700Sniper.cs
Normal file
|
|
@ -0,0 +1,268 @@
|
|||
datablock AudioProfile(R700FireSound) {
|
||||
filename = "fx/weapons/cg_metal3.wav";
|
||||
description = AudioDefault3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock ParticleData(R700SmokeParticle)
|
||||
{
|
||||
dragCoeffiecient = 0.0;
|
||||
gravityCoefficient = -0.02;
|
||||
inheritedVelFactor = 0.1;
|
||||
|
||||
lifetimeMS = 1200;
|
||||
lifetimeVarianceMS = 100;
|
||||
|
||||
textureName = "particleTest";
|
||||
|
||||
useInvAlpha = false;
|
||||
spinRandomMin = -90.0;
|
||||
spinRandomMax = 90.0;
|
||||
|
||||
colors[0] = "1 1 1";
|
||||
colors[1] = "1 1 1";
|
||||
colors[2] = "1 1 1";
|
||||
sizes[0] = 1;
|
||||
sizes[1] = 1.2;
|
||||
sizes[2] = 1.4;
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.1;
|
||||
times[2] = 1.0;
|
||||
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(R700SmokeEmitter)
|
||||
{
|
||||
ejectionPeriodMS = 10;
|
||||
periodVarianceMS = 0;
|
||||
|
||||
ejectionVelocity = 1.5;
|
||||
velocityVariance = 0.3;
|
||||
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 50.0;
|
||||
|
||||
particles = "R700SmokeParticle";
|
||||
};
|
||||
|
||||
datablock LinearFlareProjectileData(R700Bullet)
|
||||
{
|
||||
projectileShapeName = "weapon_missile_projectile.dts";
|
||||
scale = "1.0 1.0 1.0";
|
||||
faceViewer = true;
|
||||
directDamage = 0.62;
|
||||
kickBackStrength = 6400;
|
||||
radiusDamageType = $DamageType::R700;
|
||||
|
||||
HeadMultiplier = 1.5;
|
||||
LegsMultiplier = 0.35;
|
||||
|
||||
HeadShotKill = 1;
|
||||
|
||||
ImageSource = "R700SniperRifleImage";
|
||||
|
||||
explosion = "ChaingunExplosion";
|
||||
splash = ChaingunSplash;
|
||||
|
||||
baseEmitter = R700SmokeEmitter;
|
||||
|
||||
dryVelocity = 2000.0;
|
||||
wetVelocity = 2000.0;
|
||||
velInheritFactor = 1.0;
|
||||
fizzleTimeMS = 1000;
|
||||
lifetimeMS = 1000;
|
||||
explodeOnDeath = false;
|
||||
reflectOnWaterImpactAngle = 0.0;
|
||||
explodeOnWaterImpact = false;
|
||||
deflectionOnWaterImpact = 0.0;
|
||||
fizzleUnderwaterMS = 3000;
|
||||
|
||||
//activateDelayMS = 100;
|
||||
activateDelayMS = -1;
|
||||
|
||||
size[0] = 0.2;
|
||||
size[1] = 0.5;
|
||||
size[2] = 0.1;
|
||||
|
||||
numFlares = 5; //less flares = less lag
|
||||
flareColor = "1 0.18 0.03";
|
||||
flareModTexture = "flaremod";
|
||||
flareBaseTexture = "flarebase";
|
||||
|
||||
hasLight = true;
|
||||
lightRadius = 10.0;
|
||||
lightColor = "0.94 0.03 0.12";
|
||||
};
|
||||
|
||||
datablock ItemData(R700SniperRifleAmmo)
|
||||
{
|
||||
className = Ammo;
|
||||
catagory = "Ammo";
|
||||
shapeFile = "ammo_chaingun.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "Some R700 Sniper Rifle Ammo";
|
||||
|
||||
computeCRC = true;
|
||||
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Weapon
|
||||
//--------------------------------------
|
||||
datablock ShapeBaseImageData(R700SniperRifleImage) {
|
||||
|
||||
className = WeaponImage;
|
||||
shapeFile = "weapon_sniper.dts";
|
||||
mass = 10;
|
||||
item = R700SniperRifle;
|
||||
ammo = R700SniperRifleAmmo;
|
||||
projectile = R700Bullet;
|
||||
projectileType = LinearFlareProjectile;
|
||||
emap = true;
|
||||
|
||||
armThread = looksn;
|
||||
|
||||
//ClipStuff
|
||||
ClipName = "R700Clip";
|
||||
ClipPickupName["R700Clip"] = "A Few Boxes Of R700 Sniper Bullets";
|
||||
ShowsClipInHud = 1;
|
||||
ClipReloadTime = 7;
|
||||
ClipReturn = 4;
|
||||
InitialClips = 6;
|
||||
//
|
||||
//Challenges
|
||||
HasChallenges = 1;
|
||||
ChallengeCt = 8;
|
||||
Challenge[1] = "R700 Hunter\t100\t150\tNone";
|
||||
Challenge[2] = "R700 Expert\t200\t250\tNone";
|
||||
Challenge[3] = "R700 Master\t500\t500\tLaser";
|
||||
Challenge[4] = "R700 God\t1000\t1000\tSilencer";
|
||||
Challenge[5] = "R700 Bronze Commendation\t2500\t10000\tNone";
|
||||
Challenge[6] = "R700 Silver Commendation\t5000\t25000\tNone";
|
||||
Challenge[7] = "R700 Gold Commendation\t10000\t50000\tNone";
|
||||
Challenge[8] = "R700 Titan Commendation\t25000\t75000\tNone";
|
||||
Upgrade[1] = "Laser";
|
||||
Upgrade[2] = "Silencer";
|
||||
GunName = "R700 Sniper Rifle";
|
||||
//
|
||||
|
||||
RankRequire = $TWM2::RankRequire["R700"];
|
||||
|
||||
casing = ShellDebris;
|
||||
shellExitDir = "1.0 0.3 1.0";
|
||||
shellExitOffset = "0.15 -0.56 -0.1";
|
||||
shellExitVariance = 15.0;
|
||||
shellVelocity = 3.0;
|
||||
|
||||
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnTimeout[0] = "ActivateReady";
|
||||
stateTimeoutValue[0] = 0.5;
|
||||
stateSequence[0] = "Activate";
|
||||
stateSound[0] = ChaingunSwitchSound;
|
||||
|
||||
stateName[1] = "ActivateReady";
|
||||
stateTransitionOnLoaded[1] = "Ready";
|
||||
stateTransitionOnNoAmmo[1] = "NoAmmo";
|
||||
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[2] = "CheckWet";
|
||||
|
||||
stateName[3] = "Fire";
|
||||
stateTransitionOnTimeout[3] = "Reload";
|
||||
stateTimeoutValue[3] = 0.01;
|
||||
stateFire[3] = true;
|
||||
stateRecoil[3] = LightRecoil;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateScript[3] = "onFire";
|
||||
//stateSound[3] = "R700FireSound";
|
||||
|
||||
stateName[4] = "Reload";
|
||||
stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||
stateTransitionOnTimeout[4] = "Ready";
|
||||
stateTimeoutValue[4] = 1.2;
|
||||
stateAllowImageChange[4] = false;
|
||||
stateSequence[4] = "Reload";
|
||||
|
||||
stateName[5] = "NoAmmo";
|
||||
stateTransitionOnAmmo[5] = "Reload";
|
||||
stateSequence[5] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[5] = "DryFire";
|
||||
|
||||
stateName[6] = "DryFire";
|
||||
stateSound[6] = ChaingunDryFireSound;
|
||||
stateTimeoutValue[6] = 1.0;
|
||||
stateTransitionOnTimeout[6] = "NoAmmo";
|
||||
|
||||
stateName[7] = "WetFire";
|
||||
stateSound[7] = PlasmaFireWetSound;
|
||||
stateTimeoutValue[7] = 1.0;
|
||||
stateTransitionOnTimeout[7] = "Ready";
|
||||
|
||||
stateName[8] = "CheckWet";
|
||||
stateTransitionOnWet[8] = "WetFire";
|
||||
stateTransitionOnNotWet[8] = "Fire";
|
||||
};
|
||||
|
||||
datablock ItemData(R700SniperRifle)
|
||||
{
|
||||
className = Weapon;
|
||||
catagory = "Spawn Items";
|
||||
shapeFile = "weapon_sniper.dts";
|
||||
image = R700SniperRifleImage;
|
||||
mass = 1.0;
|
||||
elasticity = 0.0;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "a R700 Sniper Rifle";
|
||||
|
||||
computeCRC = true;
|
||||
emap = true;
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(R700ScopeImage) {
|
||||
className = WeaponImage;
|
||||
shapeFile = "weapon_targeting.dts";
|
||||
offset = "0.0 1.0 0.4";
|
||||
rotation = "180 0 0 90";
|
||||
|
||||
ammo = R700SniperRifleAmmo;
|
||||
armThread = looksn;
|
||||
|
||||
emap = true;
|
||||
};
|
||||
|
||||
|
||||
function R700SniperRifleImage::onMount(%this,%obj,%slot) {
|
||||
if(!$TWM2::AllowSnipers) {
|
||||
bottomPrint(%obj.client, "The host has disabled sniper weapons.", 2, 2);
|
||||
%obj.throwweapon(1);
|
||||
%obj.throwweapon(0);
|
||||
}
|
||||
Parent::onMount(%this, %obj, %slot);
|
||||
%obj.mountImage(R700ScopeImage, 5);
|
||||
}
|
||||
|
||||
function R700SniperRifleImage::onUnmount(%this,%obj,%slot) {
|
||||
Parent::onUnmount(%this, %obj, %slot);
|
||||
%obj.unmountImage(5);
|
||||
}
|
||||
|
||||
function R700SniperRifleImage::onFire(%data, %obj, %slot) {
|
||||
if(!$TWM2::AllowSnipers) {
|
||||
bottomPrint(%obj.client, "The host has disabled sniper weapons.", 2, 2);
|
||||
%obj.throwweapon(1);
|
||||
%obj.throwweapon(0);
|
||||
}
|
||||
%p = Parent::onFire(%data, %obj, %slot);
|
||||
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
|
||||
//zero sound :p
|
||||
}
|
||||
else {
|
||||
ServerPlay3d(R700FireSound, %obj.getPosition());
|
||||
}
|
||||
}
|
||||
248
scripts/weapons/Rifles/RSALaserRifle.cs
Normal file
248
scripts/weapons/Rifles/RSALaserRifle.cs
Normal file
|
|
@ -0,0 +1,248 @@
|
|||
datablock AudioProfile(LaserRifleFireSound)
|
||||
{
|
||||
filename = "fx/weapons/sniper_fire.wav";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock ParticleData(RedFlareParticle)
|
||||
{
|
||||
dragCoeffiecient = 0.0;
|
||||
gravityCoefficient = 0.15;
|
||||
inheritedVelFactor = 0.5;
|
||||
|
||||
lifetimeMS = 1800;
|
||||
lifetimeVarianceMS = 200;
|
||||
|
||||
textureName = "special/flareSpark";
|
||||
|
||||
colors[0] = "1.0 1.0 1.0 1.0";
|
||||
colors[1] = "1.0 1.0 1.0 1.0";
|
||||
colors[2] = "1.0 1.0 1.0 0.0";
|
||||
|
||||
sizes[0] = 0.6;
|
||||
sizes[1] = 0.3;
|
||||
sizes[2] = 0.1;
|
||||
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.5;
|
||||
times[2] = 1.0;
|
||||
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(RedFlareemmiter)
|
||||
{
|
||||
ejectionPeriodMS = 10;
|
||||
periodVarianceMS = 0;
|
||||
|
||||
ejectionVelocity = 1.0;
|
||||
velocityVariance = 0.0;
|
||||
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 90.0;
|
||||
|
||||
orientParticles = true;
|
||||
orientOnVelocity = false;
|
||||
|
||||
particles = "RedFlareParticle";
|
||||
};
|
||||
|
||||
datablock LinearFlareProjectileData(LaserShot)
|
||||
{
|
||||
scale = "1.0 1.0 1.0";
|
||||
faceViewer = false;
|
||||
directDamage = 0.6;
|
||||
kickBackStrength = 100.0;
|
||||
directDamageType = $DamageType::LaserRifle;
|
||||
|
||||
explosion = "BlasterExplosion";
|
||||
splash = PlasmaSplash;
|
||||
|
||||
ImageSource = "lasergunImage";
|
||||
|
||||
dryVelocity = 200.0;
|
||||
wetVelocity = 10;
|
||||
velInheritFactor = 0.5;
|
||||
fizzleTimeMS = 30000;
|
||||
lifetimeMS = 30000;
|
||||
explodeOnDeath = false;
|
||||
reflectOnWaterImpactAngle = 0.0;
|
||||
explodeOnWaterImpact = true;
|
||||
deflectionOnWaterImpact = 0.0;
|
||||
fizzleUnderwaterMS = -1;
|
||||
|
||||
baseEmitter = RedFlareemmiter;
|
||||
delayEmitter = RedFlareemmiter;
|
||||
bubbleEmitter = RedFlareemmiter;
|
||||
|
||||
//activateDelayMS = 100;
|
||||
activateDelayMS = -1;
|
||||
|
||||
size[0] = 0.2;
|
||||
size[1] = 0.2;
|
||||
size[2] = 0.2;
|
||||
|
||||
|
||||
numFlares = 15;
|
||||
flareColor = "1 0 0";
|
||||
flareModTexture = "flaremod";
|
||||
flareBaseTexture = "flarebase";
|
||||
|
||||
sound = MissileProjectileSound;
|
||||
fireSound = PlasmaFireSound;
|
||||
wetFireSound = PlasmaFireWetSound;
|
||||
|
||||
hasLight = true;
|
||||
lightRadius = 3.0;
|
||||
lightColor = "1 0 0";
|
||||
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Ammo
|
||||
//--------------------------------------
|
||||
|
||||
datablock ItemData(lasergunAmmo)
|
||||
{
|
||||
className = Ammo;
|
||||
catagory = "Ammo";
|
||||
shapeFile = "ammo_chaingun.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "some laser rifle ammo";
|
||||
|
||||
computeCRC = true;
|
||||
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Weapon
|
||||
//--------------------------------------
|
||||
datablock ShapeBaseImageData(lasergunImage)
|
||||
{
|
||||
className = WeaponImage;
|
||||
shapeFile = "weapon_sniper.dts";
|
||||
item = lasergun;
|
||||
ammo = lasergunAmmo;
|
||||
projectile = LaserShot;
|
||||
projectileType = LinearFlareProjectile;
|
||||
emap = true;
|
||||
armThread = looksn;
|
||||
mass = 10;
|
||||
|
||||
casing = ShellDebris;
|
||||
shellExitDir = "1.0 0.3 1.0";
|
||||
shellExitOffset = "0.15 -0.56 -0.1";
|
||||
shellExitVariance = 15.0;
|
||||
shellVelocity = 3.0;
|
||||
|
||||
//ClipStuff
|
||||
ClipName = "lasergunClip";
|
||||
ClipPickupName["lasergunClip"] = "A Photonic Laser Battery";
|
||||
ShowsClipInHud = 1;
|
||||
ClipReloadTime = 6;
|
||||
ClipReturn = 10;
|
||||
InitialClips = 5;
|
||||
//
|
||||
//Challenges
|
||||
HasChallenges = 1;
|
||||
ChallengeCt = 8;
|
||||
Challenge[1] = "Laser Rifle Blaster\t100\t250\tNone";
|
||||
Challenge[2] = "Laser Rifle Expert\t250\t500\tGrip";
|
||||
Challenge[3] = "Laser Rifle Master\t750\t1000\tLaser";
|
||||
Challenge[4] = "Laser Rifle God\t1500\t2000\tSilencer";
|
||||
Challenge[5] = "Laser Rifle Bronze Commendation\t5000\t10000\tNone";
|
||||
Challenge[6] = "Laser Rifle Silver Commendation\t10000\t25000\tNone";
|
||||
Challenge[7] = "Laser Rifle Gold Commendation\t25000\t50000\tNone";
|
||||
Challenge[8] = "Laser Rifle Titan Commendation\t50000\t75000\tNone";
|
||||
Upgrade[1] = "Grip";
|
||||
Upgrade[2] = "Laser";
|
||||
Upgrade[3] = "Silencer";
|
||||
GunName = "RSA Laser Rifle";
|
||||
//
|
||||
|
||||
RankRequire = $TWM2::RankRequire["RSALaserRifle"];
|
||||
|
||||
maxSpread = 10.0 / 1000.0;
|
||||
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnTimeout[0] = "ActivateReady";
|
||||
stateTimeoutValue[0] = 0.5;
|
||||
stateSequence[0] = "Activate";
|
||||
stateSound[0] = ChaingunSwitchSound;
|
||||
|
||||
stateName[1] = "ActivateReady";
|
||||
stateTransitionOnLoaded[1] = "Ready";
|
||||
stateTransitionOnNoAmmo[1] = "NoAmmo";
|
||||
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[2] = "CheckWet";
|
||||
|
||||
stateName[3] = "Fire";
|
||||
stateTransitionOnTimeout[3] = "Reload";
|
||||
stateTimeoutValue[3] = 0.0001;
|
||||
stateFire[3] = true;
|
||||
stateEmitter[3] = "GunFireEffectEmitter";
|
||||
stateEmitterNode[3] = "muzzlepoint1";
|
||||
stateEmitterTime[3] = 1;
|
||||
stateRecoil[3] = LightRecoil;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateScript[3] = "onFire";
|
||||
stateEmitterTime[3] = 0.1;
|
||||
//stateSound[3] = LaserRifleFireSound;
|
||||
|
||||
stateName[4] = "Reload";
|
||||
stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||
stateTransitionOnTimeout[4] = "Ready";
|
||||
stateTimeoutValue[4] = 0.7;
|
||||
stateAllowImageChange[4] = false;
|
||||
stateSequence[4] = "Reload";
|
||||
|
||||
stateName[5] = "NoAmmo";
|
||||
stateTransitionOnAmmo[5] = "Reload";
|
||||
stateSequence[5] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[5] = "DryFire";
|
||||
|
||||
stateName[6] = "DryFire";
|
||||
stateSound[6] = ChaingunDryFireSound;
|
||||
stateTimeoutValue[6] = 0.2;
|
||||
stateTransitionOnTimeout[6] = "NoAmmo";
|
||||
|
||||
stateName[7] = "WetFire";
|
||||
stateSound[7] = ChaingunDryFireSound;
|
||||
stateTimeoutValue[7] = 0.2;
|
||||
stateTransitionOnTimeout[7] = "Ready";
|
||||
|
||||
stateName[8] = "CheckWet";
|
||||
stateTransitionOnWet[8] = "WetFire";
|
||||
stateTransitionOnNotWet[8] = "Fire";
|
||||
};
|
||||
|
||||
datablock ItemData(lasergun)
|
||||
{
|
||||
className = Weapon;
|
||||
catagory = "Spawn Items";
|
||||
shapeFile = "weapon_chaingun.dts";
|
||||
image = lasergunImage;
|
||||
mass = 1.0;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "a Laser Rifle";
|
||||
|
||||
computeCRC = true;
|
||||
emap = true;
|
||||
};
|
||||
|
||||
function lasergunImage::onFire(%data, %obj, %slot) {
|
||||
%p = Parent::onFire(%data, %obj, %slot);
|
||||
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
|
||||
//zero sound :p
|
||||
}
|
||||
else {
|
||||
ServerPlay3d(LaserRifleFireSound, %obj.getPosition());
|
||||
}
|
||||
}
|
||||
225
scripts/weapons/Rifles/S3.cs
Normal file
225
scripts/weapons/Rifles/S3.cs
Normal file
|
|
@ -0,0 +1,225 @@
|
|||
datablock AudioProfile(S3FireSound)
|
||||
{
|
||||
filename = "fx/vehicles/tank_chaingun.wav";
|
||||
description = AudioDefault3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock TracerProjectileData(S3Bullet)
|
||||
{
|
||||
doDynamicClientHits = true;
|
||||
|
||||
directDamage = 0.7;
|
||||
directDamageType = $DamageType::S3;
|
||||
explosion = "ChaingunExplosion";
|
||||
splash = ChaingunSplash;
|
||||
HeadMultiplier = 1.5;
|
||||
LegsMultiplier = 0.35;
|
||||
|
||||
HeadShotKill = 1;
|
||||
|
||||
kickBackStrength = 15.0;
|
||||
sound = ChaingunProjectile;
|
||||
|
||||
dryVelocity = 3000.0;
|
||||
wetVelocity = 2000.0;
|
||||
velInheritFactor = 1.0;
|
||||
fizzleTimeMS = 1000;
|
||||
lifetimeMS = 1000;
|
||||
explodeOnDeath = false;
|
||||
reflectOnWaterImpactAngle = 0.0;
|
||||
explodeOnWaterImpact = false;
|
||||
deflectionOnWaterImpact = 0.0;
|
||||
fizzleUnderwaterMS = 3000;
|
||||
|
||||
ImageSource = "S3RifleImage";
|
||||
|
||||
tracerLength = 20.0;
|
||||
tracerAlpha = false;
|
||||
tracerMinPixels = 6;
|
||||
tracerColor = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
|
||||
tracerTex[0] = "special/tracer00";
|
||||
tracerTex[1] = "special/tracercross";
|
||||
tracerWidth = 0.09;
|
||||
crossSize = 0.20;
|
||||
crossViewAng = 0.990;
|
||||
renderCross = true;
|
||||
|
||||
decalData[0] = ChaingunDecal1;
|
||||
decalData[1] = ChaingunDecal2;
|
||||
decalData[2] = ChaingunDecal3;
|
||||
decalData[3] = ChaingunDecal4;
|
||||
decalData[4] = ChaingunDecal5;
|
||||
decalData[5] = ChaingunDecal6;
|
||||
};
|
||||
|
||||
datablock ItemData(S3RifleAmmo)
|
||||
{
|
||||
className = Ammo;
|
||||
catagory = "Ammo";
|
||||
shapeFile = "ammo_chaingun.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "Some S3 Rifle Bullets";
|
||||
|
||||
computeCRC = true;
|
||||
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(S3RifleImage)
|
||||
{
|
||||
className = WeaponImage;
|
||||
shapeFile = "weapon_sniper.dts";
|
||||
mass = 10;
|
||||
item = S3Rifle;
|
||||
ammo = S3RifleAmmo;
|
||||
projectile = S3Bullet;
|
||||
projectileType = TracerProjectile;
|
||||
emap = true;
|
||||
|
||||
//ClipStuff
|
||||
ClipName = "S3RifleClip";
|
||||
ClipPickupName["S3RifleClip"] = "some S3 Clip Cartridges";
|
||||
ShowsClipInHud = 1;
|
||||
ClipReloadTime = 4;
|
||||
ClipReturn = 10;
|
||||
InitialClips = 6;
|
||||
//
|
||||
//Challenges
|
||||
HasChallenges = 1;
|
||||
ChallengeCt = 9;
|
||||
Challenge[1] = "S3 Killer\t50\t100\tNone";
|
||||
Challenge[2] = "S3 Extremist\t100\t150\tGrip";
|
||||
Challenge[3] = "S3 Expert\t250\t250\tLaser";
|
||||
Challenge[4] = "S3 Master\t500\t500\tSilencer";
|
||||
Challenge[5] = "S3 God\t1500\t1000\tBurst Clip";
|
||||
Challenge[6] = "S3 Bronze Commendation\t5000\t10000\tNone";
|
||||
Challenge[7] = "S3 Silver Commendation\t10000\t25000\tNone";
|
||||
Challenge[8] = "S3 Gold Commendation\t25000\t50000\tNone";
|
||||
Challenge[9] = "S3 Titan Commendation\t50000\t75000\tNone";
|
||||
Upgrade[1] = "Grip";
|
||||
Upgrade[2] = "Laser";
|
||||
Upgrade[3] = "Silencer";
|
||||
Upgrade[4] = "Burst Clip";
|
||||
GunName = "S3 Combat Rifle";
|
||||
//
|
||||
|
||||
casing = ShellDebris;
|
||||
shellExitDir = "1.0 0.3 1.0";
|
||||
shellExitOffset = "0.15 -0.56 -0.1";
|
||||
shellExitVariance = 15.0;
|
||||
shellVelocity = 3.0;
|
||||
|
||||
projectileSpread = 3.0 / 1000.0;
|
||||
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnTimeout[0] = "ActivateReady";
|
||||
stateTimeoutValue[0] = 0.5;
|
||||
stateSequence[0] = "Activate";
|
||||
stateSound[0] = ChaingunSwitchSound;
|
||||
|
||||
stateName[1] = "ActivateReady";
|
||||
stateTransitionOnLoaded[1] = "Ready";
|
||||
stateTransitionOnNoAmmo[1] = "NoAmmo";
|
||||
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[2] = "CheckWet";
|
||||
|
||||
stateName[3] = "Fire";
|
||||
stateTransitionOnTimeout[3] = "Reload";
|
||||
stateTimeoutValue[3] = 0.01;
|
||||
stateFire[3] = true;
|
||||
stateRecoil[3] = LightRecoil;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateScript[3] = "onFire";
|
||||
stateEmitterTime[3] = 0.2;
|
||||
//stateSound[3] = S3FireSound;
|
||||
|
||||
stateName[4] = "Reload";
|
||||
stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||
stateTransitionOnTimeout[4] = "Ready";
|
||||
stateTimeoutValue[4] = 0.9;
|
||||
stateAllowImageChange[4] = false;
|
||||
stateSequence[4] = "Reload";
|
||||
|
||||
stateName[5] = "NoAmmo";
|
||||
stateTransitionOnAmmo[5] = "Reload";
|
||||
stateSequence[5] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[5] = "DryFire";
|
||||
|
||||
stateName[6] = "DryFire";
|
||||
stateSound[6] = ChaingunDryFireSound;
|
||||
stateTimeoutValue[6] = 1.0;
|
||||
stateTransitionOnTimeout[6] = "NoAmmo";
|
||||
|
||||
stateName[7] = "WetFire";
|
||||
stateSound[7] = PlasmaFireWetSound;
|
||||
stateTimeoutValue[7] = 1.0;
|
||||
stateTransitionOnTimeout[7] = "Ready";
|
||||
|
||||
stateName[8] = "CheckWet";
|
||||
stateTransitionOnWet[8] = "WetFire";
|
||||
stateTransitionOnNotWet[8] = "Fire";
|
||||
};
|
||||
|
||||
datablock ItemData(S3Rifle)
|
||||
{
|
||||
className = Weapon;
|
||||
catagory = "Spawn Items";
|
||||
shapeFile = "weapon_sniper.dts";
|
||||
image = S3RifleImage;
|
||||
mass = 1.0;
|
||||
elasticity = 0.0;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "an S3 Combat Rifle";
|
||||
|
||||
computeCRC = true;
|
||||
emap = true;
|
||||
};
|
||||
|
||||
function S3RifleImage::OnFire(%data, %obj, %slot) {
|
||||
if(%obj.client.UpgradeOn("Burst Clip", %data.getName())) {
|
||||
|
||||
%spread = %data.projectileSpread;
|
||||
if(%obj.client !$= "") {
|
||||
if(%obj.client.IsActivePerk("Advanced Grip")) {
|
||||
%spread = %spread / 2.5;
|
||||
}
|
||||
}
|
||||
|
||||
%vec2 = %obj.getMuzzleVector(%slot);
|
||||
%x = (getRandom() - 0.5) * 2 * 3.1415926 * %spread;
|
||||
%y = (getRandom() - 0.5) * 2 * 3.1415926 * %spread;
|
||||
%z = (getRandom() - 0.5) * 2 * 3.1415926 * %spread;
|
||||
%mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
|
||||
%vector2 = MatrixMulVector(%mat, %vec2);
|
||||
|
||||
%vec3 = %obj.getMuzzleVector(%slot);
|
||||
%x = (getRandom() - 0.5) * 2 * 3.1415926 * %spread;
|
||||
%y = (getRandom() - 0.5) * 2 * 3.1415926 * %spread;
|
||||
%z = (getRandom() - 0.5) * 2 * 3.1415926 * %spread;
|
||||
%mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
|
||||
%vector3 = MatrixMulVector(%mat, %vec3);
|
||||
|
||||
%p1 = Parent::OnFire(%data, %obj, %slot);
|
||||
|
||||
%p2 = Schedule(100, 0, "spawnprojectile", %data.Projectile, %data.ProjectileType, vectorAdd(%obj.getPosition(), "-.45 0 1.4"), %vector2, %obj);
|
||||
%p2.WeaponImageSource = "S3RifleImage";
|
||||
schedule(100, 0, "ServerPlay3D", "S3FireSound", %obj.getPosition());
|
||||
|
||||
%p3 = Schedule(250, 0, "spawnprojectile", %data.Projectile, %data.ProjectileType, vectorAdd(%obj.getPosition(), "-.45 0 1.4"), %vector3, %obj);
|
||||
%p3.WeaponImageSource = "S3RifleImage";
|
||||
schedule(250, 0, "ServerPlay3D", "S3FireSound", %obj.getPosition());
|
||||
}
|
||||
else if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
|
||||
%p = Parent::OnFire(%data, %obj, %slot);
|
||||
}
|
||||
else {
|
||||
%p = Parent::OnFire(%data, %obj, %slot);
|
||||
serverPlay3d(S3FireSound, %obj.getPosition());
|
||||
}
|
||||
}
|
||||
176
scripts/weapons/Rifles/S3S.cs
Normal file
176
scripts/weapons/Rifles/S3S.cs
Normal file
|
|
@ -0,0 +1,176 @@
|
|||
datablock TracerProjectileData(S3SBullet) {
|
||||
doDynamicClientHits = true;
|
||||
|
||||
directDamage = 0.45;
|
||||
directDamageType = $DamageType::S3;
|
||||
explosion = "ChaingunExplosion";
|
||||
splash = ChaingunSplash;
|
||||
HeadMultiplier = 1.5;
|
||||
LegsMultiplier = 0.35;
|
||||
|
||||
HeadShotKill = 1;
|
||||
|
||||
kickBackStrength = 15.0;
|
||||
sound = ChaingunProjectile;
|
||||
|
||||
ImageSource = "S3SRifleImage";
|
||||
|
||||
dryVelocity = 3000.0;
|
||||
wetVelocity = 2000.0;
|
||||
velInheritFactor = 1.0;
|
||||
fizzleTimeMS = 1000;
|
||||
lifetimeMS = 1000;
|
||||
explodeOnDeath = false;
|
||||
reflectOnWaterImpactAngle = 0.0;
|
||||
explodeOnWaterImpact = false;
|
||||
deflectionOnWaterImpact = 0.0;
|
||||
fizzleUnderwaterMS = 3000;
|
||||
|
||||
tracerLength = 20.0;
|
||||
tracerAlpha = false;
|
||||
tracerMinPixels = 6;
|
||||
tracerColor = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
|
||||
tracerTex[0] = "special/tracer00";
|
||||
tracerTex[1] = "special/tracercross";
|
||||
tracerWidth = 0.09;
|
||||
crossSize = 0.20;
|
||||
crossViewAng = 0.990;
|
||||
renderCross = true;
|
||||
|
||||
decalData[0] = ChaingunDecal1;
|
||||
decalData[1] = ChaingunDecal2;
|
||||
decalData[2] = ChaingunDecal3;
|
||||
decalData[3] = ChaingunDecal4;
|
||||
decalData[4] = ChaingunDecal5;
|
||||
decalData[5] = ChaingunDecal6;
|
||||
};
|
||||
|
||||
datablock ItemData(S3SRifleAmmo)
|
||||
{
|
||||
className = Ammo;
|
||||
catagory = "Ammo";
|
||||
shapeFile = "ammo_chaingun.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "Some S3S Rifle Bullets";
|
||||
|
||||
computeCRC = true;
|
||||
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(S3SRifleImage)
|
||||
{
|
||||
className = WeaponImage;
|
||||
shapeFile = "weapon_sniper.dts";
|
||||
mass = 10;
|
||||
item = S3SRifle;
|
||||
ammo = S3SRifleAmmo;
|
||||
projectile = S3SBullet;
|
||||
projectileType = TracerProjectile;
|
||||
emap = true;
|
||||
|
||||
//ClipStuff
|
||||
ClipName = "S3SRifleClip";
|
||||
ClipPickupName["S3SRifleClip"] = "some S3S Clip Cartridges";
|
||||
ShowsClipInHud = 1;
|
||||
ClipReloadTime = 4;
|
||||
ClipReturn = 30;
|
||||
InitialClips = 6;
|
||||
//
|
||||
|
||||
casing = ShellDebris;
|
||||
shellExitDir = "1.0 0.3 1.0";
|
||||
shellExitOffset = "0.15 -0.56 -0.1";
|
||||
shellExitVariance = 15.0;
|
||||
shellVelocity = 3.0;
|
||||
|
||||
projectileSpread = 2.0 / 1000.0;
|
||||
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnTimeout[0] = "ActivateReady";
|
||||
stateTimeoutValue[0] = 0.5;
|
||||
stateSequence[0] = "Activate";
|
||||
stateSound[0] = ChaingunSwitchSound;
|
||||
|
||||
stateName[1] = "ActivateReady";
|
||||
stateTransitionOnLoaded[1] = "Ready";
|
||||
stateTransitionOnNoAmmo[1] = "NoAmmo";
|
||||
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[2] = "CheckWet";
|
||||
|
||||
stateName[3] = "Fire";
|
||||
stateTransitionOnTimeout[3] = "Fire2";
|
||||
stateTimeoutValue[3] = 0.04;
|
||||
stateFire[3] = true;
|
||||
stateRecoil[3] = LightRecoil;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateScript[3] = "onFire";
|
||||
stateEmitterTime[3] = 0.2;
|
||||
stateSound[3] = S3FireSound;
|
||||
|
||||
stateName[4] = "Fire2";
|
||||
stateTransitionOnTimeout[4] = "Fire3";
|
||||
stateTimeoutValue[4] = 0.04;
|
||||
stateFire[4] = true;
|
||||
stateRecoil[4] = LightRecoil;
|
||||
stateAllowImageChange[4] = false;
|
||||
stateScript[4] = "onFire";
|
||||
stateEmitterTime[4] = 0.2;
|
||||
stateSound[4] = S3FireSound;
|
||||
|
||||
stateName[5] = "Fire3";
|
||||
stateTransitionOnTimeout[5] = "Reload";
|
||||
stateTimeoutValue[5] = 0.04;
|
||||
stateFire[5] = true;
|
||||
stateRecoil[5] = LightRecoil;
|
||||
stateAllowImageChange[5] = false;
|
||||
stateScript[5] = "onFire";
|
||||
stateEmitterTime[5] = 0.2;
|
||||
stateSound[5] = S3FireSound;
|
||||
|
||||
stateName[6] = "Reload";
|
||||
stateTransitionOnNoAmmo[6] = "NoAmmo";
|
||||
stateTransitionOnTimeout[6] = "Ready";
|
||||
stateTimeoutValue[6] = 0.9;
|
||||
stateAllowImageChange[6] = false;
|
||||
stateSequence[6] = "Reload";
|
||||
|
||||
stateName[7] = "NoAmmo";
|
||||
stateTransitionOnAmmo[7] = "Reload";
|
||||
stateSequence[7] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[7] = "DryFire";
|
||||
|
||||
stateName[8] = "DryFire";
|
||||
stateSound[8] = ChaingunDryFireSound;
|
||||
stateTimeoutValue[8] = 1.0;
|
||||
stateTransitionOnTimeout[8] = "NoAmmo";
|
||||
|
||||
stateName[9] = "WetFire";
|
||||
stateSound[9] = PlasmaFireWetSound;
|
||||
stateTimeoutValue[9] = 1.0;
|
||||
stateTransitionOnTimeout[9] = "Ready";
|
||||
|
||||
stateName[10] = "CheckWet";
|
||||
stateTransitionOnWet[10] = "WetFire";
|
||||
stateTransitionOnNotWet[10] = "Fire";
|
||||
};
|
||||
|
||||
datablock ItemData(S3SRifle)
|
||||
{
|
||||
className = Weapon;
|
||||
catagory = "Spawn Items";
|
||||
shapeFile = "weapon_sniper.dts";
|
||||
image = S3SRifleImage;
|
||||
mass = 1.0;
|
||||
elasticity = 0.0;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "an S3S Combat Rifle";
|
||||
|
||||
computeCRC = true;
|
||||
emap = true;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue