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

Method GetParmDefault

src/SB/Game/zNPCTypeCommon.cpp:2303–2453  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2301}
2302
2303S32 zNPCCommon::GetParmDefault(en_npcparm pid, void* val)
2304{
2305 S32 result = 1;
2306 S32* ivp = (S32*)val;
2307 F32* fvp = (F32*)val;
2308 F32* fvlist = (F32*)val;
2309 xVec3* vec = (xVec3*)val;
2310 zMovePoint** mvpt = (zMovePoint**)val;
2311
2312 switch (pid)
2313 {
2314 case NPC_PARM_HITPOINTS:
2315 *ivp = 1;
2316 break;
2317 case NPC_PARM_MOVERATE:
2318 *fvp = 2.0f;
2319 break;
2320 case NPC_PARM_TURNRATE:
2321 *fvp = 90.0f;
2322 break;
2323 case NPC_PARM_ACCEL:
2324 *fvp = 1.0f;
2325 break;
2326 case NPC_PARM_DRIFT:
2327 *fvp = 0.0f;
2328 break;
2329 case NPC_PARM_MASS:
2330 *fvp = 1.0f;
2331 break;
2332 case NPC_PARM_TOSSGRAV:
2333 *fvp = 25.0f;
2334 break;
2335 case NPC_PARM_TOSSELASTIC:
2336 *fvp = 0.5f;
2337 break;
2338 case NPC_PARM_BND_ISBOX:
2339 *ivp = 0;
2340 break;
2341 case NPC_PARM_BND_CENTER:
2342 xVec3Copy(vec, &g_O3);
2343 break;
2344 case NPC_PARM_BND_EXTENT:
2345 xVec3Copy(vec, &g_O3);
2346 break;
2347 case NPC_PARM_DETECT_RAD:
2348 *fvp = 3.0f;
2349 break;
2350 case NPC_PARM_DETECT_HYT:
2351 *fvp = 6.0f;
2352 break;
2353 case NPC_PARM_DETECT_OFF:
2354 *fvp = -2.0f;
2355 break;
2356 case NPC_PARM_ATTACK_RAD:
2357 *fvp = 5.0f;
2358 break;
2359 case NPC_PARM_ATTACK_FOV:
2360 *fvp = 60.0f;

Callers 1

GetParmMethod · 0.95

Calls 1

xVec3CopyFunction · 0.85

Tested by

no test coverage detected