void NPC_KeepCurrentFacing(void) Fills in a default ucmd to keep current angles facing */
| 1168 | Fills in a default ucmd to keep current angles facing |
| 1169 | */ |
| 1170 | void NPC_KeepCurrentFacing(void) |
| 1171 | { |
| 1172 | if(!ucmd.angles[YAW]) |
| 1173 | { |
| 1174 | ucmd.angles[YAW] = ANGLE2SHORT( client->ps.viewangles[YAW] ) - client->ps.delta_angles[YAW]; |
| 1175 | } |
| 1176 | |
| 1177 | if(!ucmd.angles[PITCH]) |
| 1178 | { |
| 1179 | ucmd.angles[PITCH] = ANGLE2SHORT( client->ps.viewangles[PITCH] ) - client->ps.delta_angles[PITCH]; |
| 1180 | } |
| 1181 | } |
| 1182 | |
| 1183 | /* |
| 1184 | ------------------------- |