Equivalent: scheduling
| 1986 | |
| 1987 | // Equivalent: scheduling |
| 1988 | static U32 SpatulaGrabCB(xAnimTransition*, xAnimSingle*, void* data) |
| 1989 | { |
| 1990 | sSpatulaGrabbed = 0; |
| 1991 | tslide_inair_tmr = 0.0f; |
| 1992 | tslide_dbl_tmr = 0.0f; |
| 1993 | globals.player.SlideTrackDecay = 0.0f; |
| 1994 | tslide_ground = 0; |
| 1995 | |
| 1996 | xEnt* ent = (xEnt*)data; |
| 1997 | ent->frame->vel.x = 0.0f; |
| 1998 | if (ent->frame->vel.y > 0.0f) |
| 1999 | { |
| 2000 | ent->frame->vel.y = 0.0f; |
| 2001 | } |
| 2002 | ent->frame->vel.z = 0.0f; |
| 2003 | |
| 2004 | globals.player.KnockBackTimer = 0.0f; |
| 2005 | globals.player.KnockIntoAirTimer = 0.0f; |
| 2006 | |
| 2007 | if (globals.autoSaveFeature) |
| 2008 | { |
| 2009 | if (zEntPlayer_InBossBattle()) |
| 2010 | { |
| 2011 | gWaitingToAutoSave = 1; |
| 2012 | } |
| 2013 | else |
| 2014 | { |
| 2015 | zSaveLoadPreAutoSave(true); |
| 2016 | } |
| 2017 | } |
| 2018 | |
| 2019 | xCollis rcoll; |
| 2020 | xVec3 cam; |
| 2021 | xVec3 center; |
| 2022 | xRay3 r; |
| 2023 | rcoll.flags = 0; |
| 2024 | |
| 2025 | xVec3Copy(¢er, &globals.player.ent.bound.cyl.center); |
| 2026 | |
| 2027 | xVec3Copy(&cam, &globals.camera.mat.pos); |
| 2028 | |
| 2029 | xVec3Copy(&r.origin, ¢er); |
| 2030 | xVec3Sub(&r.dir, &cam, ¢er); |
| 2031 | r.max_t = xVec3Length(&r.dir); |
| 2032 | F32 one_len = 1.0f / MAX(r.max_t, 0.00001f); |
| 2033 | xVec3SMul(&r.dir, &r.dir, one_len); |
| 2034 | r.flags = 0x800; |
| 2035 | |
| 2036 | xRayHitsScene(globals.sceneCur, &r, &rcoll); |
| 2037 | if ((rcoll.flags & 1) == 0) |
| 2038 | { |
| 2039 | zCameraSetReward(1); |
| 2040 | } |
| 2041 | |
| 2042 | zCameraDisableInput(); |
| 2043 | F32 delay = 0.0f; |
| 2044 | if (gCurrentPlayer == eCurrentPlayerSpongeBob) |
| 2045 | { |
no test coverage detected