[r89]GZDoom crashes when using my custom flashlight

Bugs that have been resolved.

Moderator: Graf Zahl

Locked
DoomerMrT
Posts: 91
Joined: Thu Aug 09, 2007 19:07

[r89]GZDoom crashes when using my custom flashlight

Post by DoomerMrT »

Here's the situation: I've made a flashlight long time ago, it was perfectly compatible with 1.1.0 but when I am using it for several secs in r89, the game crashes with the report sending message.
The flashlight shoots bullets, and the bullet puff has a dynamic light assigned to it what does the flashlight feeling.

DECORATE:

[spoiler]actor Flashlight : DoomWeapon 3119
{
Game Doom
Weapon.SelectionOrder 8000
Weapon.AmmoUse 0
Weapon.AmmoGive 0
Weapon.AmmoType "None"
+WEAPON.NOALERT
States
{
Ready:
TNT1 A 1 A_WeaponReady
Loop
Deselect:
TNT1 A 1 A_Lower
Loop
Select:
TNT1 A 1 A_Raise
Loop
Fire:
TNT1 A 1 A_FireBullets(0,0,1,0,"DummyPuff",0,2048)
Goto Ready
Spawn:
MGUN A -1
Stop
}
}[/spoiler]
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Please post a WAD that contains everything related to the weapon, i.e. the puff and the dynamic light as well. This is not enough to test it.
DoomerMrT
Posts: 91
Joined: Thu Aug 09, 2007 19:07

Post by DoomerMrT »

Ok, these left only:

DECORATE:

[spoiler]actor Flashlight : DoomWeapon 3119
{
Game Doom
Weapon.SelectionOrder 8000
Weapon.AmmoUse 0
Weapon.AmmoGive 0
Weapon.AmmoType "None"
+WEAPON.NOALERT
States
{
Ready:
TNT1 A 1 A_WeaponReady
Loop
Deselect:
TNT1 A 1 A_Lower
Loop
Select:
TNT1 A 1 A_Raise
Loop
Fire:
TNT1 A 1 A_FireBullets(0,0,1,0,"DummyPuff",0,2048)
Goto Ready
Spawn:
MGUN A -1
Stop
}
}




ACTOR None : Ammo
{
Inventory.MaxAmount 0
}



actor DummyPuff
{
renderstyle Translucent
alpha 0.5
+NOBLOCKMAP
+NOGRAVITY
-ALLOWPARTICLES
+BLOODLESSIMPACT
+PUFFONACTORS
states
{
Spawn:
NULL A 1 bright
Melee:
NULL A 1
stop
}
}[/spoiler]


KEYCONF:


[spoiler]addmenukey "Flashlight" lamp
alias lamp "use Flashlight"
defaultbind f lamp[/spoiler]


GLDEFS:

[spoiler]object DummyPuff
{
frame NULL { light FLSH }
}


pointlight FLSH
{
color 1.0 1.0 1.0
size 32
offset 0 0 0
}[/spoiler]

EDIT:While making the example wad and testing it in Doom2 maps, the crash did not happened.Strange.Perhaps something is wrong in my wad.
Whoo
Posts: 32
Joined: Sun Feb 03, 2008 23:28

Post by Whoo »

Well it may be the way you are defining the flashlight. Here's a code that seems to work very well as a flashlight.

Decorate
[spoiler]ACTOR Flashlight : Weapon 13370
{
+NOALERT
weapon.selectionorder 3000
States
{
ready:
FLAS B 0 A_FireBullets(0, 0, 1, 0, "LightPuff", 0)
FLAS A 1 A_WeaponReady
loop
deselect:
FLAS A 1 A_Lower
loop
select:
FLAS A 1 A_Raise
loop
fire:
FLAS B 1 A_AlertMonsters
FLAS B 1 A_ReFire
goto ready
}
}

ACTOR LightPuff : BulletPuff
{
+NOBLOCKMAP
+NOGRAVITY
+NOBLOOD
-BLOODSPLATTER
+BLOODLESSIMPACT
alpha 0.5
States
{
spawn:
TNT1 A 4 bright
melee:
TNT1 A 4
goto death
}
}[/spoiler]

Keyconf:
[spoiler]setslot 1 Flashlight[/spoiler]

GLDEFS:
[spoiler]pointlight FLASHLIGHTGL
{
color 0.8 0.9 0.4
size 20
subtractive 0
}

object LightPuff
{
frame TNT1 { light FLASHLIGHTGL }
}[/spoiler]

After that you get a cool looking flashlight:

Image
DoomerMrT
Posts: 91
Joined: Thu Aug 09, 2007 19:07

Post by DoomerMrT »

Thanks for the code, will check it out
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

I wonder if it is the same bug as this one?

http://forum.drdteam.org/viewtopic.php?t=3265
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

It is.
Locked

Return to “Closed Bugs”