Downloads containing SEminimirv-mlle.asc

Downloads
Name Author Game Mode Rating
Custom Weapons...Featured Download Violet CLM Other 10 Download file

File preview

#pragma require "SEminimirv.asc"
#include "SEminimirv.asc"

shared interface MLLEWeaponApply { bool Apply(uint, se::WeaponHook@ = null, jjSTREAM@ = null, uint8 = 0); }
namespace se {
	class MiniMirvMLLEWrapper : MiniMirvWeapon, MLLEWeaponApply {
		bool Apply(uint number, se::WeaponHook@ weaponHook = null, jjSTREAM@ = null, uint8 ammo15EventID = 0) {
			if (getAnimSet() is null) {
				uint8 animSetID = 0;
				while (jjAnimSets[ANIM::CUSTOM[animSetID]] != 0)
					++animSetID;
				loadAnims(jjAnimSets[ANIM::CUSTOM[animSetID]]);
			}
			
			if (getSamples()[0] == SOUND::AMMO_MISSILE) {
				array<SOUND::Sample> samples;
				int sampleID = SOUND::BAT_BATFLY1;
				while (samples.length < 2 ) { //can't use getSampleCount() because MiniMirvWeapon incorrectly returns 1
					while (jjSampleIsLoaded(SOUND::Sample(sampleID)))
						++sampleID;
					samples.insertLast(SOUND::Sample(sampleID++));
				}
				loadSamples(samples);
			}
			
			if (ammo15EventID != 0) {
				jjOBJ@ ammo15 = @jjObjectPresets[ammo15EventID];
				ammo15.curAnim = getAnimSet() + 2;
				ammo15.frameID = 0;
				ammo15.determineCurFrame();
			}
			
			return setAsWeapon(number, weaponHook);
		}
	}
}