allow defining zero gravity through MAPINFO

This commit is contained in:
Professor Hastig 2023-11-09 07:24:37 +01:00 committed by Rachael Alexanderson
parent d5e9783324
commit 3781c43aec
2 changed files with 7 additions and 1 deletions

View file

@ -1830,7 +1830,8 @@ void FLevelLocals::Init()
WallHorizLight = info->WallHorizLight*2;
if (info->gravity != 0.f)
{
gravity = info->gravity * 35/TICRATE;
if (info->gravity == DBL_MAX) gravity = 0;
else gravity = info->gravity * 35/TICRATE;
}
if (info->aircontrol != 0.f)
{

View file

@ -1208,6 +1208,11 @@ DEFINE_MAP_OPTION(gravity, true)
info->gravity = parse.sc.Float;
}
DEFINE_MAP_OPTION(nogravity, true)
{
info->gravity = DBL_MAX;
}
DEFINE_MAP_OPTION(aircontrol, true)
{
parse.ParseAssign();