View Issue Details

IDProjectCategoryView StatusLast Update
0003128The Dark ModScript/Defpublic09.03.2013 16:19
ReporterSpringheel Assigned Tograyman  
PrioritynormalSeveritynormalReproducibilityalways
Status resolvedResolutionfixed 
Product VersionTDM 1.08 
Target VersionTDM 2.00Fixed in VersionTDM 2.00 
Summary0003128: Movable Oil lamps behave strangely
DescriptionThe two movable oil lamps that can be turned on and off behave strangely.

Pick one up and hit "use". The light goes off. Hit use again, the light comes on. So far so good. But hit use again, and the lamp jumps forward in the grabber with no change in the light. After that, hitting use just causes a "grunt" sound, the same one you get when trying to drop a body without any room.
TagsNo tags attached.

Activities

grayman

grayman

18.05.2012 18:35

viewer   ~0004588

Last edited: 18.05.2012 18:35

Why do we allow the behavior of turning the oil lamp back on by hitting the USE key?

I thought the player needed a slowmatch or some other flame source to turn non-electric lights back on.

Springheel

Springheel

22.05.2012 22:53

administrator   ~0004610

I presume it's not really turning the flame off, but just turning it down so low it doesn't create any noticable light.
grayman

grayman

19.12.2012 00:02

viewer   ~0004971

Last edited: 19.12.2012 00:03

There a number of issues here.

1 - There's no "skin" or "skin_lit" spawnargs in the def file, so the script that toggles the skin between on and off gets confused. In fact, there's no skin definition that covers the default skin of these lamps. Will need to create one. This is one of the reasons you can toggle the lamp off, but can't toggle it back on again.

2 - The equip and dequip DLL code was written to deal with inventory items, not moveables that are picked up and manipulated. This is why the lamp started moving around and you heard the grunt sound - the code was trying to put the lamp back into inventory, but couldn't.

3 - The equip code looks for an "equip_action_script", which is defined for these lamps, and turns them off. However, the dequip code looks for a "dequip_action_script" to turn them back on again, but there was no spawnarg to define this, so the script code that would try to turn the lamp back on wasn't getting executed.

Springheel

Springheel

19.12.2012 01:36

administrator   ~0004972

As far as I can see, atdm:moveable_lantern_oil_hand02 has a "skin_lit" "" spawnarg (since the base texture is lit). Maybe something doesn't like that value. However, the atdm:moveable_lantern_oil_hand_lit series does have a specified "skin_lit" "lights/lantern_oil_hand_lit" skin.
grayman

grayman

19.12.2012 02:01

viewer   ~0004973

Yes, that was part of the problem. There have to be explicit "skin_lit" and "skin_unlit" spawnargs for the toggle on/off to work. If either is empty ("") it'll fail.

All is fixed now, but I posted a question in the forums about a question I had.
grayman

grayman

19.12.2012 13:15

viewer   ~0004975

There a number of issues here.

1 - There's no "skin" or "skin_lit" spawnargs in the def file, so the script that toggles the skin between on and off gets confused. In fact, there's no skin definition that covers the default skin of these lamps. Will need to create one. This is one of the reasons you can toggle the lamp off, but can't toggle it back on again. FIXED

2 - The equip and dequip DLL code was written to deal with inventory items, not moveables that are picked up and manipulated. This is why the lamp started moving around and you heard the grunt sound - the code was trying to put the lamp back into inventory, but couldn't. FIXED

3 - The equip code looks for an "equip_action_script", which is defined for these lamps, and turns them off. However, the dequip code looks for a "dequip_action_script" to turn them back on again, but there was no spawnarg to define this, so the script code that would try to turn the lamp back on wasn't getting executed. FIXED

4. – 13 skins for one of the lamps had a typo in their skin names, so would never have been offered in DR or found in TDM. Also added a missing set of skins for:

lights/metal_rusted_lit
lights/metal_rusted_lit_transparent
lights/metal_rusted_unlit_transparent

rev. 5663:

Grabber.cpp

rev 13281 & 13282:

tdm_moveable_lights.def
tdm_lights.skin
Springheel

Springheel

08.03.2013 16:40

administrator   ~0005126

Is there any chance this change could have caused the issue in 0003332? It's the only change I can see to lights since 1.08 was released.
grayman

grayman

08.03.2013 17:05

viewer   ~0005127

The code changes are only for the grabber.

The support file changes are for the movable lanterns.

