View Issue Details

IDProjectCategoryView StatusLast Update
0001170The Dark ModCodingpublic26.03.2010 07:55
ReporterSneaksieDave Assigned Togreebo  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product VersionSVN 
Fixed in VersionTDM 1.01 
Summary0001170: Inventory issues with losing carried body
DescriptionFrom: http://modetwo.net/darkmod/index.php?s=&showtopic=8247&view=findpost&p=164054

-pick up a body, and then frob to take another item (like a key); the body is lost, cannot drop it anymore

-clear inventory (hotkey: bind "inventory_hotkey ") while carrying body; this also loses it
TagsNo tags attached.

Relationships

has duplicate 0001996 closedgreebo Shouldered ragdolls sometimes undroppable 

Activities

Ishtvan

Ishtvan

25.09.2008 05:23

reporter   ~0001642

I looked into the code. Body shouldering is setting the correct immobilization variables (EIM_ITEM_SELECT and EIM_USE_ITEM). The problem may lie in the inventory code, clear inventory is not respecting EIM_ITEM_SELECT, which should prevent you from selecting no item and clearing the inventory?
Ishtvan

Ishtvan

25.09.2008 05:43

reporter   ~0001643

fixed, inventory console commands were not respecting player immobilizations EIM_ITEM_SELECT or EIM_USE. I wasn't sure whether to put the checks in the console commands or the low-level inventory commands, but I figured if the low-level commands didn't already have a check in them for normal inventory operation, it must be intended to check at a higher level. So I put the checks in the console commands.
Ishtvan

Ishtvan

25.09.2008 05:44

reporter   ~0001644

Whoops, didn't notice the second part of this bug report, about frobbing a key and adding it to the inventory. That one is still unresolved!
crispy

crispy

03.10.2008 11:42

reporter   ~0001725

My take on this after a quick look at the code, in case it saves someone some time... I think the most appropriate way to solve this would be to make it impossible to pick up objects while carrying a body. Probably using a new immobilisation flag. (There is EIM_FROB already but IIRC we do want the player to be able to use world items like doors while carrying a body.)

There's a question of whether pick-up-able items should frob-highlight when you can't pick up items. In gameplay/UI terms I guess there are arguments both ways. In programming terms it's possibly more elegant to put the immobilisation check in the place where items are actually picked up (I reckon at the top of idEntity::AddToInventory) rather than in the frob code. I say that because the frob code in theory shouldn't (or even can't, in the presence of a frob action script) know what the use of a frobable item is.

Instead, we would just need to play a "no, can't do that" sound when the immobilisation check in idEntity::AddToInventory fails. (Note this would also affect scripts that add stuff to the inventory. Arguably this is OK.)

I'd volunteer to claim the issue and do this, but I still can't compile the mod right now. :-(
greebo

greebo

26.03.2010 07:55

administrator   ~0002972

Discovered too late for TDM 1.00, but I fixed this in TDM 1.01.

Issue History

Date Modified Username Field Change
24.09.2008 20:25 SneaksieDave New Issue
25.09.2008 05:23 Ishtvan Note Added: 0001642
25.09.2008 05:43 Ishtvan Note Added: 0001643
25.09.2008 05:43 Ishtvan Status new => resolved
25.09.2008 05:43 Ishtvan Resolution open => fixed
25.09.2008 05:43 Ishtvan Assigned To => Ishtvan
25.09.2008 05:44 Ishtvan Note Added: 0001644
25.09.2008 05:44 Ishtvan Status resolved => confirmed
25.09.2008 05:45 Ishtvan Assigned To Ishtvan =>
03.10.2008 11:42 crispy Note Added: 0001725
26.03.2010 07:55 greebo Note Added: 0002972
26.03.2010 07:55 greebo Status confirmed => resolved
26.03.2010 07:55 greebo Fixed in Version => TDM 1.01
26.03.2010 07:55 greebo Assigned To => greebo
26.03.2010 07:55 greebo Relationship added has duplicate 0001996
26.03.2010 07:55 greebo Status resolved => closed