| 349 | } |
| 350 | |
| 351 | void zNPCTiki::Reset() |
| 352 | { |
| 353 | zNPCCommon::Reset(); |
| 354 | |
| 355 | xVec3Add((xVec3*)&bound.sph.r, (xVec3*)&origLocalBound.sph.r, (xVec3*)&model->Mat->pos); |
| 356 | xVec3Add((xVec3*)&bound.box.box.lower, (xVec3*)&origLocalBound.box.box.lower, |
| 357 | (xVec3*)&model->Mat->pos); |
| 358 | xVec3Add((xVec3*)&bound.pad[3], (xVec3*)&origLocalBound.pad[3], (xVec3*)&model->Mat->pos); |
| 359 | |
| 360 | this->RestoreColFlags(); |
| 361 | |
| 362 | if (this->myNPCType == NPC_TYPE_TIKI_STONE) |
| 363 | { |
| 364 | flg_vuln = 1; |
| 365 | } |
| 366 | else |
| 367 | { |
| 368 | flg_vuln = ~0xFFFE; |
| 369 | } |
| 370 | |
| 371 | timeToLive = 0.0f; |
| 372 | tikiFlag = 0; |
| 373 | for (S32 i = 0; i < sizeof(parents[0]); i++) |
| 374 | { |
| 375 | parents[i] = NULL; |
| 376 | } |
| 377 | numParents = 0; |
| 378 | contactParent = ~0x0; |
| 379 | |
| 380 | for (S32 i = 0; i < sizeof(children[0]); i++) |
| 381 | { |
| 382 | children[i] = NULL; |
| 383 | } |
| 384 | numChildren = 0; |
| 385 | vel = 0.0f; |
| 386 | nonTikiParent = NULL; |
| 387 | |
| 388 | switch (this->myNPCType) |
| 389 | { |
| 390 | case NPC_TYPE_TIKI_QUIET: |
| 391 | break; |
| 392 | case NPC_TYPE_TIKI_LOVEY: |
| 393 | t1 = 0.0f; |
| 394 | t2 = -0.25f; |
| 395 | t3 = -0.25f; |
| 396 | xVec3Copy((xVec3*)&v1, (xVec3*)&model->Mat->pos); |
| 397 | break; |
| 398 | case NPC_TYPE_TIKI_THUNDER: |
| 399 | t1 = xurand(); |
| 400 | t2 = -0.5f; |
| 401 | t3 = -0.5f; |
| 402 | break; |
| 403 | default: |
| 404 | break; |
| 405 | } |
| 406 | |
| 407 | psy_instinct->GoalSet(NPC_GOAL_TIKIIDLE, 1); |
| 408 | model->RedMultiplier = 1.0f; |