The only suspect change I can see would be the addition of this skin, which was missing:

skin lamp_lit_opaque
{
    model "models/darkmod/lights/non-extinguishable/streetlamps/roundstreetlamp.lwo"
    model "models/darkmod/lights/non-extinguishable/streetlamps/roundstreetlamp_02.lwo"
    model "models/darkmod/lights/non-extinguishable/round_lantern_sitting.lwo"
    model "models/darkmod/lights/non-extinguishable/round_lantern_unattached.lwo"
    model "models/darkmod/lights/non-extinguishable/lantern_oil_hand02.lwo"
    model "models/darkmod/lights/non-extinguishable/simple_square1_unattached.lwo"
    model "models/darkmod/lights/non-extinguishable/simple_square1_hanging.lwo"
    model "models/darkmod/lights/non-extinguishable/simple_square2_unattached.lwo"
}

You could try commenting that out of tdm_lights.skin and see if it affects what you're seeing.
Springheel

Springheel

08.03.2013 22:08

administrator   ~0005128

Doesn't seem likely...two models this is happening to aren't on the list.
Springheel

Springheel

09.03.2013 00:50

administrator   ~0005129

Last edited: 09.03.2013 00:52

It looks like that skin entry was removed when Baddcog modified the file in revision 13338.

However, adding it back has no effect on the lamp issue.

grayman

grayman

09.03.2013 02:10

viewer   ~0005131

Did I restore it to what it was before his change? I created the list of models from the other related skins model lists.
Springheel

Springheel

09.03.2013 03:50

administrator   ~0005132

I copied and pasted what you posted above into the file and committed it.
grayman

grayman

09.03.2013 04:31

viewer   ~0005133

It was already there. I committed it as part of the change for this issue.

Is it now there twice?
Springheel

Springheel

09.03.2013 13:13

administrator   ~0005134

You committed it to fix this issue, then Baddcog removed it in 13338. Did you add it again since then?
grayman

grayman

09.03.2013 13:39

viewer   ~0005135

Ah, okay. I didn't notice that his removal came after my addition.

I wish he'd asked before removing it. As in, "Does anyone have an objection to my removing this?" Common courtesy.
grayman

grayman

09.03.2013 14:34

viewer   ~0005136

You mentioned above that the oil lamp changes were the only light changes since 1.08.

Then you mentioned that Baddcog made light changes in 13338.

Might he have made other light changes in that rev that caused the electric light problem?
Springheel

Springheel

09.03.2013 16:19

administrator   ~0005139

Last edited: 09.03.2013 16:19

That revision was after I noticed the problem with _snd lights, so it couldn't be the cause.

Issue History

Date Modified Username Field Change
16.05.2012 14:28 Springheel New Issue
18.05.2012 18:35 grayman Note Added: 0004588
18.05.2012 18:35 grayman Note Edited: 0004588
22.05.2012 22:53 Springheel Note Added: 0004610
19.12.2012 00:02 grayman Note Added: 0004971
19.12.2012 00:02 grayman Assigned To => grayman
19.12.2012 00:02 grayman Status new => assigned
19.12.2012 00:03 grayman Note Edited: 0004971
19.12.2012 01:36 Springheel Note Added: 0004972
19.12.2012 02:01 grayman Note Added: 0004973
19.12.2012 13:15 grayman Note Added: 0004975
19.12.2012 13:15 grayman Status assigned => resolved
19.12.2012 13:15 grayman Resolution open => fixed
19.12.2012 13:15 grayman Fixed in Version => TDM 2.00
19.12.2012 13:15 grayman Target Version => TDM 2.00
08.03.2013 16:40 Springheel Note Added: 0005126
08.03.2013 17:05 grayman Note Added: 0005127
08.03.2013 22:08 Springheel Note Added: 0005128
09.03.2013 00:50 Springheel Note Added: 0005129
09.03.2013 00:52 Springheel Note Edited: 0005129
09.03.2013 02:10 grayman Note Added: 0005131
09.03.2013 03:50 Springheel Note Added: 0005132
09.03.2013 04:31 grayman Note Added: 0005133
09.03.2013 13:13 Springheel Note Added: 0005134
09.03.2013 13:39 grayman Note Added: 0005135
09.03.2013 14:34 grayman Note Added: 0005136
09.03.2013 16:19 Springheel Note Added: 0005139
09.03.2013 16:19 Springheel Note Edited: 0005139