Strange lockup
Posted: Sun Dec 04, 2005 2:08
However, lately when kicking using my unarmed weapon GZDoom locks up and is really hard to close. This used to happen when a weapon would go into an infinite loop from jumping but I cannot figure out why it does this in my unarmed weapon, as it happens intermittedly.
Here's the DECORATE code...
I do recall trying to kick at a Cacodemon when it happened, however, and also Lord Mattus reported a caco lockup when he fired his BFG25K at it. Perhaps the lockup is somehow related to the caco?
EDIT: When the lockup occured the caco was firing at me as well. My kick had just reached full length.
Here's the DECORATE code...
Code: Select all
ACTOR Unarmed : Weapon
{
Inventory.PickupSound "misc/w_pkup"
Inventory.PickupMessage "If you see this you are dumb -Xaser"
AttackSound "weapons/thud"
+MELEEWEAPON
+NOALERT
Weapon.Kickback 100
States
{
Select:
PUN2 A 0 A_TakeInventory("Kick")
PUN2 A 0 A_Raise
PUN2 A 0 A_Raise
PUN2 A 1 A_Raise
Loop
Deselect:
PUN2 A 0 A_Lower
PUN2 A 0 A_Lower
PUN2 A 1 A_Lower
Loop
Ready:
PUN2 A -1 A_WeaponReady
Fire:
PUN2 A 2
PUN2 B 0 A_Refire
PUN2 C 2
PUN2 D 0 A_FireCustomMissile("KingOfFlames",0,0,0,0)
PUN2 D 0 A_JumpIfInventory("PowerStrength",1,2)
PUN2 D 2 A_CustomPunch(10,1,0,1)
Goto Fire + 7
PUN2 D 2 A_CustomPunch(200,1,0,1)
PUN2 C 2 A_GiveInventory("HookCharge",99)
PUN2 B 4 A_Refire
PUN2 A 0 A_TakeInventory("HookCharge",99)
Goto Ready
Hold:
PUN2 B 0 A_JumpIfInventory("HookCharge",0,4)
PUN2 A 1 A_GiveInventory("HookCharge",1)
PUN2 B 0 A_Refire
PUN2 B 0 A_JumpIfInventory("HookCharge",0,3)
Goto Fire + 2
PUN2 B 1
PUN2 B 0 A_Refire
PUN2 EF 2
PUN2 G 0 A_FireCustomMissile("KingOfFlames",0,0,0,0)
PUN2 G 0 A_JumpIfInventory("PowerStrength",1,2)
PUN2 G 1 A_CustomPunch(30,1,0,1)
Goto Hold + 13
PUN2 G 1 A_CustomPunch(400,1,0,1)
PUN2 H 2
PUN2 I 8
PUN2 H 2
PUN2 GF 3
PUN2 E 3 A_Refire
PUN2 E 0 A_TakeInventory("HookCharge",99)
Goto Ready
AltFire:
TNT1 A 0 A_GiveInventory("Kick")
TNT1 A 0 A_SelectWeapon("Kick")
Goto Ready
}
}
ACTOR Kick : Unarmed
{
Weapon.kickback 99999999
States
{
Select:
TNT1 A 0 A_Raise
Loop
Deselect:
TNT1 A 0 SetPlayerProperty(0,0,0)
TNT1 A 0 A_Lower
Loop
Ready:
TNT1 A 0
Fire:
PUN3 A 0 A_JumpIfInventory("PowerStrength",1,6)
PUN3 A 5 A_GunFlash
PUN3 B 0 A_FireCustomMissile("KingOfFlames",0,0,0,0)
PUN3 B 9 A_CustomPunch(1,0,0,1,70)
PUN3 A 5 A_SelectWeapon("Unarmed")
Goto Deselect
Hold:
PUN3 A 3
PUN3 B 0 A_FireCustomMissile("KingOfFlames",0,0,0,0)
PUN3 B 5 A_CustomPunch(10,0,0,1,70)
PUN3 A 4 A_SelectWeapon("Unarmed")
Goto Deselect
Flash:
TNT1 A 12 SetPlayerProperty(0,1,0)
TNT1 A 1 SetPlayerProperty(0,0,0)
Stop
}
}
ACTOR KingOfFlames //yes I am naming my projectiles after ZDoom.org people
{
Health 1000
Radius 1
Height 1
Speed 0
Damage 0
Mass 1
PROJECTILE
States
{
Spawn:
Death:
NULL AA 1 A_AlertMonsters
Stop
}
}
ACTOR HookCharge : Inventory
{
Inventory.Amount 1
Inventory.MaxAmount 6
}
EDIT: When the lockup occured the caco was firing at me as well. My kick had just reached full length.