Skip to content

For some reason GetPlayerGravity gives a value of 0.0 (before it is changed via SetPlayerGravity). #829

@shierru

Description

@shierru

Description

When using the GetPlayerGravity function to save the player's gravity before changing it via SetPlayerGravity, I found that GetPlayerGravity gives 0.0.

I thought this behavior is not logical, because there is a global gravity value, which is specified in config.json (game.gravity). And I expected GetPlayerGravity to output it (since SetPlayerGravity was not used before). Then I opened the source code and noticed that it seems that the value specified in config.json should be set by default (correct me if this is wrong).

If my assumption that the GetPlayerGravity function should output a value from config.json (only if the gravity for the player has not been changed before) is correct, then this is a bug. If not, then I think it would be more logical to have this behavior (again, correct me if I'm wrong).

Version: (1.1.0.2612)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions