Page 1 of 1

[Rseding91] [for 0.16] fast replace player spills all items

Posted: Wed Aug 02, 2017 3:31 pm
by bobingabout
Not sure if this is a bug, or a feature request, but I'm taking it as a bug for now.

I've been working on a mod that adds classes to the game, allowing the player slightly different playstyles.
Here is the mod so far https://www.dropbox.com/s/1ynlcf7ej1bkv ... P.rar?dl=0
as it stands, when the player chooses a class, the current character entity is fast replaced with the entity of the chosen class.
This works, except the items the player was carrying get spilled out on the floor, even though there is room in the player's inventory.

one would expect the items to be added to the new entity's inventory.

Re: fast replace player spills all items

Posted: Wed Aug 02, 2017 3:44 pm
by Rseding91
Thanks for the report. The player entity is not fast replaceable which is why you're seeing that happen.

I'll look into making it fast replaceable for 0.16.

Re: fast replace player spills all items

Posted: Wed Aug 02, 2017 3:51 pm
by bobingabout
Rseding91 wrote:The player entity is not fast replaceable...
by default. I had to add fast replace for the player entity in to the mod :P

Thanks for looking into it.

Re: fast replace player spills all items

Posted: Wed Aug 02, 2017 4:58 pm
by Rseding91
bobingabout wrote:
Rseding91 wrote:The player entity is not fast replaceable...
by default. I had to add fast replace for the player entity in to the mod :P

Thanks for looking into it.
I meant the C++ logic in the entity doesn't handle fast replace. You can mark an entity in the prototype as fast replaceable but that just allows you to perform the action in-game. It doesn't handle things like "copy the settings from A to B, move the items, ..." - that's all done on the C++ side inside a given entity.

The character entity was never setup to do any of that :)