Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
void weapon_shotgun::Fire() {
float ammoClip;
if ( WEAPON_NETRELOAD ) {
WEAPON_NETRELOAD = false;
weaponState( "Reload", SHOTGUN_IDLE_TO_RELOAD );
}
next_attack = sys.getTime() + SHOTGUN_FIRERATE;
ammoClip = ammoInClip();
//Bottom modified by Kronchev - semi-auto weapon operation :)
if ( WEAPON_ATTACK ) {
if ( ammoClip == SHOTGUN_LOWAMMO ) {
startSound( "snd_lowammo", SND_CHANNEL_ITEM, true );
}
launchProjectiles( SHOTGUN_NUMPROJECTILES, spread, 0, 1.0, 1.0 );
1.0);
playAnim( ANIMCHANNEL_ALL, "fire" );
//waitUntil( animDone( ANIMCHANNEL_ALL, PISTOL_FIRE_TO_IDLE ) );
waitUntil(!WEAPON_ATTACK);
weaponState( "Idle", SHOTGUN_FIRE_TO_IDLE );
}
//end kronchev's modifications
}
#define SHOTGUN_FIRERATE 1.333[CODE]
and change that number there to the amount of time you want 1 shot to take up in seconds. you could, for example, set this number to 0.01. Then the player could fire the shotgun (theoretically) up to 100 times per second.
Error: file script/weapon_shotgun.script, line 139: expected ';', found ')'