| 4140 | } |
| 4141 | |
| 4142 | static void zEntPlayer_BoulderVehicleUpdate(xEnt* ent, xScene* sc, F32 dt) |
| 4143 | { |
| 4144 | xEntCollis collis; |
| 4145 | S32 i; |
| 4146 | xEnt* dyn; |
| 4147 | xEntBoulder* boul; |
| 4148 | F32 padDefl; |
| 4149 | xVec3 rotFudge; |
| 4150 | F32 ang; |
| 4151 | xMat3x3 rotM; |
| 4152 | xVec3 heading; |
| 4153 | F32 angle; |
| 4154 | F32 mag; |
| 4155 | |
| 4156 | gSpongeBall = TRUE; |
| 4157 | xEntBoulder* shouldDamagePlayer = FALSE; |
| 4158 | zEntPlayer_PredictionUpdate(ent, dt); |
| 4159 | |
| 4160 | xVec3Copy(&ent->frame->oldmat.pos, &ent->frame->mat.pos); |
| 4161 | |
| 4162 | U8 chkBackup = ent->collis->chk; |
| 4163 | U8 penBackup = ent->collis->pen; |
| 4164 | ent->collis->chk = 0x0; |
| 4165 | ent->collis->pen = 0x0; |
| 4166 | |
| 4167 | if (boulderVehicle != NULL && globals.player.ControlOff == FALSE) |
| 4168 | { |
| 4169 | bvTimeToIdle -= dt; |
| 4170 | |
| 4171 | xVec2 inputDefl; |
| 4172 | getPadDefl(&globals.pad0->analog1, &inputDefl); |
| 4173 | |
| 4174 | if (globals.pad0->on & 0x20) |
| 4175 | { |
| 4176 | inputDefl.y = 1.0f; |
| 4177 | } |
| 4178 | |
| 4179 | if (globals.pad0->on & 0x80) |
| 4180 | { |
| 4181 | inputDefl.y = -1.0f; |
| 4182 | } |
| 4183 | |
| 4184 | if (globals.pad0->on & 0x40) |
| 4185 | { |
| 4186 | inputDefl.x = 1.0f; |
| 4187 | } |
| 4188 | |
| 4189 | if (globals.pad0->on & 0x10) |
| 4190 | { |
| 4191 | inputDefl.x = -1.0f; |
| 4192 | } |
| 4193 | |
| 4194 | xVec3 tempRight; |
| 4195 | xVec3Copy(&tempRight, &globals.camera.mat.right); |
| 4196 | |
| 4197 | F32 normLength = xVec3Length2(&tempRight); |
| 4198 | if (normLength > 0.0001f) |
| 4199 | { |
nothing calls this directly
no test coverage detected