MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / load_settings

Function load_settings

src/SB/Game/zEntPlayerBungeeState.cpp:1169–1434  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1167 }
1168
1169 void load_settings(xIniFile& ini)
1170 {
1171 fixed.bottom_anim_frac = xIniGetFloat(&ini, "SB.state.bungee.bottom_anim_frac", 0.05f);
1172 if (fixed.bottom_anim_frac < 0.0f)
1173 {
1174 fixed.bottom_anim_frac = 0.0f;
1175 }
1176 if (fixed.bottom_anim_frac > 0.5f)
1177 {
1178 fixed.bottom_anim_frac = 0.5f;
1179 }
1180 xDebugAddTweak("Bungee|Globals|Anim Bottom Fraction", &fixed.bottom_anim_frac, 0.0f, 0.5f,
1181 NULL, NULL, 0);
1182
1183 fixed.top_anim_frac = xIniGetFloat(&ini, "SB.state.bungee.top_anim_frac", 0.1f);
1184 if (fixed.top_anim_frac < 0.0f)
1185 {
1186 fixed.top_anim_frac = 0.0f;
1187 }
1188 if (fixed.top_anim_frac > 0.5f)
1189 {
1190 fixed.top_anim_frac = 0.5f;
1191 }
1192 xDebugAddTweak("Bungee|Globals|Anim Top Fraction", &fixed.top_anim_frac, 0.0f, 0.5f, NULL,
1193 NULL, NULL);
1194
1195 fixed.bottom_anim_time = xIniGetFloat(&ini, "SB.state.bungee.bottom_anim_time", 0.1f);
1196 if (fixed.bottom_anim_time < 0.0f)
1197 {
1198 fixed.bottom_anim_time = 0.0f;
1199 }
1200 if (fixed.bottom_anim_time > 2.0f)
1201 {
1202 fixed.bottom_anim_time = 2.0f;
1203 }
1204 xDebugAddTweak("Bungee|Globals|Anim Trans Bottom-Time", &fixed.bottom_anim_time, 0.0f, 2.0f,
1205 NULL, NULL, NULL);
1206
1207 fixed.top_anim_time = xIniGetFloat(&ini, "SB.state.bungee.top_anim_time", 0.1f);
1208 if (fixed.top_anim_time < 0.0f)
1209 {
1210 fixed.top_anim_time = 0.0f;
1211 }
1212 if (fixed.top_anim_time > 2.0f)
1213 {
1214 fixed.top_anim_time = 2.0f;
1215 }
1216 xDebugAddTweak("Bungee|Globals|Anim Trans Top-Time", &fixed.top_anim_time, 0.0f, 2.0f, NULL,
1217 NULL, NULL);
1218
1219 fixed.hit_anim_time = xIniGetFloat(&ini, "SB.state.bungee.hit_anim_time", 0.1f);
1220 if (fixed.hit_anim_time < 0.0f)
1221 {
1222 fixed.hit_anim_time = 0.0f;
1223 }
1224 if (fixed.hit_anim_time > 2.0f)
1225 {
1226 fixed.hit_anim_time = 2.0f;

Callers

nothing calls this directly

Calls 2

xIniGetFloatFunction · 0.85
xDebugAddTweakFunction · 0.70

Tested by

no test coverage detected