Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[d3le] Unknown stat 'adrenaline' added to player's inventory #28

Open
daftmugi opened this issue Nov 12, 2022 · 6 comments
Open

[d3le] Unknown stat 'adrenaline' added to player's inventory #28

daftmugi opened this issue Nov 12, 2022 · 6 comments

Comments

@daftmugi
Copy link

Apologies if this should actually be posted to https://www.moddb.com/mods/the-lost-mission/downloads/d3-lost-mission/. I don't know how this feature is separated: game files vs code.

Versions: Doom3_The_Lost_Mission_1.3.rar with d3le (2e1dc5c) and dhewm3 (dhewm/dhewm3@a7e4eb8).

Adrenaline cannot be picked up. There is the following message in the console:

WARNING: Unknown stat 'adrenaline' added to player's inventory

To reproduce:

map game/le_exis1.map
setviewpos -2911 2573 4.25 70                                                                                                                                                     

Adrenaline should be right in front of the player on the floor to try to pick up.

This also happens on other maps.

@DanielGibson
Copy link
Member

DanielGibson commented Nov 13, 2022

Thanks for the report (I especially appreciate the reproduction steps)!

I can reproduce this. I think this is probably a script problem? (Update: turns out it was a C++ game code problem after all)
@Arl90: is this a known problem? Does it also exist in d3le with Vanilla Doom3?

DanielGibson added a commit that referenced this issue Nov 13, 2022
D3BFG does the same, Vanilla d3xp was missing this, probably because
while it had scripts for moveable_powerup_adrenaline, it was never used.
@DanielGibson
Copy link
Member

DanielGibson commented Nov 13, 2022

Ok, should be fixed, pretty sure that bug exists in the d3le mod as well (feel free to use my fix, @Arl90).

The difference to the base game, which also has an adrenaline powerup which actually works, is that this is a special moveable_powerup_adrenaline with the idMoveableItem spawnclass (=> uses the class of the same name in C++), while the original powerup_adrenaline uses idItemPowerup - and idItemPowerup has code to handle Adrenaline in idItemPowerup::GiveToPlayer(), while idMoveableItem doesn't, which is why we end up in idInventory::Give() which printed the reported warning (before I fixed it).

The d3xp scripts also define an identical moveable_powerup_adrenaline, but it's not used in any of the official d3xp maps, so the bug wasn't noticed there.

@daftmugi
Copy link
Author

That was fast! Thank you for the fix!

I compiled and tested out the fix, and it works great. I appreciate all your work on Dhewm 3.

@DanielGibson
Copy link
Member

Awesome, thanks for testing! :)

@Arl90
Copy link

Arl90 commented Nov 19, 2022

A week has passed and just now I get the ping e-mail...

Indeed, this also happens in vanilla Doom3, seems like what I need to do is replace the adrenaline items for the correct one, right?

If that's the case, and since the .map files which store entities are plain text, I can do that with a search and replace operation in notepad++.

@DanielGibson
Copy link
Member

Indeed, this also happens in vanilla Doom3, seems like what I need to do is replace the adrenaline items for the correct one, right?

The easiest way to fix it is to fix the d3le.dll for the next version, just like I have done in 62daa91 (the exact same fix should work with your Doom3 SDK based code)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants