Game Crashes when Killed while ADS
Posted: Wed Dec 18, 2013 11:43 pm
Recently, I was able to implement the Black Ops 2 weapons into Project 115 with full success. But when I get killed while aiming down the sights, the game crashes
. I'm not sure what the problem is here , but if anyone can help, that would be great.
Code: Select all
ACTOR Type25 : Weapon 20006
{
Spawnid 202
Weapon.AmmoType "Type25Ammo"
Weapon.AmmoGive 999
Weapon.AmmoUse 1
Weapon.SlotNumber 5
Inventory.PickupSound "misc/w_pkup"
AttackSound "weapons/TYPE25"
Decal "BulletChip"
+NOAUTOFIRE
States
{
Spawn:
MGU3 A -1
Loop
Ready:
TPH1 A 1 A_WeaponReady
Loop
Deselect:
TPH1 A 1 A_Lower
Loop
Select:
TPH1 A 1 A_Raise
Loop
Fire:
TPH1 A 0 A_SetPitch (pitch-2.0)
TPH1 A 1 A_GunFlash
TPH1 B 2 A_FireBullets(5, 1, 1, 2, 0, 1)
TPH1 A 1 A_ReFire
goto Ready
AltFire:
TPH1 B 0 A_GiveInventory("sightsType25")
TPH1 B 0 A_SelectWeapon("sightsType25")
TPH1 A 0 A_Lower
Loop
}
}
actor sightsType25 : Weapon 20007
{
Decal "BulletChip"
Weapon.AmmoType "Type25Ammo"
Weapon.AmmoGive 999
Weapon.AmmoUse 1
AttackSound "weapons/TYPE25"
Weapon.AmmoGive 0
States
{
Select:
TPH1 C 0 A_ZoomFactor(1.5)
TPH1 C 1 A_Raise
Loop
Ready:
TPH1 C 1 A_WeaponReady
Loop
AltFire:
TPH1 C 0 A_ZoomFactor(1.5)
TPH1 C 0 A_Takeinventory("sightsType25")
TPH1 C 1 A_SelectWeapon("Type25")
Goto Deselect
Deselect:
TPH1 C 0 A_Lower
Loop
Fire:
TPH1 C 0 A_SetPitch (pitch-1.4)
TPH1 C 1 A_GunFlash
TPH1 D 2 A_FireBullets(2, 1, 1, 2, 0, 1)
TPH1 C 1 A_ReFire
Goto Ready
}
}