MCPcopy Create free account
hub / github.com/JACoders/OpenJK / NPC_KeepCurrentFacing

Function NPC_KeepCurrentFacing

codeJK2/game/NPC.cpp:1170–1181  ·  view source on GitHub ↗

void NPC_KeepCurrentFacing(void) Fills in a default ucmd to keep current angles facing */

Source from the content-addressed store, hash-verified

1168Fills in a default ucmd to keep current angles facing
1169*/
1170void 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-------------------------

Callers 1

NPC_ExecuteBStateFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected