| 161 | } |
| 162 | |
| 163 | void xNPCBasic::Process(xScene* xscn, F32 dt) |
| 164 | { |
| 165 | xEnt* thisEnt = this; |
| 166 | void (*bak_bupdate)(xEnt*, xVec3*); |
| 167 | S32 hasgrav = 0; |
| 168 | |
| 169 | if (flags2.flg_colCheck || flags2.flg_penCheck) |
| 170 | { |
| 171 | colFreq -= 1; |
| 172 | } |
| 173 | else |
| 174 | { |
| 175 | colFreq = 1; |
| 176 | } |
| 177 | |
| 178 | if (pflags & 0x4) |
| 179 | { |
| 180 | hasgrav = 1; |
| 181 | } |
| 182 | |
| 183 | if (colFreq >= 0) |
| 184 | { |
| 185 | pflags &= 0xfb; |
| 186 | } |
| 187 | |
| 188 | if (pflags & 0x2) |
| 189 | { |
| 190 | xEntApplyPhysics(thisEnt, xscn, dt); |
| 191 | } |
| 192 | |
| 193 | if (pflags & 0x1) |
| 194 | { |
| 195 | xEntMove(thisEnt, xscn, dt); |
| 196 | } |
| 197 | |
| 198 | if (ffx != NULL) |
| 199 | { |
| 200 | xFFXApply(this, xscn, dt); |
| 201 | } |
| 202 | |
| 203 | if (frame != NULL && (flags1.flg_upward & 0x2)) |
| 204 | { |
| 205 | frame->dpos.y = MAX(0.0f, frame->dpos.y); |
| 206 | frame->dvel.y = MAX(0.0f, frame->dvel.y); |
| 207 | frame->vel.y = MAX(0.0f, frame->vel.y); |
| 208 | frame->oldvel.y = MAX(0.0f, frame->oldvel.y); |
| 209 | model->Mat->pos.y = MAX(model->Mat->pos.y, frame->oldmat.pos.y); |
| 210 | } |
| 211 | |
| 212 | if (colFreq < 0) |
| 213 | { |
| 214 | colFreq = colFreqReset; |
| 215 | |
| 216 | DBG_PStatCont(eNPCPerfEnable); |
| 217 | DBG_PStatOn(eNPCPerfDisable); |
| 218 | |
| 219 | if (collis == NULL) |
| 220 | { |
no test coverage detected