| 110 | } |
| 111 | |
| 112 | void zEGenerator_Update(zEGenerator* egen, xScene* sc, F32 dt) |
| 113 | { |
| 114 | xEntUpdate(egen, sc, dt); |
| 115 | xMat4x3Toworld(&egen->src_pos, (xMat4x3*)egen->model->Mat, &egen->zasset->src_dpos); |
| 116 | |
| 117 | zEnt* ent = (zEnt*)egen->dst; |
| 118 | |
| 119 | if (ent != NULL && ent->baseFlags & 0x20) |
| 120 | { |
| 121 | if (ent->baseType == eBaseTypeBoulder) |
| 122 | { |
| 123 | xVec3Copy(&egen->dst_pos, xEntGetCenter(ent)); |
| 124 | } |
| 125 | else |
| 126 | { |
| 127 | xMat4x3Toworld(&egen->dst_pos, (xMat4x3*)ent->model->Mat, &egen->dst_off); |
| 128 | } |
| 129 | } |
| 130 | |
| 131 | if (egen->lfx[0] != NULL) |
| 132 | { |
| 133 | zLightningModifyEndpoints(egen->lfx[0], &egen->src_pos, &egen->dst_pos); |
| 134 | } |
| 135 | |
| 136 | if (egen->lfx[1] != NULL) |
| 137 | { |
| 138 | zLightningModifyEndpoints(egen->lfx[1], &egen->src_pos, &egen->dst_pos); |
| 139 | } |
| 140 | |
| 141 | if (egen->tmr > 0.0f) |
| 142 | { |
| 143 | egen->tmr -= dt; |
| 144 | |
| 145 | if (egen->tmr <= 0.0f) |
| 146 | { |
| 147 | zEGenerator_TurnOff(egen); |
| 148 | zEntEvent((xBase*)egen, eEventOff); |
| 149 | } |
| 150 | } |
| 151 | } |
| 152 | |
| 153 | void zEGenerator_Render(zEGenerator* egen) |
| 154 | { |
nothing calls this directly
no test coverage detected